From 9a98749bc943d4d89f66eac2cff2021c52b5f5b5 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Thu, 23 Apr 2026 11:27:20 +0100 Subject: [PATCH] Update CE OpenAPI spec (from master) --- ce/docs/AssetControllerApi.md | 8 +- ce/docs/DomainControllerApi.md | 8 +- ce/docs/EntityDataDiff.md | 16 + ce/docs/EntityExportData.md | 16 + ce/docs/OAuth2ControllerApi.md | 8 +- ce/docs/RuleChainData.md | 16 + ce/docs/RuleChainExportData.md | 16 + ce/docs/RuleChainMetaData.md | 16 + ce/docs/RuleChainNote.md | 32 ++ ce/spec/openapi.json | 73 ++- .../client/api/ThingsboardApi.java | 258 ++++----- .../client/model/RuleChainMetaData.java | 56 +- .../client/model/RuleChainNote.java | 515 ++++++++++++++++++ 13 files changed, 888 insertions(+), 150 deletions(-) create mode 100644 ce/docs/RuleChainNote.md create mode 100644 ce/src/main/java/org/thingsboard/client/model/RuleChainNote.java diff --git a/ce/docs/AssetControllerApi.md b/ce/docs/AssetControllerApi.md index 099b2dfd..136e7cd0 100644 --- a/ce/docs/AssetControllerApi.md +++ b/ce/docs/AssetControllerApi.md @@ -18,7 +18,7 @@ PageDataAsset getEdgeAssets(@Nonnull String edgeId, @Nonnull Integer pageSize, @ Asset getTenantAssetByName(@Nonnull String assetName) // Get Tenant Asset (getTenantAssetByName) PageDataAssetInfo getTenantAssetInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String type, @Nullable String assetProfileId, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get Tenant Asset Infos (getTenantAssetInfos) PageDataAsset getTenantAssets(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String type, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get Tenant Assets (getTenantAssets) -BulkImportResultAsset processAssetsBulkImport(@Nonnull BulkImportRequest bulkImportRequest) // Import the bulk of assets (processAssetsBulkImport) +BulkImportResultAsset processAssetBulkImport(@Nonnull BulkImportRequest bulkImportRequest) // Import the bulk of assets (processAssetBulkImport) Asset saveAsset(@Nonnull Asset asset, @Nullable NameConflictPolicy nameConflictPolicy, @Nullable String uniquifySeparator, @Nullable UniquifyStrategy uniquifyStrategy) // Create Or Update Asset (saveAsset) Asset unassignAssetFromCustomer(@Nonnull String assetId) // Unassign asset from customer (unassignAssetFromCustomer) Asset unassignAssetFromEdge(@Nonnull String edgeId, @Nonnull String assetId) // Unassign asset from edge (unassignAssetFromEdge) @@ -412,15 +412,15 @@ Returns a page of assets owned by tenant. You can specify parameters to filter t **PageDataAsset** -## processAssetsBulkImport +## processAssetBulkImport ``` -BulkImportResultAsset processAssetsBulkImport(@Nonnull BulkImportRequest bulkImportRequest) +BulkImportResultAsset processAssetBulkImport(@Nonnull BulkImportRequest bulkImportRequest) ``` **POST** `/api/asset/bulk_import` -Import the bulk of assets (processAssetsBulkImport) +Import the bulk of assets (processAssetBulkImport) There's an ability to import the bulk of assets using the only .csv file. diff --git a/ce/docs/DomainControllerApi.md b/ce/docs/DomainControllerApi.md index 0f801f85..330b1b4d 100644 --- a/ce/docs/DomainControllerApi.md +++ b/ce/docs/DomainControllerApi.md @@ -5,7 +5,7 @@ ``` void deleteDomain(@Nonnull UUID id) // Delete Domain by ID (deleteDomain) DomainInfo getDomainInfoById(@Nonnull UUID id) // Get Domain info by Id (getDomainInfoById) -PageDataDomainInfo getTenantDomainInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get Domain infos (getTenantDomainInfos) +PageDataDomainInfo getDomainInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get Domain infos (getDomainInfos) Domain saveDomain(@Nonnull Domain domain, @Nullable List oauth2ClientIds) // Save or Update Domain (saveDomain) void updateDomainOauth2Clients(@Nonnull UUID id, @Nonnull List UUID) // Update oauth2 clients (updateDomainOauth2Clients) ``` @@ -59,15 +59,15 @@ Get Domain info by Id (getDomainInfoById) **DomainInfo** -## getTenantDomainInfos +## getDomainInfos ``` -PageDataDomainInfo getTenantDomainInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) +PageDataDomainInfo getDomainInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) ``` **GET** `/api/domain/infos` -Get Domain infos (getTenantDomainInfos) +Get Domain infos (getDomainInfos) Available for users with 'SYS_ADMIN' authority. diff --git a/ce/docs/EntityDataDiff.md b/ce/docs/EntityDataDiff.md index 15e19861..2c00b6e0 100644 --- a/ce/docs/EntityDataDiff.md +++ b/ce/docs/EntityDataDiff.md @@ -227,6 +227,7 @@ | nodes | List | List of rule node JSON objects | | | connections | List | List of JSON objects that represent connections between rule nodes | | | ruleChainConnections | List | List of JSON objects that represent connections between rule nodes and other rule chains. | | +| notes | List | List of sticky notes placed on the rule chain canvas | [optional] | #### Output | Name | Type | Description | Notes | @@ -287,6 +288,21 @@ | additionalInfo | com.fasterxml.jackson.databind.JsonNode | JSON object with the additional information about the connection. | | | type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | +#### RuleChainNote +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | String | Unique identifier of the note on the canvas | [optional] | +| x | Integer | Horizontal position of the note on the canvas, in pixels | [optional] | +| y | Integer | Vertical position of the note on the canvas, in pixels | [optional] | +| width | Integer | Width of the note, in pixels | [optional] | +| height | Integer | Height of the note, in pixels | [optional] | +| content | String | Markdown or HTML content of the note | [optional] | +| backgroundColor | String | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | +| borderColor | String | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | +| borderWidth | Integer | Border width of the note in pixels | [optional] | +| applyDefaultMarkdownStyle | Boolean | Whether to apply the default markdown stylesheet to the note content | [optional] | +| markdownCss | String | Custom CSS styles applied to the note content | [optional] | + #### AttributeScope (enum) `CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` diff --git a/ce/docs/EntityExportData.md b/ce/docs/EntityExportData.md index 2188cb4a..12a8e3be 100644 --- a/ce/docs/EntityExportData.md +++ b/ce/docs/EntityExportData.md @@ -146,6 +146,7 @@ Base export container for ThingsBoard entities | nodes | List | List of rule node JSON objects | | | connections | List | List of JSON objects that represent connections between rule nodes | | | ruleChainConnections | List | List of JSON objects that represent connections between rule nodes and other rule chains. | | +| notes | List | List of sticky notes placed on the rule chain canvas | [optional] | #### RelationTypeGroup (enum) `COMMON` | `DASHBOARD` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` @@ -266,6 +267,21 @@ Base export container for ThingsBoard entities | additionalInfo | com.fasterxml.jackson.databind.JsonNode | JSON object with the additional information about the connection. | | | type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | +#### RuleChainNote +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | String | Unique identifier of the note on the canvas | [optional] | +| x | Integer | Horizontal position of the note on the canvas, in pixels | [optional] | +| y | Integer | Vertical position of the note on the canvas, in pixels | [optional] | +| width | Integer | Width of the note, in pixels | [optional] | +| height | Integer | Height of the note, in pixels | [optional] | +| content | String | Markdown or HTML content of the note | [optional] | +| backgroundColor | String | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | +| borderColor | String | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | +| borderWidth | Integer | Border width of the note in pixels | [optional] | +| applyDefaultMarkdownStyle | Boolean | Whether to apply the default markdown stylesheet to the note content | [optional] | +| markdownCss | String | Custom CSS styles applied to the note content | [optional] | + #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/ce/docs/OAuth2ControllerApi.md b/ce/docs/OAuth2ControllerApi.md index d76ef62c..82e81e49 100644 --- a/ce/docs/OAuth2ControllerApi.md +++ b/ce/docs/OAuth2ControllerApi.md @@ -4,7 +4,7 @@ ``` void deleteOauth2Client(@Nonnull UUID id) // Delete oauth2 client (deleteOauth2Client) -PageDataOAuth2ClientInfo findTenantOAuth2ClientInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get OAuth2 Client infos (findTenantOAuth2ClientInfos) +PageDataOAuth2ClientInfo findOAuth2ClientInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get OAuth2 Client infos (findOAuth2ClientInfos) List findTenantOAuth2ClientInfosByIds(@Nonnull List clientIds) // Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) String getLoginProcessingUrl() // Get OAuth2 log in processing URL (getLoginProcessingUrl) OAuth2Client getOAuth2ClientById(@Nonnull UUID id) // Get OAuth2 Client by id (getOAuth2ClientById) @@ -37,15 +37,15 @@ Deletes the oauth2 client. Referencing non-existing oauth2 client Id will cause null (empty response body) -## findTenantOAuth2ClientInfos +## findOAuth2ClientInfos ``` -PageDataOAuth2ClientInfo findTenantOAuth2ClientInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) +PageDataOAuth2ClientInfo findOAuth2ClientInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) ``` **GET** `/api/oauth2/client/infos` -Get OAuth2 Client infos (findTenantOAuth2ClientInfos) +Get OAuth2 Client infos (findOAuth2ClientInfos) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/ce/docs/RuleChainData.md b/ce/docs/RuleChainData.md index 472f3213..c4f06201 100644 --- a/ce/docs/RuleChainData.md +++ b/ce/docs/RuleChainData.md @@ -42,6 +42,7 @@ A JSON value representing the rule chains. | nodes | List | List of rule node JSON objects | | | connections | List | List of JSON objects that represent connections between rule nodes | | | ruleChainConnections | List | List of JSON objects that represent connections between rule nodes and other rule chains. | | +| notes | List | List of sticky notes placed on the rule chain canvas | [optional] | #### RuleChainType (enum) `CORE` | `EDGE` @@ -78,6 +79,21 @@ A JSON value representing the rule chains. | additionalInfo | com.fasterxml.jackson.databind.JsonNode | JSON object with the additional information about the connection. | | | type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | +#### RuleChainNote +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | String | Unique identifier of the note on the canvas | [optional] | +| x | Integer | Horizontal position of the note on the canvas, in pixels | [optional] | +| y | Integer | Vertical position of the note on the canvas, in pixels | [optional] | +| width | Integer | Width of the note, in pixels | [optional] | +| height | Integer | Height of the note, in pixels | [optional] | +| content | String | Markdown or HTML content of the note | [optional] | +| backgroundColor | String | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | +| borderColor | String | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | +| borderWidth | Integer | Border width of the note in pixels | [optional] | +| applyDefaultMarkdownStyle | Boolean | Whether to apply the default markdown stylesheet to the note content | [optional] | +| markdownCss | String | Custom CSS styles applied to the note content | [optional] | + #### DebugSettings | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/ce/docs/RuleChainExportData.md b/ce/docs/RuleChainExportData.md index 953cc733..1a592354 100644 --- a/ce/docs/RuleChainExportData.md +++ b/ce/docs/RuleChainExportData.md @@ -35,6 +35,7 @@ | nodes | List | List of rule node JSON objects | | | connections | List | List of JSON objects that represent connections between rule nodes | | | ruleChainConnections | List | List of JSON objects that represent connections between rule nodes and other rule chains. | | +| notes | List | List of sticky notes placed on the rule chain canvas | [optional] | #### ExportableEntity | Name | Type | Description | Notes | @@ -116,6 +117,21 @@ | additionalInfo | com.fasterxml.jackson.databind.JsonNode | JSON object with the additional information about the connection. | | | type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | +#### RuleChainNote +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | String | Unique identifier of the note on the canvas | [optional] | +| x | Integer | Horizontal position of the note on the canvas, in pixels | [optional] | +| y | Integer | Vertical position of the note on the canvas, in pixels | [optional] | +| width | Integer | Width of the note, in pixels | [optional] | +| height | Integer | Height of the note, in pixels | [optional] | +| content | String | Markdown or HTML content of the note | [optional] | +| backgroundColor | String | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | +| borderColor | String | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | +| borderWidth | Integer | Border width of the note in pixels | [optional] | +| applyDefaultMarkdownStyle | Boolean | Whether to apply the default markdown stylesheet to the note content | [optional] | +| markdownCss | String | Custom CSS styles applied to the note content | [optional] | + #### RelationTypeGroup (enum) `COMMON` | `DASHBOARD` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` diff --git a/ce/docs/RuleChainMetaData.md b/ce/docs/RuleChainMetaData.md index afb9b650..d436010c 100644 --- a/ce/docs/RuleChainMetaData.md +++ b/ce/docs/RuleChainMetaData.md @@ -15,6 +15,7 @@ A JSON value representing the rule chain metadata. | **nodes** | **List\** | List of rule node JSON objects | | | **connections** | **List\** | List of JSON objects that represent connections between rule nodes | | | **ruleChainConnections** | **List\** | List of JSON objects that represent connections between rule nodes and other rule chains. | | +| **notes** | **List\** | List of sticky notes placed on the rule chain canvas | [optional] | @@ -54,6 +55,21 @@ A JSON value representing the rule chain metadata. | additionalInfo | com.fasterxml.jackson.databind.JsonNode | JSON object with the additional information about the connection. | | | type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | +#### RuleChainNote +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | String | Unique identifier of the note on the canvas | [optional] | +| x | Integer | Horizontal position of the note on the canvas, in pixels | [optional] | +| y | Integer | Vertical position of the note on the canvas, in pixels | [optional] | +| width | Integer | Width of the note, in pixels | [optional] | +| height | Integer | Height of the note, in pixels | [optional] | +| content | String | Markdown or HTML content of the note | [optional] | +| backgroundColor | String | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | +| borderColor | String | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | +| borderWidth | Integer | Border width of the note in pixels | [optional] | +| applyDefaultMarkdownStyle | Boolean | Whether to apply the default markdown stylesheet to the note content | [optional] | +| markdownCss | String | Custom CSS styles applied to the note content | [optional] | + #### DebugSettings | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/ce/docs/RuleChainNote.md b/ce/docs/RuleChainNote.md new file mode 100644 index 00000000..09b6dacc --- /dev/null +++ b/ce/docs/RuleChainNote.md @@ -0,0 +1,32 @@ + +# RuleChainNote + +`org.thingsboard.client.model.RuleChainNote` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **id** | **String** | Unique identifier of the note on the canvas | [optional] | +| **x** | **Integer** | Horizontal position of the note on the canvas, in pixels | [optional] | +| **y** | **Integer** | Vertical position of the note on the canvas, in pixels | [optional] | +| **width** | **Integer** | Width of the note, in pixels | [optional] | +| **height** | **Integer** | Height of the note, in pixels | [optional] | +| **content** | **String** | Markdown or HTML content of the note | [optional] | +| **backgroundColor** | **String** | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | +| **borderColor** | **String** | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | +| **borderWidth** | **Integer** | Border width of the note in pixels | [optional] | +| **applyDefaultMarkdownStyle** | **Boolean** | Whether to apply the default markdown stylesheet to the note content | [optional] | +| **markdownCss** | **String** | Custom CSS styles applied to the note content | [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/spec/openapi.json b/ce/spec/openapi.json index 2b95b639..e92723e4 100644 --- a/ce/spec/openapi.json +++ b/ce/spec/openapi.json @@ -9797,9 +9797,9 @@ "tags": [ "asset-controller" ], - "summary": "Import the bulk of assets (processAssetsBulkImport)", + "summary": "Import the bulk of assets (processAssetBulkImport)", "description": "There's an ability to import the bulk of assets using the only .csv file.", - "operationId": "processAssetsBulkImport", + "operationId": "processAssetBulkImport", "requestBody": { "content": { "application/json": { @@ -30295,9 +30295,9 @@ "tags": [ "domain-controller" ], - "summary": "Get Domain infos (getTenantDomainInfos)", + "summary": "Get Domain infos (getDomainInfos)", "description": "\n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantDomainInfos", + "operationId": "getDomainInfos", "parameters": [ { "name": "pageSize", @@ -54535,9 +54535,9 @@ "tags": [ "o-auth-2-controller" ], - "summary": "Get OAuth2 Client infos (findTenantOAuth2ClientInfos)", + "summary": "Get OAuth2 Client infos (findOAuth2ClientInfos)", "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "findTenantOAuth2ClientInfos", + "operationId": "findOAuth2ClientInfos", "parameters": [ { "name": "pageSize", @@ -95940,6 +95940,13 @@ "items": { "$ref": "#/components/schemas/RuleChainConnectionInfo" } + }, + "notes": { + "type": "array", + "description": "List of sticky notes placed on the rule chain canvas", + "items": { + "$ref": "#/components/schemas/RuleChainNote" + } } }, "required": [ @@ -95950,6 +95957,60 @@ "ruleChainId" ] }, + "RuleChainNote": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the note on the canvas" + }, + "x": { + "type": "integer", + "format": "int32", + "description": "Horizontal position of the note on the canvas, in pixels" + }, + "y": { + "type": "integer", + "format": "int32", + "description": "Vertical position of the note on the canvas, in pixels" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "Width of the note, in pixels" + }, + "height": { + "type": "integer", + "format": "int32", + "description": "Height of the note, in pixels" + }, + "content": { + "type": "string", + "description": "Markdown or HTML content of the note" + }, + "backgroundColor": { + "type": "string", + "description": "Background color of the note in CSS hex format, e.g. '#FFF9C4'" + }, + "borderColor": { + "type": "string", + "description": "Border color of the note in CSS hex format, e.g. '#E6C800'" + }, + "borderWidth": { + "type": "integer", + "format": "int32", + "description": "Border width of the note in pixels" + }, + "applyDefaultMarkdownStyle": { + "type": "boolean", + "description": "Whether to apply the default markdown stylesheet to the note content" + }, + "markdownCss": { + "type": "string", + "description": "Custom CSS styles applied to the note content" + } + } + }, "RuleChainOutputLabelsUsage": { "type": "object", "properties": { 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 c30cd6cf..04aded34 100644 --- a/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/ce/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -9920,7 +9920,7 @@ private HttpRequest.Builder findMissingToRelatedRuleChainsRequestBuilder(@Nonnul } /** - * Get OAuth2 Client infos (findTenantOAuth2ClientInfos) + * Get OAuth2 Client infos (findOAuth2ClientInfos) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -9930,13 +9930,13 @@ private HttpRequest.Builder findMissingToRelatedRuleChainsRequestBuilder(@Nonnul * @return PageDataOAuth2ClientInfo * @throws ApiException if fails to make API call */ - public PageDataOAuth2ClientInfo findTenantOAuth2ClientInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) throws ApiException { - ApiResponse localVarResponse = findTenantOAuth2ClientInfosWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, null); + public PageDataOAuth2ClientInfo findOAuth2ClientInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) throws ApiException { + ApiResponse localVarResponse = findOAuth2ClientInfosWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, null); return localVarResponse.getData(); } /** - * Get OAuth2 Client infos (findTenantOAuth2ClientInfos) + * Get OAuth2 Client infos (findOAuth2ClientInfos) * Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) @@ -9947,8 +9947,8 @@ public PageDataOAuth2ClientInfo findTenantOAuth2ClientInfos(@Nonnull Integer pag * @return ApiResponse<PageDataOAuth2ClientInfo> * @throws ApiException if fails to make API call */ - public ApiResponse findTenantOAuth2ClientInfosWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = findTenantOAuth2ClientInfosRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, headers); + public ApiResponse findOAuth2ClientInfosWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = findOAuth2ClientInfosRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -9959,7 +9959,7 @@ public ApiResponse findTenantOAuth2ClientInfosWithHttp InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("findTenantOAuth2ClientInfos", localVarResponse); + throw getApiException("findOAuth2ClientInfos", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -9982,14 +9982,14 @@ public ApiResponse findTenantOAuth2ClientInfosWithHttp } } - private HttpRequest.Builder findTenantOAuth2ClientInfosRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder findOAuth2ClientInfosRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { // verify the required parameter 'pageSize' is set if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling findTenantOAuth2ClientInfos"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling findOAuth2ClientInfos"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling findTenantOAuth2ClientInfos"); + throw new ApiException(400, "Missing the required parameter 'page' when calling findOAuth2ClientInfos"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = "/api/oauth2/client/infos"; @@ -18903,6 +18903,116 @@ private HttpRequest.Builder getDomainInfoByIdRequestBuilder(@Nonnull UUID id, Ma return localVarRequestBuilder; } + /** + * Get Domain infos (getDomainInfos) + * Available for users with 'SYS_ADMIN' authority. + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch Case-insensitive 'substring' filter based on domain's name (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return PageDataDomainInfo + * @throws ApiException if fails to make API call + */ + public PageDataDomainInfo getDomainInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) throws ApiException { + ApiResponse localVarResponse = getDomainInfosWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, null); + return localVarResponse.getData(); + } + + /** + * Get Domain infos (getDomainInfos) + * Available for users with 'SYS_ADMIN' authority. + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch Case-insensitive 'substring' filter based on domain's name (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<PageDataDomainInfo> + * @throws ApiException if fails to make API call + */ + public ApiResponse getDomainInfosWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getDomainInfosRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, 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("getDomainInfos", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + PageDataDomainInfo 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 getDomainInfosRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { + // verify the required parameter 'pageSize' is set + if (pageSize == null) { + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getDomainInfos"); + } + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getDomainInfos"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/domain/infos"; + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "page"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "textSearch"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); + localVarQueryParameterBaseName = "sortProperty"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); + localVarQueryParameterBaseName = "sortOrder"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); + 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 assets assigned to edge (getEdgeAssets) * Returns a page of assets 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. @@ -28749,116 +28859,6 @@ private HttpRequest.Builder getTenantDevicesRequestBuilder(@Nonnull Integer page return localVarRequestBuilder; } - /** - * Get Domain infos (getTenantDomainInfos) - * Available for users with 'SYS_ADMIN' authority. - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch Case-insensitive 'substring' filter based on domain's name (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @return PageDataDomainInfo - * @throws ApiException if fails to make API call - */ - public PageDataDomainInfo getTenantDomainInfos(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) throws ApiException { - ApiResponse localVarResponse = getTenantDomainInfosWithHttpInfo(pageSize, page, textSearch, sortProperty, sortOrder, null); - return localVarResponse.getData(); - } - - /** - * Get Domain infos (getTenantDomainInfos) - * Available for users with 'SYS_ADMIN' authority. - * @param pageSize Maximum amount of entities in a one page (required) - * @param page Sequence number of page starting from 0 (required) - * @param textSearch Case-insensitive 'substring' filter based on domain's name (optional) - * @param sortProperty Property of entity to sort by (optional) - * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataDomainInfo> - * @throws ApiException if fails to make API call - */ - public ApiResponse getTenantDomainInfosWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getTenantDomainInfosRequestBuilder(pageSize, page, textSearch, sortProperty, sortOrder, 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("getTenantDomainInfos", localVarResponse); - } - localVarResponseBody = ApiClient.getResponseBody(localVarResponse); - if (localVarResponseBody == null) { - return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); - } - String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataDomainInfo 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 getTenantDomainInfosRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { - // verify the required parameter 'pageSize' is set - if (pageSize == null) { - throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getTenantDomainInfos"); - } - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getTenantDomainInfos"); - } - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/domain/infos"; - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "page"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); - localVarQueryParameterBaseName = "textSearch"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); - localVarQueryParameterBaseName = "sortProperty"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); - localVarQueryParameterBaseName = "sortOrder"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - 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 Tenant Edge by name (getTenantEdgeByName) * 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. Available for users with 'TENANT_ADMIN' authority. @@ -35685,27 +35685,27 @@ private HttpRequest.Builder markNotificationAsReadRequestBuilder(@Nonnull UUID i } /** - * Import the bulk of assets (processAssetsBulkImport) + * Import the bulk of assets (processAssetBulkImport) * There's an ability to import the bulk of assets using the only .csv file. * @param bulkImportRequest (required) * @return BulkImportResultAsset * @throws ApiException if fails to make API call */ - public BulkImportResultAsset processAssetsBulkImport(@Nonnull BulkImportRequest bulkImportRequest) throws ApiException { - ApiResponse localVarResponse = processAssetsBulkImportWithHttpInfo(bulkImportRequest, null); + public BulkImportResultAsset processAssetBulkImport(@Nonnull BulkImportRequest bulkImportRequest) throws ApiException { + ApiResponse localVarResponse = processAssetBulkImportWithHttpInfo(bulkImportRequest, null); return localVarResponse.getData(); } /** - * Import the bulk of assets (processAssetsBulkImport) + * Import the bulk of assets (processAssetBulkImport) * There's an ability to import the bulk of assets using the only .csv file. * @param bulkImportRequest (required) * @param headers Optional headers to include in the request * @return ApiResponse<BulkImportResultAsset> * @throws ApiException if fails to make API call */ - public ApiResponse processAssetsBulkImportWithHttpInfo(@Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = processAssetsBulkImportRequestBuilder(bulkImportRequest, headers); + public ApiResponse processAssetBulkImportWithHttpInfo(@Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = processAssetBulkImportRequestBuilder(bulkImportRequest, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -35716,7 +35716,7 @@ public ApiResponse processAssetsBulkImportWithHttpInfo(@N InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("processAssetsBulkImport", localVarResponse); + throw getApiException("processAssetBulkImport", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { @@ -35739,10 +35739,10 @@ public ApiResponse processAssetsBulkImportWithHttpInfo(@N } } - private HttpRequest.Builder processAssetsBulkImportRequestBuilder(@Nonnull BulkImportRequest bulkImportRequest, Map headers) throws ApiException { + private HttpRequest.Builder processAssetBulkImportRequestBuilder(@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 processAssetsBulkImport"); + throw new ApiException(400, "Missing the required parameter 'bulkImportRequest' when calling processAssetBulkImport"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = "/api/asset/bulk_import"; diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleChainMetaData.java b/ce/src/main/java/org/thingsboard/client/model/RuleChainMetaData.java index 5356f0f7..17ba1d11 100644 --- a/ce/src/main/java/org/thingsboard/client/model/RuleChainMetaData.java +++ b/ce/src/main/java/org/thingsboard/client/model/RuleChainMetaData.java @@ -35,6 +35,7 @@ import org.thingsboard.client.model.NodeConnectionInfo; import org.thingsboard.client.model.RuleChainConnectionInfo; import org.thingsboard.client.model.RuleChainId; +import org.thingsboard.client.model.RuleChainNote; import org.thingsboard.client.model.RuleNode; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -49,7 +50,8 @@ RuleChainMetaData.JSON_PROPERTY_FIRST_NODE_INDEX, RuleChainMetaData.JSON_PROPERTY_NODES, RuleChainMetaData.JSON_PROPERTY_CONNECTIONS, - RuleChainMetaData.JSON_PROPERTY_RULE_CHAIN_CONNECTIONS + RuleChainMetaData.JSON_PROPERTY_RULE_CHAIN_CONNECTIONS, + RuleChainMetaData.JSON_PROPERTY_NOTES }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class RuleChainMetaData { @@ -77,6 +79,10 @@ public class RuleChainMetaData { @Nonnull private List ruleChainConnections = new ArrayList<>(); + public static final String JSON_PROPERTY_NOTES = "notes"; + @Nullable + private List notes = new ArrayList<>(); + public RuleChainMetaData() { } @@ -246,6 +252,38 @@ public void setRuleChainConnections(@Nonnull List ruleC } + public RuleChainMetaData notes(@Nullable List notes) { + this.notes = notes; + return this; + } + + public RuleChainMetaData addNotesItem(RuleChainNote notesItem) { + if (this.notes == null) { + this.notes = new ArrayList<>(); + } + this.notes.add(notesItem); + return this; + } + + /** + * List of sticky notes placed on the rule chain canvas + * @return notes + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_NOTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNotes() { + return notes; + } + + + @JsonProperty(value = JSON_PROPERTY_NOTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotes(@Nullable List notes) { + this.notes = notes; + } + + /** * Return true if this RuleChainMetaData object is equal to o. */ @@ -263,12 +301,13 @@ public boolean equals(Object o) { Objects.equals(this.firstNodeIndex, ruleChainMetaData.firstNodeIndex) && Objects.equals(this.nodes, ruleChainMetaData.nodes) && Objects.equals(this.connections, ruleChainMetaData.connections) && - Objects.equals(this.ruleChainConnections, ruleChainMetaData.ruleChainConnections); + Objects.equals(this.ruleChainConnections, ruleChainMetaData.ruleChainConnections) && + Objects.equals(this.notes, ruleChainMetaData.notes); } @Override public int hashCode() { - return Objects.hash(ruleChainId, version, firstNodeIndex, nodes, connections, ruleChainConnections); + return Objects.hash(ruleChainId, version, firstNodeIndex, nodes, connections, ruleChainConnections, notes); } @Override @@ -281,6 +320,7 @@ public String toString() { sb.append(" nodes: ").append(toIndentedString(nodes)).append("\n"); sb.append(" connections: ").append(toIndentedString(connections)).append("\n"); sb.append(" ruleChainConnections: ").append(toIndentedString(ruleChainConnections)).append("\n"); + sb.append(" notes: ").append(toIndentedString(notes)).append("\n"); sb.append("}"); return sb.toString(); } @@ -373,6 +413,16 @@ public String toUrlQueryString(String prefix) { } } + // add `notes` to the URL query string + if (getNotes() != null) { + for (int i = 0; i < getNotes().size(); i++) { + if (getNotes().get(i) != null) { + joiner.add(getNotes().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%snotes%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + return joiner.toString(); } } diff --git a/ce/src/main/java/org/thingsboard/client/model/RuleChainNote.java b/ce/src/main/java/org/thingsboard/client/model/RuleChainNote.java new file mode 100644 index 00000000..13dd34b3 --- /dev/null +++ b/ce/src/main/java/org/thingsboard/client/model/RuleChainNote.java @@ -0,0 +1,515 @@ +/** + * 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 javax.annotation.Generated; +import javax.annotation.Nullable; +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; +/** + * RuleChainNote + */ +@JsonPropertyOrder({ + RuleChainNote.JSON_PROPERTY_ID, + RuleChainNote.JSON_PROPERTY_X, + RuleChainNote.JSON_PROPERTY_Y, + RuleChainNote.JSON_PROPERTY_WIDTH, + RuleChainNote.JSON_PROPERTY_HEIGHT, + RuleChainNote.JSON_PROPERTY_CONTENT, + RuleChainNote.JSON_PROPERTY_BACKGROUND_COLOR, + RuleChainNote.JSON_PROPERTY_BORDER_COLOR, + RuleChainNote.JSON_PROPERTY_BORDER_WIDTH, + RuleChainNote.JSON_PROPERTY_APPLY_DEFAULT_MARKDOWN_STYLE, + RuleChainNote.JSON_PROPERTY_MARKDOWN_CSS +}) +@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class RuleChainNote { + public static final String JSON_PROPERTY_ID = "id"; + @Nullable + private String id; + + public static final String JSON_PROPERTY_X = "x"; + @Nullable + private Integer x; + + public static final String JSON_PROPERTY_Y = "y"; + @Nullable + private Integer y; + + public static final String JSON_PROPERTY_WIDTH = "width"; + @Nullable + private Integer width; + + public static final String JSON_PROPERTY_HEIGHT = "height"; + @Nullable + private Integer height; + + public static final String JSON_PROPERTY_CONTENT = "content"; + @Nullable + private String content; + + public static final String JSON_PROPERTY_BACKGROUND_COLOR = "backgroundColor"; + @Nullable + private String backgroundColor; + + public static final String JSON_PROPERTY_BORDER_COLOR = "borderColor"; + @Nullable + private String borderColor; + + public static final String JSON_PROPERTY_BORDER_WIDTH = "borderWidth"; + @Nullable + private Integer borderWidth; + + public static final String JSON_PROPERTY_APPLY_DEFAULT_MARKDOWN_STYLE = "applyDefaultMarkdownStyle"; + @Nullable + private Boolean applyDefaultMarkdownStyle; + + public static final String JSON_PROPERTY_MARKDOWN_CSS = "markdownCss"; + @Nullable + private String markdownCss; + + public RuleChainNote() { + } + + public RuleChainNote id(@Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the note on the canvas + * @return id + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@Nullable String id) { + this.id = id; + } + + + public RuleChainNote x(@Nullable Integer x) { + this.x = x; + return this; + } + + /** + * Horizontal position of the note on the canvas, in pixels + * @return x + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_X, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getX() { + return x; + } + + + @JsonProperty(value = JSON_PROPERTY_X, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setX(@Nullable Integer x) { + this.x = x; + } + + + public RuleChainNote y(@Nullable Integer y) { + this.y = y; + return this; + } + + /** + * Vertical position of the note on the canvas, in pixels + * @return y + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_Y, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getY() { + return y; + } + + + @JsonProperty(value = JSON_PROPERTY_Y, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setY(@Nullable Integer y) { + this.y = y; + } + + + public RuleChainNote width(@Nullable Integer width) { + this.width = width; + return this; + } + + /** + * Width of the note, in pixels + * @return width + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_WIDTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getWidth() { + return width; + } + + + @JsonProperty(value = JSON_PROPERTY_WIDTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWidth(@Nullable Integer width) { + this.width = width; + } + + + public RuleChainNote height(@Nullable Integer height) { + this.height = height; + return this; + } + + /** + * Height of the note, in pixels + * @return height + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getHeight() { + return height; + } + + + @JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHeight(@Nullable Integer height) { + this.height = height; + } + + + public RuleChainNote content(@Nullable String content) { + this.content = content; + return this; + } + + /** + * Markdown or HTML content of the note + * @return content + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_CONTENT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getContent() { + return content; + } + + + @JsonProperty(value = JSON_PROPERTY_CONTENT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContent(@Nullable String content) { + this.content = content; + } + + + public RuleChainNote backgroundColor(@Nullable String backgroundColor) { + this.backgroundColor = backgroundColor; + return this; + } + + /** + * Background color of the note in CSS hex format, e.g. '#FFF9C4' + * @return backgroundColor + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_BACKGROUND_COLOR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBackgroundColor() { + return backgroundColor; + } + + + @JsonProperty(value = JSON_PROPERTY_BACKGROUND_COLOR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBackgroundColor(@Nullable String backgroundColor) { + this.backgroundColor = backgroundColor; + } + + + public RuleChainNote borderColor(@Nullable String borderColor) { + this.borderColor = borderColor; + return this; + } + + /** + * Border color of the note in CSS hex format, e.g. '#E6C800' + * @return borderColor + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_BORDER_COLOR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBorderColor() { + return borderColor; + } + + + @JsonProperty(value = JSON_PROPERTY_BORDER_COLOR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBorderColor(@Nullable String borderColor) { + this.borderColor = borderColor; + } + + + public RuleChainNote borderWidth(@Nullable Integer borderWidth) { + this.borderWidth = borderWidth; + return this; + } + + /** + * Border width of the note in pixels + * @return borderWidth + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_BORDER_WIDTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getBorderWidth() { + return borderWidth; + } + + + @JsonProperty(value = JSON_PROPERTY_BORDER_WIDTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBorderWidth(@Nullable Integer borderWidth) { + this.borderWidth = borderWidth; + } + + + public RuleChainNote applyDefaultMarkdownStyle(@Nullable Boolean applyDefaultMarkdownStyle) { + this.applyDefaultMarkdownStyle = applyDefaultMarkdownStyle; + return this; + } + + /** + * Whether to apply the default markdown stylesheet to the note content + * @return applyDefaultMarkdownStyle + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_APPLY_DEFAULT_MARKDOWN_STYLE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getApplyDefaultMarkdownStyle() { + return applyDefaultMarkdownStyle; + } + + + @JsonProperty(value = JSON_PROPERTY_APPLY_DEFAULT_MARKDOWN_STYLE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApplyDefaultMarkdownStyle(@Nullable Boolean applyDefaultMarkdownStyle) { + this.applyDefaultMarkdownStyle = applyDefaultMarkdownStyle; + } + + + public RuleChainNote markdownCss(@Nullable String markdownCss) { + this.markdownCss = markdownCss; + return this; + } + + /** + * Custom CSS styles applied to the note content + * @return markdownCss + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MARKDOWN_CSS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMarkdownCss() { + return markdownCss; + } + + + @JsonProperty(value = JSON_PROPERTY_MARKDOWN_CSS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMarkdownCss(@Nullable String markdownCss) { + this.markdownCss = markdownCss; + } + + + /** + * Return true if this RuleChainNote object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RuleChainNote ruleChainNote = (RuleChainNote) o; + return Objects.equals(this.id, ruleChainNote.id) && + Objects.equals(this.x, ruleChainNote.x) && + Objects.equals(this.y, ruleChainNote.y) && + Objects.equals(this.width, ruleChainNote.width) && + Objects.equals(this.height, ruleChainNote.height) && + Objects.equals(this.content, ruleChainNote.content) && + Objects.equals(this.backgroundColor, ruleChainNote.backgroundColor) && + Objects.equals(this.borderColor, ruleChainNote.borderColor) && + Objects.equals(this.borderWidth, ruleChainNote.borderWidth) && + Objects.equals(this.applyDefaultMarkdownStyle, ruleChainNote.applyDefaultMarkdownStyle) && + Objects.equals(this.markdownCss, ruleChainNote.markdownCss); + } + + @Override + public int hashCode() { + return Objects.hash(id, x, y, width, height, content, backgroundColor, borderColor, borderWidth, applyDefaultMarkdownStyle, markdownCss); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RuleChainNote {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" x: ").append(toIndentedString(x)).append("\n"); + sb.append(" y: ").append(toIndentedString(y)).append("\n"); + sb.append(" width: ").append(toIndentedString(width)).append("\n"); + sb.append(" height: ").append(toIndentedString(height)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" backgroundColor: ").append(toIndentedString(backgroundColor)).append("\n"); + sb.append(" borderColor: ").append(toIndentedString(borderColor)).append("\n"); + sb.append(" borderWidth: ").append(toIndentedString(borderWidth)).append("\n"); + sb.append(" applyDefaultMarkdownStyle: ").append(toIndentedString(applyDefaultMarkdownStyle)).append("\n"); + sb.append(" markdownCss: ").append(toIndentedString(markdownCss)).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 `x` to the URL query string + if (getX() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sx%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getX())))); + } + + // add `y` to the URL query string + if (getY() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getY())))); + } + + // add `width` to the URL query string + if (getWidth() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%swidth%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWidth())))); + } + + // add `height` to the URL query string + if (getHeight() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sheight%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHeight())))); + } + + // add `content` to the URL query string + if (getContent() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%scontent%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getContent())))); + } + + // add `backgroundColor` to the URL query string + if (getBackgroundColor() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sbackgroundColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBackgroundColor())))); + } + + // add `borderColor` to the URL query string + if (getBorderColor() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sborderColor%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBorderColor())))); + } + + // add `borderWidth` to the URL query string + if (getBorderWidth() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sborderWidth%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getBorderWidth())))); + } + + // add `applyDefaultMarkdownStyle` to the URL query string + if (getApplyDefaultMarkdownStyle() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sapplyDefaultMarkdownStyle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getApplyDefaultMarkdownStyle())))); + } + + // add `markdownCss` to the URL query string + if (getMarkdownCss() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smarkdownCss%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMarkdownCss())))); + } + + return joiner.toString(); + } +} +