diff --git a/pe/docs/AiChatModelConfigObject.md b/pe/docs/AiChatModelConfig.md similarity index 77% rename from pe/docs/AiChatModelConfigObject.md rename to pe/docs/AiChatModelConfig.md index 0975f14e..dfd81cf0 100644 --- a/pe/docs/AiChatModelConfigObject.md +++ b/pe/docs/AiChatModelConfig.md @@ -1,13 +1,13 @@ -# AiChatModelConfigObject +# AiChatModelConfig -`org.thingsboard.client.model.AiChatModelConfigObject` +`org.thingsboard.client.model.AiChatModelConfig` ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **modelType** | **AiModelType** | | [optional] [readonly] | +| **modelType** | **AiModelType** | | [optional] | diff --git a/pe/docs/AiModel.md b/pe/docs/AiModel.md index eb882e86..a52cf5c3 100644 --- a/pe/docs/AiModel.md +++ b/pe/docs/AiModel.md @@ -28,7 +28,6 @@ #### AmazonBedrockChatModelConfig *(extends AiModelConfig, provider=`AMAZON_BEDROCK`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AmazonBedrockProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -36,11 +35,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### AnthropicChatModelConfig *(extends AiModelConfig, provider=`ANTHROPIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AnthropicProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -49,11 +48,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### AzureOpenAiChatModelConfig *(extends AiModelConfig, provider=`AZURE_OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AzureOpenAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -63,11 +62,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GitHubModelsChatModelConfig *(extends AiModelConfig, provider=`GITHUB_MODELS`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GitHubModelsProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -77,11 +76,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GoogleAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GoogleAiGeminiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -92,11 +91,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GoogleVertexAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_VERTEX_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GoogleVertexAiGeminiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -107,11 +106,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### MistralAiChatModelConfig *(extends AiModelConfig, provider=`MISTRAL_AI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | MistralAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -121,11 +120,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### OllamaChatModelConfig *(extends AiModelConfig, provider=`OLLAMA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | OllamaProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -135,11 +134,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### OpenAiChatModelConfig *(extends AiModelConfig, provider=`OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | OpenAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -149,19 +148,20 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) -#### AiModelType (enum) -`CHAT` - #### OpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | baseUrl | String | | [optional] | | apiKey | String | | [optional] | +#### AiModelType (enum) +`CHAT` + #### AzureOpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/pe/docs/AiModelConfig.md b/pe/docs/AiModelConfig.md index d561a725..8ddb3f16 100644 --- a/pe/docs/AiModelConfig.md +++ b/pe/docs/AiModelConfig.md @@ -18,7 +18,6 @@ Root configuration for AI models #### AmazonBedrockChatModelConfig *(provider=`AMAZON_BEDROCK`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AmazonBedrockProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -26,11 +25,11 @@ Root configuration for AI models | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### AnthropicChatModelConfig *(provider=`ANTHROPIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AnthropicProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -39,11 +38,11 @@ Root configuration for AI models | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### AzureOpenAiChatModelConfig *(provider=`AZURE_OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AzureOpenAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -53,11 +52,11 @@ Root configuration for AI models | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GitHubModelsChatModelConfig *(provider=`GITHUB_MODELS`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GitHubModelsProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -67,11 +66,11 @@ Root configuration for AI models | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GoogleAiGeminiChatModelConfig *(provider=`GOOGLE_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GoogleAiGeminiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -82,11 +81,11 @@ Root configuration for AI models | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GoogleVertexAiGeminiChatModelConfig *(provider=`GOOGLE_VERTEX_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GoogleVertexAiGeminiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -97,11 +96,11 @@ Root configuration for AI models | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### MistralAiChatModelConfig *(provider=`MISTRAL_AI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | MistralAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -111,11 +110,11 @@ Root configuration for AI models | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### OllamaChatModelConfig *(provider=`OLLAMA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | OllamaProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -125,11 +124,11 @@ Root configuration for AI models | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### OpenAiChatModelConfig *(provider=`OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | OpenAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -139,12 +138,10 @@ Root configuration for AI models | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | ## Referenced Types -#### AiModelType (enum) -`CHAT` - #### AmazonBedrockProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -152,6 +149,9 @@ Root configuration for AI models | accessKeyId | String | | | | secretAccessKey | String | | | +#### AiModelType (enum) +`CHAT` + #### AnthropicProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/pe/docs/AiModelExportData.md b/pe/docs/AiModelExportData.md index 2c940902..a437ef5b 100644 --- a/pe/docs/AiModelExportData.md +++ b/pe/docs/AiModelExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/AlarmCondition.md b/pe/docs/AlarmCondition.md deleted file mode 100644 index 4e979bce..00000000 --- a/pe/docs/AlarmCondition.md +++ /dev/null @@ -1,187 +0,0 @@ - -# AlarmCondition - -`org.thingsboard.client.model.AlarmCondition` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **condition** | **List\** | | [optional] | -| **spec** | **AlarmConditionSpec** | JSON object representing alarm condition type | [optional] | - - - -## Referenced Types - -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| valueType | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | Object | | [optional] | - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* - -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | String | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignoreCase | Boolean | | [optional] | - -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Long | | [optional] | -| userValue | Long | | [optional] | -| dynamicValue | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Integer | | [optional] | -| userValue | Integer | | [optional] | -| dynamicValue | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | String | | [optional] | -| userValue | String | | [optional] | -| dynamicValue | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Double | | [optional] | -| userValue | Double | | [optional] | -| dynamicValue | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Boolean | | [optional] | -| userValue | Boolean | | [optional] | -| dynamicValue | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Long | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Integer | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Double | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Boolean | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/AlarmConditionFilter.md b/pe/docs/AlarmConditionFilter.md deleted file mode 100644 index 7a15a00c..00000000 --- a/pe/docs/AlarmConditionFilter.md +++ /dev/null @@ -1,129 +0,0 @@ - -# AlarmConditionFilter - -`org.thingsboard.client.model.AlarmConditionFilter` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **valueType** | **EntityKeyValueType** | String representation of the type of the value | [optional] | -| **key** | **AlarmConditionFilterKey** | JSON object for specifying alarm condition by specific key | [optional] | -| **predicate** | **KeyFilterPredicate** | JSON object representing filter condition | [optional] | -| **value** | **Object** | | [optional] | - - - -## Referenced Types - -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | String | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignoreCase | Boolean | | [optional] | - -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | String | | [optional] | -| userValue | String | | [optional] | -| dynamicValue | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Double | | [optional] | -| userValue | Double | | [optional] | -| dynamicValue | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Boolean | | [optional] | -| userValue | Boolean | | [optional] | -| dynamicValue | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Double | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Boolean | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/AlarmConditionFilterKey.md b/pe/docs/AlarmConditionFilterKey.md deleted file mode 100644 index 96d2bcab..00000000 --- a/pe/docs/AlarmConditionFilterKey.md +++ /dev/null @@ -1,28 +0,0 @@ - -# AlarmConditionFilterKey - -`org.thingsboard.client.model.AlarmConditionFilterKey` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **type** | **AlarmConditionKeyType** | The key type | [optional] | -| **key** | **String** | String value representing the key | [optional] | - - - -## Referenced Types - -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - ---- - -### 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/AlarmConditionKeyType.md b/pe/docs/AlarmConditionKeyType.md deleted file mode 100644 index 8421ce6c..00000000 --- a/pe/docs/AlarmConditionKeyType.md +++ /dev/null @@ -1,27 +0,0 @@ - -# AlarmConditionKeyType - -`org.thingsboard.client.model.AlarmConditionKeyType` - -## Enum Values - - -* `ATTRIBUTE` (value: `"ATTRIBUTE"`) - -* `TIME_SERIES` (value: `"TIME_SERIES"`) - -* `ENTITY_FIELD` (value: `"ENTITY_FIELD"`) - -* `CONSTANT` (value: `"CONSTANT"`) - - - ---- - -### 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/AlarmConditionSpec.md b/pe/docs/AlarmConditionSpec.md deleted file mode 100644 index 3ea2e49e..00000000 --- a/pe/docs/AlarmConditionSpec.md +++ /dev/null @@ -1,78 +0,0 @@ - -# AlarmConditionSpec - -`org.thingsboard.client.model.AlarmConditionSpec` - -Specification for alarm conditions - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **type** | **String** | | | - - - -## Subtypes - -#### DurationAlarmConditionSpec *(type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(type=`SIMPLE`)* -*(no additional properties)* - -## Referenced Types - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Long | | [optional] | -| userValue | Long | | [optional] | -| dynamicValue | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Integer | | [optional] | -| userValue | Integer | | [optional] | -| dynamicValue | DynamicValueInteger | | [optional] | - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Long | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Integer | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/AlarmRule.md b/pe/docs/AlarmRule.md deleted file mode 100644 index 7efe8caf..00000000 --- a/pe/docs/AlarmRule.md +++ /dev/null @@ -1,234 +0,0 @@ - -# AlarmRule - -`org.thingsboard.client.model.AlarmRule` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **condition** | **AlarmCondition** | JSON object representing the alarm rule condition | [optional] | -| **alarmDetails** | **String** | String value representing the additional details for an alarm rule | [optional] | -| **dashboardId** | **DashboardId** | JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application | [optional] | -| **schedule** | **AlarmSchedule** | JSON object representing time interval during which the rule is active | [optional] | - - - -## Referenced Types - -> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. - -#### AlarmCondition -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | List | | [optional] | -| spec | AlarmConditionSpec | JSON object representing alarm condition type | [optional] | - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamicValue | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* -*See AlarmSchedule for properties.* - -#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| timezone | String | | [optional] | -| items | List | | [optional] | - -#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| daysOfWeek | Set | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | -| timezone | String | | [optional] | - -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| valueType | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | Object | | [optional] | - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | String | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignoreCase | Boolean | | [optional] | - -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dayOfWeek | Integer | | [optional] | -| enabled | Boolean | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | - -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Long | | [optional] | -| userValue | Long | | [optional] | -| dynamicValue | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Integer | | [optional] | -| userValue | Integer | | [optional] | -| dynamicValue | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | String | | [optional] | -| userValue | String | | [optional] | -| dynamicValue | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Double | | [optional] | -| userValue | Double | | [optional] | -| dynamicValue | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Boolean | | [optional] | -| userValue | Boolean | | [optional] | -| dynamicValue | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Long | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Integer | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Double | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Boolean | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [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/AlarmRuleControllerApi.md b/pe/docs/AlarmRuleControllerApi.md new file mode 100644 index 00000000..495d5ae4 --- /dev/null +++ b/pe/docs/AlarmRuleControllerApi.md @@ -0,0 +1,222 @@ +# AlarmRuleControllerApi + +`ThingsboardClient` methods: + +``` +void deleteAlarmRule(@Nonnull String alarmRuleId) // Delete Alarm Rule (deleteAlarmRule) +AlarmRuleDefinition getAlarmRuleById(@Nonnull String alarmRuleId) // Get Alarm Rule (getAlarmRuleById) +PageDataString getAlarmRuleNames(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortOrder) // Get alarm rule names (getAlarmRuleNames) +PageDataAlarmRuleDefinitionInfo getAlarmRules(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable EntityType entityType, @Nullable Set entities, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get alarm rules (getAlarmRules) +PageDataAlarmRuleDefinition getAlarmRulesByEntityId(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get Alarm Rules by Entity Id (getAlarmRulesByEntityId) +com.fasterxml.jackson.databind.JsonNode getLatestAlarmRuleDebugEvent(@Nonnull String alarmRuleId) // Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent) +AlarmRuleDefinition saveAlarmRule(@Nonnull AlarmRuleDefinition alarmRuleDefinition) // Create Or Update Alarm Rule (saveAlarmRule) +com.fasterxml.jackson.databind.JsonNode testAlarmRuleScript(@Nonnull Object body) // Test alarm rule TBEL expression (testAlarmRuleScript) +``` + + +## deleteAlarmRule + +``` +void deleteAlarmRule(@Nonnull String alarmRuleId) +``` + +**DELETE** `/api/alarm/rule/{alarmRuleId}` + +Delete Alarm Rule (deleteAlarmRule) + +Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **alarmRuleId** | **String** | | | + +### Return type + +null (empty response body) + + +## getAlarmRuleById + +``` +AlarmRuleDefinition getAlarmRuleById(@Nonnull String alarmRuleId) +``` + +**GET** `/api/alarm/rule/{alarmRuleId}` + +Get Alarm Rule (getAlarmRuleById) + +Fetch the Alarm Rule object based on the provided Alarm Rule Id. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **alarmRuleId** | **String** | | | + +### Return type + +**AlarmRuleDefinition** + + +## getAlarmRuleNames + +``` +PageDataString getAlarmRuleNames(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortOrder) +``` + +**GET** `/api/alarm/rules/names` + +Get alarm rule names (getAlarmRuleNames) + +Fetch the list of alarm rule names. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pageSize** | **Integer** | Maximum amount of entities in a one page | | +| **page** | **Integer** | Sequence number of page starting from 0 | | +| **textSearch** | **String** | The case insensitive 'substring' filter based on the calculated field name. | [optional] | +| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | + +### Return type + +**PageDataString** + + +## getAlarmRules + +``` +PageDataAlarmRuleDefinitionInfo getAlarmRules(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable EntityType entityType, @Nullable Set entities, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) +``` + +**GET** `/api/alarm/rules` + +Get alarm rules (getAlarmRules) + +Fetch tenant alarm rules based on the filter. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pageSize** | **Integer** | Maximum amount of entities in a one page | | +| **page** | **Integer** | Sequence number of page starting from 0 | | +| **entityType** | **EntityType** | Entity type filter. If not specified, alarm rules for all supported entity types will be returned. | [optional] [enum: TENANT, CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, ALARM, ENTITY_GROUP, CONVERTER, INTEGRATION, RULE_CHAIN, RULE_NODE, SCHEDULER_EVENT, BLOB_ENTITY, REPORT_TEMPLATE, REPORT, ENTITY_VIEW, WIDGETS_BUNDLE, WIDGET_TYPE, ROLE, GROUP_PERMISSION, TENANT_PROFILE, DEVICE_PROFILE, ASSET_PROFILE, API_USAGE_STATE, TB_RESOURCE, OTA_PACKAGE, EDGE, RPC, QUEUE, NOTIFICATION_TARGET, NOTIFICATION_TEMPLATE, NOTIFICATION_REQUEST, NOTIFICATION, NOTIFICATION_RULE, QUEUE_STATS, OAUTH2_CLIENT, DOMAIN, MOBILE_APP, MOBILE_APP_BUNDLE, CALCULATED_FIELD, JOB, SECRET, ADMIN_SETTINGS, AI_MODEL, API_KEY] | +| **entities** | **Set** | Entities filter. If not specified, alarm rules for entity type filter will be returned. | [optional] | +| **textSearch** | **String** | The case insensitive 'substring' filter based on the calculated field name. | [optional] | +| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name] | +| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | + +### Return type + +**PageDataAlarmRuleDefinitionInfo** + + +## getAlarmRulesByEntityId + +``` +PageDataAlarmRuleDefinition getAlarmRulesByEntityId(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) +``` + +**GET** `/api/alarm/rules/{entityType}/{entityId}` + +Get Alarm Rules by Entity Id (getAlarmRulesByEntityId) + +Fetch the Alarm Rules based on the provided Entity Id. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | +| **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **pageSize** | **Integer** | Maximum amount of entities in a one page | | +| **page** | **Integer** | Sequence number of page starting from 0 | | +| **textSearch** | **String** | The case insensitive 'substring' filter based on the calculated field name. | [optional] | +| **sortProperty** | **String** | Property of entity to sort by | [optional] [enum: createdTime, name] | +| **sortOrder** | **String** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | + +### Return type + +**PageDataAlarmRuleDefinition** + + +## getLatestAlarmRuleDebugEvent + +``` +com.fasterxml.jackson.databind.JsonNode getLatestAlarmRuleDebugEvent(@Nonnull String alarmRuleId) +``` + +**GET** `/api/alarm/rule/{alarmRuleId}/debug` + +Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent) + +Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **alarmRuleId** | **String** | | | + +### Return type + +**com.fasterxml.jackson.databind.JsonNode** + + +## saveAlarmRule + +``` +AlarmRuleDefinition saveAlarmRule(@Nonnull AlarmRuleDefinition alarmRuleDefinition) +``` + +**POST** `/api/alarm/rule` + +Create Or Update Alarm Rule (saveAlarmRule) + +Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **alarmRuleDefinition** | **AlarmRuleDefinition** | A JSON value representing the alarm rule. | | + +### Return type + +**AlarmRuleDefinition** + + +## testAlarmRuleScript + +``` +com.fasterxml.jackson.databind.JsonNode testAlarmRuleScript(@Nonnull Object body) +``` + +**POST** `/api/alarm/rule/testScript` + +Test alarm rule TBEL expression (testAlarmRuleScript) + +Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: ```json { \"expression\": \"return temperature > 50;\", \"arguments\": { \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Object** | Test alarm rule TBEL condition expression. The expression must return a boolean value. | | + +### Return type + +**com.fasterxml.jackson.databind.JsonNode** + diff --git a/pe/docs/AlarmRuleDefinitionInfo.md b/pe/docs/AlarmRuleDefinitionInfo.md new file mode 100644 index 00000000..e5a63596 --- /dev/null +++ b/pe/docs/AlarmRuleDefinitionInfo.md @@ -0,0 +1,489 @@ + +# AlarmRuleDefinitionInfo + +`org.thingsboard.client.model.AlarmRuleDefinitionInfo` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **id** | **CalculatedFieldId** | JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error. | [optional] | +| **createdTime** | **Long** | Timestamp of the alarm rule creation, in milliseconds | [optional] [readonly] | +| **tenantId** | **TenantId** | | [optional] | +| **entityId** | **EntityId** | | [optional] | +| **name** | **String** | User defined name of the alarm rule. | [optional] | +| **debugSettings** | **DebugSettings** | Debug settings object. | [optional] | +| **configurationVersion** | **Integer** | Version of alarm rule configuration. | [optional] | +| **_configuration** | **AlarmCalculatedFieldConfiguration** | | | +| **version** | **Long** | | [optional] | +| **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the alarm rule. May include: 'description' (string). | [optional] | +| **entityName** | **String** | | [optional] | +| **debugMode** | **Boolean** | | [optional] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### DebugSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| failuresEnabled | Boolean | Debug failures. | [optional] | +| allEnabled | Boolean | Debug All. Used as a trigger for updating debugAllUntil. | [optional] | +| allEnabledUntil | Long | Timestamp of the end time for the processing debug events. | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) + +#### CalculatedFieldConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| output | Output | | [optional] | +| type | String | | | + +#### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| createRules | Map | | | +| clearRule | AlarmRuleDefinition | | [optional] | +| propagate | Boolean | | [optional] | +| propagateToOwner | Boolean | | [optional] | +| propagateToOwnerHierarchy | Boolean | | [optional] | +| propagateToTenant | Boolean | | [optional] | +| propagateRelationTypes | List | | [optional] | + +#### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| metrics | Map | | | +| interval | AggInterval | | | +| watermark | Watermark | | [optional] | +| produceIntermediateResult | Boolean | | [optional] | + +#### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entityCoordinates | EntityCoordinates | | | +| zoneGroups | Map | | | +| scheduledUpdateEnabled | Boolean | | [optional] | +| scheduledUpdateInterval | Integer | | [optional] | + +#### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | +| relation | RelationPathLevel | | | +| applyExpressionToResolvedArguments | Boolean | | [optional] | + +#### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| relation | RelationPathLevel | | | +| arguments | Map | | | +| deduplicationIntervalInSec | Long | | [optional] | +| metrics | Map | | | +| useLatestTs | Boolean | | [optional] | +| scheduledUpdateInterval | Integer | | [optional] | +| scheduledUpdateEnabled | Boolean | | [optional] | + +#### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | + +#### SimpleCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | +| useLatestTs | Boolean | | [optional] | + +#### Argument +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| refEntityId | EntityId | | [optional] | +| refDynamicSourceConfiguration | CfArgumentDynamicSourceConfiguration | | [optional] | +| refEntityKey | ReferencedEntityKey | | [optional] | +| defaultValue | String | | [optional] | +| limit | Integer | | [optional] | +| timeWindow | Long | | [optional] | + +#### AlarmRuleDefinition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| alarmDetails | String | | [optional] | +| condition | AlarmRuleCondition | | | +| dashboardId | DashboardId | | [optional] | + +#### Output +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| name | String | | [optional] | +| scope | AttributeScope | | [optional] | +| decimalsByDefault | Integer | | [optional] | +| strategy | Object | | [optional] | +| type | String | | | + +#### AttributesOutput *(extends Output, type=`ATTRIBUTES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | AttributesOutputStrategy | | [optional] | + +#### TimeSeriesOutput *(extends Output, type=`TIME_SERIES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | TimeSeriesOutputStrategy | | [optional] | + +#### CfArgumentDynamicSourceConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### CurrentOwnerDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`CURRENT_OWNER`)* +*See CfArgumentDynamicSourceConfiguration for properties.* + +#### RelationPathQueryDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`RELATION_PATH_QUERY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| levels | List | | [optional] | + +#### ReferencedEntityKey +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | +| type | ArgumentType | | [optional] | +| scope | AttributeScope | | [optional] | + +#### AlarmRuleCondition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | AlarmConditionExpression | | | +| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| type | String | | | + +#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | + +#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* +*See AlarmRuleCondition for properties.* + +#### AttributeScope (enum) +`CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` + +#### EntityCoordinates +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| latitudeKeyName | String | | | +| longitudeKeyName | String | | | + +#### ZoneGroupConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| refEntityId | EntityId | | [optional] | +| refDynamicSourceConfiguration | CfArgumentDynamicSourceConfiguration | | [optional] | +| perimeterKeyName | String | | | +| reportStrategy | GeofencingReportStrategy | | | +| createRelationsWithMatchedZones | Boolean | | [optional] | +| relationType | String | | [optional] | +| direction | EntitySearchDirection | | [optional] | + +#### RelationPathLevel +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| direction | EntitySearchDirection | | | +| relationType | String | | | + +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | String | | [optional] | +| input | AggInput | | [optional] | +| defaultValue | Double | | [optional] | + +#### AggInterval +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### CustomInterval *(extends AggInterval, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | +| durationSec | Long | | | + +#### DayInterval *(extends AggInterval, type=`DAY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### HourInterval *(extends AggInterval, type=`HOUR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### MonthInterval *(extends AggInterval, type=`MONTH`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### QuarterInterval *(extends AggInterval, type=`QUARTER`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### WeekInterval *(extends AggInterval, type=`WEEK`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### WeekSunSatInterval *(extends AggInterval, type=`WEEK_SUN_SAT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### YearInterval *(extends AggInterval, type=`YEAR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### Watermark +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | Long | | [optional] | + +#### ArgumentType (enum) +`TS_LATEST` | `ATTRIBUTE` | `TS_ROLLING` + +#### AlarmConditionExpression +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| filters | List | | | +| operation | ComplexOperation | | [optional] | + +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | String | | | + +#### AlarmConditionValueAlarmRuleSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| dynamicValueArgument | String | | [optional] | +| staticValue | AlarmRuleSchedule | | [optional] | + +#### TimeSeriesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### TimeSeriesImmediateOutputStrategy *(extends TimeSeriesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ttl | Long | | [optional] | +| saveTimeSeries | Boolean | | [optional] | +| saveLatest | Boolean | | [optional] | +| sendWsUpdate | Boolean | | [optional] | +| processCfs | Boolean | | [optional] | + +#### TimeSeriesRuleChainOutputStrategy *(extends TimeSeriesOutputStrategy, type=`RULE_CHAIN`)* +*See TimeSeriesOutputStrategy for properties.* + +#### AttributesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AttributesImmediateOutputStrategy *(extends AttributesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| sendAttributesUpdatedNotification | Boolean | | [optional] | +| updateAttributesOnlyOnValueChange | Boolean | | [optional] | +| saveAttribute | Boolean | | [optional] | +| sendWsUpdate | Boolean | | [optional] | +| processCfs | Boolean | | [optional] | + +#### AttributesRuleChainOutputStrategy *(extends AttributesOutputStrategy, type=`RULE_CHAIN`)* +*See AttributesOutputStrategy for properties.* + +#### GeofencingReportStrategy (enum) +`REPORT_TRANSITION_EVENTS_ONLY` | `REPORT_PRESENCE_STATUS_ONLY` | `REPORT_TRANSITION_EVENTS_AND_PRESENCE_STATUS` + +#### EntitySearchDirection (enum) +`FROM` | `TO` + +#### AggFunction (enum) +`MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` + +#### AggInput +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AggFunctionInput *(extends AggInput, type=`function`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | String | | [optional] | + +#### AggKeyInput *(extends AggInput, type=`key`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | + +#### AlarmRuleSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* +*See AlarmRuleSchedule for properties.* + +#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| items | List | | [optional] | +| timezone | String | | [optional] | + +#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| daysOfWeek | Set | | [optional] | +| endsOn | Long | | [optional] | +| startsOn | Long | | [optional] | +| timezone | String | | [optional] | + +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + +#### AlarmConditionValueLong +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Long | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmConditionValueInteger +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Integer | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmRuleConditionFilter +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| argument | String | | | +| operation | ComplexOperation | | [optional] | +| predicates | List | | | +| valueType | EntityKeyValueType | | | + +#### ComplexOperation (enum) +`AND` | `OR` + +#### AlarmRuleKeyFilterPredicate +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | BooleanOperation | | | +| value | AlarmConditionValueBoolean | | | + +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | ComplexOperation | | [optional] | +| predicates | List | | [optional] | + +#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | AlarmConditionValueLong | | | +| unit | TimeUnit | | | + +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | NumericOperation | | | +| value | AlarmConditionValueDouble | | | + +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ignoreCase | Boolean | | [optional] | +| operation | StringOperation | | | +| value | AlarmConditionValueString | | | + +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + +#### AlarmRuleCustomTimeScheduleItem +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| dayOfWeek | Integer | | [optional] | +| enabled | Boolean | | [optional] | +| endsOn | Long | | [optional] | +| startsOn | Long | | [optional] | + +#### StringOperation (enum) +`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` + +#### AlarmConditionValueString +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | String | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### NumericOperation (enum) +`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` + +#### AlarmConditionValueDouble +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Double | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### BooleanOperation (enum) +`EQUAL` | `NOT_EQUAL` + +#### AlarmConditionValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Boolean | | [optional] | +| dynamicValueArgument | String | | [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/AlarmSchedule.md b/pe/docs/AlarmSchedule.md deleted file mode 100644 index 2bffea1f..00000000 --- a/pe/docs/AlarmSchedule.md +++ /dev/null @@ -1,68 +0,0 @@ - -# AlarmSchedule - -`org.thingsboard.client.model.AlarmSchedule` - -Configuration for alarm schedule - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **dynamicValue** | **DynamicValueString** | | [optional] | -| **type** | **AlarmScheduleType** | | [optional] | - - - -## Subtypes - -#### AnyTimeSchedule *(type=`ANY_TIME`)* -*(no additional properties)* - -#### CustomTimeSchedule *(type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| timezone | String | | [optional] | -| items | List | | [optional] | - -#### SpecificTimeSchedule *(type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| daysOfWeek | Set | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | -| timezone | String | | [optional] | - -## Referenced Types - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dayOfWeek | Integer | | [optional] | -| enabled | Boolean | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/AlarmScheduleType.md b/pe/docs/AlarmScheduleType.md deleted file mode 100644 index 5c79434f..00000000 --- a/pe/docs/AlarmScheduleType.md +++ /dev/null @@ -1,25 +0,0 @@ - -# AlarmScheduleType - -`org.thingsboard.client.model.AlarmScheduleType` - -## Enum Values - - -* `ANY_TIME` (value: `"ANY_TIME"`) - -* `SPECIFIC_TIME` (value: `"SPECIFIC_TIME"`) - -* `CUSTOM` (value: `"CUSTOM"`) - - - ---- - -### 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/AmazonBedrockChatModelConfig.md b/pe/docs/AmazonBedrockChatModelConfig.md index f2ad249d..53a5ef34 100644 --- a/pe/docs/AmazonBedrockChatModelConfig.md +++ b/pe/docs/AmazonBedrockChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **modelType** | **AiModelType** | | [optional] [readonly] | | **providerConfig** | **AmazonBedrockProviderConfig** | | | | **modelId** | **String** | | | | **temperature** | **Double** | | [optional] | @@ -17,6 +16,7 @@ | **maxOutputTokens** | **Integer** | | [optional] | | **timeoutSeconds** | **Integer** | | [optional] | | **maxRetries** | **Integer** | | [optional] | +| **modelType** | **AiModelType** | | [optional] [readonly] | @@ -27,9 +27,6 @@ |------|------|-------------|-------| | provider | String | | | -#### AiModelType (enum) -`CHAT` - #### AmazonBedrockProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -37,6 +34,9 @@ | accessKeyId | String | | | | secretAccessKey | String | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions diff --git a/pe/docs/AnthropicChatModelConfig.md b/pe/docs/AnthropicChatModelConfig.md index 399cccf3..75f7f106 100644 --- a/pe/docs/AnthropicChatModelConfig.md +++ b/pe/docs/AnthropicChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **modelType** | **AiModelType** | | [optional] [readonly] | | **providerConfig** | **AnthropicProviderConfig** | | | | **modelId** | **String** | | | | **temperature** | **Double** | | [optional] | @@ -18,6 +17,7 @@ | **maxOutputTokens** | **Integer** | | [optional] | | **timeoutSeconds** | **Integer** | | [optional] | | **maxRetries** | **Integer** | | [optional] | +| **modelType** | **AiModelType** | | [optional] [readonly] | @@ -28,14 +28,14 @@ |------|------|-------------|-------| | provider | String | | | -#### AiModelType (enum) -`CHAT` - #### AnthropicProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | apiKey | String | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions diff --git a/pe/docs/AnyTimeSchedule.md b/pe/docs/AnyTimeSchedule.md deleted file mode 100644 index 47de8d5d..00000000 --- a/pe/docs/AnyTimeSchedule.md +++ /dev/null @@ -1,45 +0,0 @@ - -# AnyTimeSchedule - -`org.thingsboard.client.model.AnyTimeSchedule` - -**Extends:** **AlarmSchedule** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - -## Referenced Types - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamicValue | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/AssetExportData.md b/pe/docs/AssetExportData.md index 1dd51863..164afc34 100644 --- a/pe/docs/AssetExportData.md +++ b/pe/docs/AssetExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/AssetProfileExportData.md b/pe/docs/AssetProfileExportData.md index 951cc29f..e0e56ce6 100644 --- a/pe/docs/AssetProfileExportData.md +++ b/pe/docs/AssetProfileExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/AssetProfileInfo.md b/pe/docs/AssetProfileInfo.md index beb4693b..350f0870 100644 --- a/pe/docs/AssetProfileInfo.md +++ b/pe/docs/AssetProfileInfo.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **EntityId** | JSON object with the entity Id. | [optional] | +| **id** | **AssetProfileId** | JSON object with the Asset Profile Id. | [optional] | | **name** | **String** | Entity Name | [optional] | | **image** | **String** | Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. | [optional] | | **defaultDashboardId** | **DashboardId** | Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to asset details. | [optional] | diff --git a/pe/docs/AzureOpenAiChatModelConfig.md b/pe/docs/AzureOpenAiChatModelConfig.md index 1a3b3cba..cbe4e78a 100644 --- a/pe/docs/AzureOpenAiChatModelConfig.md +++ b/pe/docs/AzureOpenAiChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **modelType** | **AiModelType** | | [optional] [readonly] | | **providerConfig** | **AzureOpenAiProviderConfig** | | | | **modelId** | **String** | | | | **temperature** | **Double** | | [optional] | @@ -19,6 +18,7 @@ | **maxOutputTokens** | **Integer** | | [optional] | | **timeoutSeconds** | **Integer** | | [optional] | | **maxRetries** | **Integer** | | [optional] | +| **modelType** | **AiModelType** | | [optional] [readonly] | @@ -29,9 +29,6 @@ |------|------|-------------|-------| | provider | String | | | -#### AiModelType (enum) -`CHAT` - #### AzureOpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -39,6 +36,9 @@ | serviceVersion | String | | [optional] | | apiKey | String | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions diff --git a/pe/docs/ConverterExportData.md b/pe/docs/ConverterExportData.md index f5330ff7..8244a1f6 100644 --- a/pe/docs/ConverterExportData.md +++ b/pe/docs/ConverterExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/CustomMenuConfig.md b/pe/docs/CustomMenuConfig.md index 0e9da727..a8b1e3b7 100644 --- a/pe/docs/CustomMenuConfig.md +++ b/pe/docs/CustomMenuConfig.md @@ -3,8 +3,6 @@ `org.thingsboard.client.model.CustomMenuConfig` -A JSON value representing the custom menu configuration - ## Properties | Name | Type | Description | Notes | diff --git a/pe/docs/CustomMenuControllerApi.md b/pe/docs/CustomMenuControllerApi.md index d3d368c2..bbffe21d 100644 --- a/pe/docs/CustomMenuControllerApi.md +++ b/pe/docs/CustomMenuControllerApi.md @@ -5,7 +5,7 @@ ``` CustomMenu createCustomMenu(@Nonnull CustomMenuInfo customMenuInfo, @Nullable List assignToList, @Nullable Boolean force) // Create Custom Menu (createCustomMenu) CustomMenuDeleteResult deleteCustomMenu(@Nonnull UUID customMenuId, @Nullable Boolean force) // Delete custom menu (deleteCustomMenu) -void getCustomMenu(@Nullable String ifNoneMatch) // Get end-user Custom Menu configuration (getCustomMenu) +CustomMenuConfig getCustomMenu(@Nullable String ifNoneMatch) // Get end-user Custom Menu configuration (getCustomMenu) List getCustomMenuAssigneeList(@Nonnull UUID customMenuId) // Get Custom Menu assignee list (getCustomMenuAssigneeList) CustomMenuConfig getCustomMenuConfig(@Nonnull UUID customMenuId) // Get Custom Menu configuration by id (getCustomMenuConfig) CustomMenuInfo getCustomMenuInfoById(@Nonnull UUID customMenuId) // Get Custom Menu Info (getCustomMenuInfoById) @@ -70,7 +70,7 @@ Deletes the custom menu based on the provided Custom Menu Id. Referencing non-ex ## getCustomMenu ``` -void getCustomMenu(@Nullable String ifNoneMatch) +CustomMenuConfig getCustomMenu(@Nullable String ifNoneMatch) ``` **GET** `/api/customMenu` @@ -88,7 +88,7 @@ Fetch the Custom Menu configuration object for the authorized user. The custom m ### Return type -null (empty response body) +**CustomMenuConfig** ## getCustomMenuAssigneeList diff --git a/pe/docs/CustomTimeSchedule.md b/pe/docs/CustomTimeSchedule.md deleted file mode 100644 index 81433492..00000000 --- a/pe/docs/CustomTimeSchedule.md +++ /dev/null @@ -1,55 +0,0 @@ - -# CustomTimeSchedule - -`org.thingsboard.client.model.CustomTimeSchedule` - -**Extends:** **AlarmSchedule** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **timezone** | **String** | | [optional] | -| **items** | **List\** | | [optional] | - - - -## Referenced Types - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamicValue | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dayOfWeek | Integer | | [optional] | -| enabled | Boolean | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/Customer.md b/pe/docs/Customer.md index 10f217be..ad40aa7b 100644 --- a/pe/docs/Customer.md +++ b/pe/docs/Customer.md @@ -17,7 +17,7 @@ | **address2** | **String** | Address Line 2 | [optional] | | **zip** | **String** | Zip code | [optional] | | **phone** | **String** | Phone number | [optional] | -| **email** | **String** | Email | | +| **email** | **String** | Email | [optional] | | **title** | **String** | Title of the customer | | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] | | **parentCustomerId** | **CustomerId** | JSON object with parent Customer Id | [optional] | diff --git a/pe/docs/CustomerExportData.md b/pe/docs/CustomerExportData.md index 2d3ce8aa..e8684627 100644 --- a/pe/docs/CustomerExportData.md +++ b/pe/docs/CustomerExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/CustomerInfo.md b/pe/docs/CustomerInfo.md index f50666e5..b1db65cc 100644 --- a/pe/docs/CustomerInfo.md +++ b/pe/docs/CustomerInfo.md @@ -17,7 +17,7 @@ | **address2** | **String** | Address Line 2 | [optional] | | **zip** | **String** | Zip code | [optional] | | **phone** | **String** | Phone number | [optional] | -| **email** | **String** | Email | | +| **email** | **String** | Email | [optional] | | **title** | **String** | Title of the customer | | | **tenantId** | **TenantId** | JSON object with Tenant Id | [optional] | | **parentCustomerId** | **CustomerId** | JSON object with parent Customer Id | [optional] | diff --git a/pe/docs/Dashboard.md b/pe/docs/Dashboard.md index 72f2c622..65f03ac1 100644 --- a/pe/docs/Dashboard.md +++ b/pe/docs/Dashboard.md @@ -33,7 +33,7 @@ |------|------|-------------|-------| | customerId | CustomerId | JSON object with the customer Id. | [optional] | | title | String | Title of the customer. | [optional] | -| isPublic | Boolean | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | +| _public | Boolean | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | #### ResourceExportData | Name | Type | Description | Notes | diff --git a/pe/docs/DashboardControllerApi.md b/pe/docs/DashboardControllerApi.md index 26a02a90..811c9785 100644 --- a/pe/docs/DashboardControllerApi.md +++ b/pe/docs/DashboardControllerApi.md @@ -8,11 +8,11 @@ List exportGroupDashboards(@Nonnull String entityGroupId, @Nonnull In PageDataDashboardInfo getAllDashboards(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable Boolean includeCustomers, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get All Dashboards for current user (getAllDashboards) PageDataDashboardInfo getCustomerDashboards(@Nonnull String customerId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable Boolean includeCustomers, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get Customer Dashboards (getCustomerDashboards) HomeDashboardInfo getCustomerHomeDashboardInfo() // Get Customer Home Dashboard Info (getCustomerHomeDashboardInfo) -void getDashboardById(@Nonnull String dashboardId, @Nullable Boolean includeResources, @Nullable String acceptEncoding) // Get Dashboard (getDashboardById) +Dashboard getDashboardById(@Nonnull String dashboardId, @Nullable Boolean includeResources, @Nullable String acceptEncoding) // Get Dashboard (getDashboardById) DashboardInfo getDashboardInfoById(@Nonnull String dashboardId) // Get Dashboard Info (getDashboardInfoById) PageDataDashboardInfo getDashboardsByEntityGroupId(@Nonnull String entityGroupId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) // Get dashboards by Entity Group Id (getDashboardsByEntityGroupId) List getDashboardsByIds(@Nonnull List dashboardIds) // Get dashboards by Dashboard Ids (getDashboardsByIds) -void getHomeDashboard(@Nullable String acceptEncoding) // Get Home Dashboard (getHomeDashboard) +HomeDashboard getHomeDashboard(@Nullable String acceptEncoding) // Get Home Dashboard (getHomeDashboard) HomeDashboardInfo getHomeDashboardInfo() // Get Home Dashboard Info (getHomeDashboardInfo) Long getMaxDatapointsLimit() // Get max data points limit (getMaxDatapointsLimit) Long getServerTime() // Get server time (getServerTime) @@ -156,7 +156,7 @@ Returns the home dashboard info object that is configured as 'homeDashboardId' p ## getDashboardById ``` -void getDashboardById(@Nonnull String dashboardId, @Nullable Boolean includeResources, @Nullable String acceptEncoding) +Dashboard getDashboardById(@Nonnull String dashboardId, @Nullable Boolean includeResources, @Nullable String acceptEncoding) ``` **GET** `/api/dashboard/{dashboardId}` @@ -176,7 +176,7 @@ Get the dashboard based on 'dashboardId' parameter. The Dashboard object is a he ### Return type -null (empty response body) +**Dashboard** ## getDashboardInfoById @@ -259,7 +259,7 @@ Returns a list of DashboardInfo objects based on the provided ids. Filters the l ## getHomeDashboard ``` -void getHomeDashboard(@Nullable String acceptEncoding) +HomeDashboard getHomeDashboard(@Nullable String acceptEncoding) ``` **GET** `/api/dashboard/home` @@ -277,7 +277,7 @@ Returns the home dashboard object that is configured as 'homeDashboardId' parame ### Return type -null (empty response body) +**HomeDashboard** ## getHomeDashboardInfo diff --git a/pe/docs/DashboardExportData.md b/pe/docs/DashboardExportData.md index c2d19ff3..5d04d48b 100644 --- a/pe/docs/DashboardExportData.md +++ b/pe/docs/DashboardExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/DashboardInfo.md b/pe/docs/DashboardInfo.md index b4e944d7..7a273b2d 100644 --- a/pe/docs/DashboardInfo.md +++ b/pe/docs/DashboardInfo.md @@ -35,7 +35,7 @@ |------|------|-------------|-------| | customerId | CustomerId | JSON object with the customer Id. | [optional] | | title | String | Title of the customer. | [optional] | -| isPublic | Boolean | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | +| _public | Boolean | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | #### ResourceExportData | Name | Type | Description | Notes | diff --git a/pe/docs/Device.md b/pe/docs/Device.md index 3822df6e..2087460f 100644 --- a/pe/docs/Device.md +++ b/pe/docs/Device.md @@ -15,7 +15,7 @@ | **name** | **String** | Unique Device Name in scope of Tenant | [optional] | | **type** | **String** | Device Profile Name | [optional] | | **label** | **String** | Label that may be used in widgets | [optional] | -| **deviceProfileId** | **DeviceProfileId** | JSON object with Device Profile Id. | | +| **deviceProfileId** | **DeviceProfileId** | JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. | [optional] | | **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | | **firmwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | | **softwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | diff --git a/pe/docs/DeviceExportData.md b/pe/docs/DeviceExportData.md index 65257840..90ebf16d 100644 --- a/pe/docs/DeviceExportData.md +++ b/pe/docs/DeviceExportData.md @@ -40,8 +40,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/DeviceInfo.md b/pe/docs/DeviceInfo.md index 482e278a..dd83152f 100644 --- a/pe/docs/DeviceInfo.md +++ b/pe/docs/DeviceInfo.md @@ -15,7 +15,7 @@ | **name** | **String** | Unique Device Name in scope of Tenant | [optional] | | **type** | **String** | Device Profile Name | [optional] | | **label** | **String** | Label that may be used in widgets | [optional] | -| **deviceProfileId** | **DeviceProfileId** | JSON object with Device Profile Id. | | +| **deviceProfileId** | **DeviceProfileId** | JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. | [optional] | | **deviceData** | **DeviceData** | JSON object with content specific to type of transport in the device profile. | [optional] | | **firmwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | | **softwareId** | **OtaPackageId** | JSON object with Ota Package Id. | [optional] | diff --git a/pe/docs/DeviceProfile.md b/pe/docs/DeviceProfile.md index 24bdd44f..6ab5d53b 100644 --- a/pe/docs/DeviceProfile.md +++ b/pe/docs/DeviceProfile.md @@ -50,7 +50,6 @@ A JSON value representing the device profile. | _configuration | DeviceProfileConfiguration | JSON object of device profile configuration | [optional] | | transportConfiguration | DeviceProfileTransportConfiguration | JSON object of device profile transport configuration | [optional] | | provisionConfiguration | DeviceProfileProvisionConfiguration | JSON object of provisioning strategy type per device profile | [optional] | -| alarms | List | | [optional] | #### DeviceProfileConfiguration | Name | Type | Description | Notes | @@ -121,30 +120,9 @@ A JSON value representing the device profile. | certificateRegExPattern | String | | [optional] | | allowCreateNewDevicesByX509Certificate | Boolean | | [optional] | -#### DeviceProfileAlarm -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | String | String value representing the alarm rule id | [optional] | -| alarmType | String | String value representing type of the alarm | [optional] | -| createRules | Map | Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details | [optional] | -| clearRule | AlarmRule | JSON object representing clear alarm rule | [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] | -| propagateToTenant | Boolean | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | -| propagateRelationTypes | List | JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored. | [optional] | - #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) -#### AlarmRule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | AlarmCondition | JSON object representing the alarm rule condition | [optional] | -| alarmDetails | String | String value representing the additional details for an alarm rule | [optional] | -| dashboardId | DashboardId | JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application | [optional] | -| schedule | AlarmSchedule | JSON object representing time interval during which the rule is active | [optional] | - #### TransportPayloadTypeConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -247,35 +225,6 @@ A JSON value representing the device profile. |------|------|-------------|-------| | mappings | List | | [optional] | -#### AlarmCondition -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | List | | [optional] | -| spec | AlarmConditionSpec | JSON object representing alarm condition type | [optional] | - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamicValue | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* -*See AlarmSchedule for properties.* - -#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| timezone | String | | [optional] | -| items | List | | [optional] | - -#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| daysOfWeek | Set | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | -| timezone | String | | [optional] | - #### ObjectAttributes | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -301,44 +250,6 @@ A JSON value representing the device profile. #### SnmpCommunicationSpec (enum) `TELEMETRY_QUERYING` | `CLIENT_ATTRIBUTES_QUERYING` | `SHARED_ATTRIBUTES_SETTING` | `TO_DEVICE_RPC_REQUEST` | `TO_SERVER_RPC_REQUEST` -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| valueType | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | Object | | [optional] | - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - #### LwM2mVersion | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -351,144 +262,9 @@ A JSON value representing the device profile. | key | String | | [optional] | | dataType | DataType | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | String | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignoreCase | Boolean | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dayOfWeek | Integer | | [optional] | -| enabled | Boolean | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | - #### DataType (enum) `BOOLEAN` | `LONG` | `DOUBLE` | `STRING` | `JSON` -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Long | | [optional] | -| userValue | Long | | [optional] | -| dynamicValue | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Integer | | [optional] | -| userValue | Integer | | [optional] | -| dynamicValue | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | String | | [optional] | -| userValue | String | | [optional] | -| dynamicValue | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Double | | [optional] | -| userValue | Double | | [optional] | -| dynamicValue | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Boolean | | [optional] | -| userValue | Boolean | | [optional] | -| dynamicValue | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Long | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Integer | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Double | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Boolean | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - --- ### Conventions diff --git a/pe/docs/DeviceProfileAlarm.md b/pe/docs/DeviceProfileAlarm.md deleted file mode 100644 index 183dd151..00000000 --- a/pe/docs/DeviceProfileAlarm.md +++ /dev/null @@ -1,247 +0,0 @@ - -# DeviceProfileAlarm - -`org.thingsboard.client.model.DeviceProfileAlarm` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **id** | **String** | String value representing the alarm rule id | [optional] | -| **alarmType** | **String** | String value representing type of the alarm | [optional] | -| **createRules** | **Map\** | Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details | [optional] | -| **clearRule** | **AlarmRule** | JSON object representing clear alarm rule | [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] | -| **propagateToTenant** | **Boolean** | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | -| **propagateRelationTypes** | **List\** | JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored. | [optional] | - - - -## Referenced Types - -> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. - -#### AlarmRule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | AlarmCondition | JSON object representing the alarm rule condition | [optional] | -| alarmDetails | String | String value representing the additional details for an alarm rule | [optional] | -| dashboardId | DashboardId | JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application | [optional] | -| schedule | AlarmSchedule | JSON object representing time interval during which the rule is active | [optional] | - -#### AlarmCondition -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | List | | [optional] | -| spec | AlarmConditionSpec | JSON object representing alarm condition type | [optional] | - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamicValue | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* -*See AlarmSchedule for properties.* - -#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| timezone | String | | [optional] | -| items | List | | [optional] | - -#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| daysOfWeek | Set | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | -| timezone | String | | [optional] | - -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| valueType | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | Object | | [optional] | - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | String | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignoreCase | Boolean | | [optional] | - -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dayOfWeek | Integer | | [optional] | -| enabled | Boolean | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | - -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Long | | [optional] | -| userValue | Long | | [optional] | -| dynamicValue | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Integer | | [optional] | -| userValue | Integer | | [optional] | -| dynamicValue | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | String | | [optional] | -| userValue | String | | [optional] | -| dynamicValue | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Double | | [optional] | -| userValue | Double | | [optional] | -| dynamicValue | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Boolean | | [optional] | -| userValue | Boolean | | [optional] | -| dynamicValue | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Long | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Integer | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Double | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Boolean | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [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/DeviceProfileControllerApi.md b/pe/docs/DeviceProfileControllerApi.md index e4345170..3040c232 100644 --- a/pe/docs/DeviceProfileControllerApi.md +++ b/pe/docs/DeviceProfileControllerApi.md @@ -271,7 +271,7 @@ DeviceProfile saveDeviceProfile(@Nonnull DeviceProfile deviceProfile) Create Or Update Device Profile (saveDeviceProfile) -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. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device 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. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"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}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\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}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means 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: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'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). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key 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: ## Alarm Filter Key Filter 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: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides 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: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter 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. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` 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 device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note 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. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default 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. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. +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. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains 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. ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"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}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\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}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration:# Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default 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. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. ### Parameters diff --git a/pe/docs/DeviceProfileData.md b/pe/docs/DeviceProfileData.md index ec98d237..1cd7c923 100644 --- a/pe/docs/DeviceProfileData.md +++ b/pe/docs/DeviceProfileData.md @@ -10,14 +10,11 @@ | **_configuration** | **DeviceProfileConfiguration** | JSON object of device profile configuration | [optional] | | **transportConfiguration** | **DeviceProfileTransportConfiguration** | JSON object of device profile transport configuration | [optional] | | **provisionConfiguration** | **DeviceProfileProvisionConfiguration** | JSON object of provisioning strategy type per device profile | [optional] | -| **alarms** | **List\** | | [optional] | ## Referenced Types -> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. - #### DeviceProfileConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -87,27 +84,6 @@ | certificateRegExPattern | String | | [optional] | | allowCreateNewDevicesByX509Certificate | Boolean | | [optional] | -#### DeviceProfileAlarm -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | String | String value representing the alarm rule id | [optional] | -| alarmType | String | String value representing type of the alarm | [optional] | -| createRules | Map | Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details | [optional] | -| clearRule | AlarmRule | JSON object representing clear alarm rule | [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] | -| propagateToTenant | Boolean | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | -| propagateRelationTypes | List | JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored. | [optional] | - -#### AlarmRule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | AlarmCondition | JSON object representing the alarm rule condition | [optional] | -| alarmDetails | String | String value representing the additional details for an alarm rule | [optional] | -| dashboardId | DashboardId | JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application | [optional] | -| schedule | AlarmSchedule | JSON object representing time interval during which the rule is active | [optional] | - #### TransportPayloadTypeConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -210,35 +186,6 @@ |------|------|-------------|-------| | mappings | List | | [optional] | -#### AlarmCondition -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | List | | [optional] | -| spec | AlarmConditionSpec | JSON object representing alarm condition type | [optional] | - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamicValue | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* -*See AlarmSchedule for properties.* - -#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| timezone | String | | [optional] | -| items | List | | [optional] | - -#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| daysOfWeek | Set | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | -| timezone | String | | [optional] | - #### ObjectAttributes | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -264,44 +211,6 @@ #### SnmpCommunicationSpec (enum) `TELEMETRY_QUERYING` | `CLIENT_ATTRIBUTES_QUERYING` | `SHARED_ATTRIBUTES_SETTING` | `TO_DEVICE_RPC_REQUEST` | `TO_SERVER_RPC_REQUEST` -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| valueType | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | Object | | [optional] | - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - #### LwM2mVersion | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -314,147 +223,9 @@ | key | String | | [optional] | | dataType | DataType | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | String | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignoreCase | Boolean | | [optional] | - -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dayOfWeek | Integer | | [optional] | -| enabled | Boolean | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | - #### DataType (enum) `BOOLEAN` | `LONG` | `DOUBLE` | `STRING` | `JSON` -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Long | | [optional] | -| userValue | Long | | [optional] | -| dynamicValue | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Integer | | [optional] | -| userValue | Integer | | [optional] | -| dynamicValue | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | String | | [optional] | -| userValue | String | | [optional] | -| dynamicValue | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Double | | [optional] | -| userValue | Double | | [optional] | -| dynamicValue | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Boolean | | [optional] | -| userValue | Boolean | | [optional] | -| dynamicValue | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Long | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Integer | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Double | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Boolean | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - --- ### Conventions diff --git a/pe/docs/DeviceProfileExportData.md b/pe/docs/DeviceProfileExportData.md index 4950142d..53de7d78 100644 --- a/pe/docs/DeviceProfileExportData.md +++ b/pe/docs/DeviceProfileExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/DeviceProfileInfo.md b/pe/docs/DeviceProfileInfo.md index 2acda0d0..17b06d3b 100644 --- a/pe/docs/DeviceProfileInfo.md +++ b/pe/docs/DeviceProfileInfo.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | **EntityId** | JSON object with the entity Id. | [optional] | +| **id** | **DeviceProfileId** | JSON object with the Device Profile Id. | [optional] | | **name** | **String** | Entity Name | [optional] | | **image** | **String** | Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. | [optional] | | **defaultDashboardId** | **DashboardId** | Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details. | [optional] | diff --git a/pe/docs/DurationAlarmConditionSpec.md b/pe/docs/DurationAlarmConditionSpec.md deleted file mode 100644 index abe77bf3..00000000 --- a/pe/docs/DurationAlarmConditionSpec.md +++ /dev/null @@ -1,55 +0,0 @@ - -# DurationAlarmConditionSpec - -`org.thingsboard.client.model.DurationAlarmConditionSpec` - -Duration Alarm Condition Specification - -**Extends:** **AlarmConditionSpec** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **unit** | **TimeUnit** | Duration time unit | [optional] | -| **predicate** | **FilterPredicateValueLong** | Duration predicate | [optional] | - - - -## Referenced Types - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Long | | [optional] | -| userValue | Long | | [optional] | -| dynamicValue | DynamicValueLong | | [optional] | - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Long | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/DynamicValueInteger.md b/pe/docs/DynamicValueInteger.md deleted file mode 100644 index af03b207..00000000 --- a/pe/docs/DynamicValueInteger.md +++ /dev/null @@ -1,30 +0,0 @@ - -# DynamicValueInteger - -`org.thingsboard.client.model.DynamicValueInteger` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **resolvedValue** | **Integer** | | [optional] | -| **sourceType** | **DynamicValueSourceType** | | [optional] | -| **sourceAttribute** | **String** | | [optional] | -| **inherit** | **Boolean** | | [optional] | - - - -## Referenced Types - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/DynamicValueLong.md b/pe/docs/DynamicValueLong.md deleted file mode 100644 index 2e840ed3..00000000 --- a/pe/docs/DynamicValueLong.md +++ /dev/null @@ -1,30 +0,0 @@ - -# DynamicValueLong - -`org.thingsboard.client.model.DynamicValueLong` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **resolvedValue** | **Long** | | [optional] | -| **sourceType** | **DynamicValueSourceType** | | [optional] | -| **sourceAttribute** | **String** | | [optional] | -| **inherit** | **Boolean** | | [optional] | - - - -## Referenced Types - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/EntityDataDiff.md b/pe/docs/EntityDataDiff.md index c3e02749..0f4c5a73 100644 --- a/pe/docs/EntityDataDiff.md +++ b/pe/docs/EntityDataDiff.md @@ -105,8 +105,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -248,6 +250,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] | #### GroupPermission | Name | Type | Description | Notes | @@ -331,6 +334,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] | + #### OtaPackageType (enum) `FIRMWARE` | `SOFTWARE` diff --git a/pe/docs/EntityExportData.md b/pe/docs/EntityExportData.md index b7528c69..c063e684 100644 --- a/pe/docs/EntityExportData.md +++ b/pe/docs/EntityExportData.md @@ -103,8 +103,10 @@ Base export container for ThingsBoard entities #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -189,6 +191,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` | `FROM_ENTITY_GROUP` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` @@ -313,6 +316,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/pe/docs/CustomTimeScheduleItem.md b/pe/docs/EntityExportSettings.md similarity index 52% rename from pe/docs/CustomTimeScheduleItem.md rename to pe/docs/EntityExportSettings.md index fd5eb778..f0951236 100644 --- a/pe/docs/CustomTimeScheduleItem.md +++ b/pe/docs/EntityExportSettings.md @@ -1,16 +1,18 @@ -# CustomTimeScheduleItem +# EntityExportSettings -`org.thingsboard.client.model.CustomTimeScheduleItem` +`org.thingsboard.client.model.EntityExportSettings` ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **dayOfWeek** | **Integer** | | [optional] | -| **enabled** | **Boolean** | | [optional] | -| **endsOn** | **Long** | | [optional] | -| **startsOn** | **Long** | | [optional] | +| **exportRelations** | **Boolean** | | [optional] | +| **exportAttributes** | **Boolean** | | [optional] | +| **exportCredentials** | **Boolean** | | [optional] | +| **exportCalculatedFields** | **Boolean** | | [optional] | +| **exportPermissions** | **Boolean** | | [optional] | +| **exportGroupEntities** | **Boolean** | | [optional] | diff --git a/pe/docs/EntityGroupExportData.md b/pe/docs/EntityGroupExportData.md index b71a64df..4c9f274a 100644 --- a/pe/docs/EntityGroupExportData.md +++ b/pe/docs/EntityGroupExportData.md @@ -54,8 +54,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/EntityGroupInfo.md b/pe/docs/EntityGroupInfo.md index 23f8780c..3d53b2d4 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\** | | [optional] | | **edgeGroupAll** | **Boolean** | Indicates special edge group 'All' that contains all entities and can't be deleted. | [optional] [readonly] | | **groupAll** | **Boolean** | Indicates special group 'All' that contains all entities and can't be deleted. | [optional] | | **tenantId** | **TenantId** | | [optional] | @@ -78,12 +78,6 @@ > **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. -#### EntityGroupInfoOwnerIdsInner -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| entityType | EntityType | | | -| id | UUID | ID of the entity, time-based UUID v1 | | - #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) diff --git a/pe/docs/EntityGroupInfoOwnerIdsInner.md b/pe/docs/EntityGroupInfoOwnerIdsInner.md deleted file mode 100644 index 55ce79ff..00000000 --- a/pe/docs/EntityGroupInfoOwnerIdsInner.md +++ /dev/null @@ -1,28 +0,0 @@ - -# EntityGroupInfoOwnerIdsInner - -`org.thingsboard.client.model.EntityGroupInfoOwnerIdsInner` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **entityType** | **EntityType** | | | -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | - - - -## Referenced Types - -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) - ---- - -### Conventions - -- **Package:** `org.thingsboard.client.model` -- **Getter pattern:** `get()` — 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/EntityViewExportData.md b/pe/docs/EntityViewExportData.md index cfe36307..bca570f4 100644 --- a/pe/docs/EntityViewExportData.md +++ b/pe/docs/EntityViewExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/ExportableEntity.md b/pe/docs/ExportableEntity.md index 57c0d28e..47a80cbb 100644 --- a/pe/docs/ExportableEntity.md +++ b/pe/docs/ExportableEntity.md @@ -7,8 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **createdTime** | **Long** | | [optional] | | **id** | **EntityId** | | [optional] | | **name** | **String** | | [optional] | +| **tenantId** | **TenantId** | | [optional] | diff --git a/pe/docs/FilterPredicateValueInteger.md b/pe/docs/FilterPredicateValueInteger.md deleted file mode 100644 index bd34e899..00000000 --- a/pe/docs/FilterPredicateValueInteger.md +++ /dev/null @@ -1,37 +0,0 @@ - -# FilterPredicateValueInteger - -`org.thingsboard.client.model.FilterPredicateValueInteger` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **defaultValue** | **Integer** | | [optional] | -| **userValue** | **Integer** | | [optional] | -| **dynamicValue** | **DynamicValueInteger** | | [optional] | - - - -## Referenced Types - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Integer | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/FilterPredicateValueLong.md b/pe/docs/FilterPredicateValueLong.md deleted file mode 100644 index 8230d119..00000000 --- a/pe/docs/FilterPredicateValueLong.md +++ /dev/null @@ -1,37 +0,0 @@ - -# FilterPredicateValueLong - -`org.thingsboard.client.model.FilterPredicateValueLong` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **defaultValue** | **Long** | | [optional] | -| **userValue** | **Long** | | [optional] | -| **dynamicValue** | **DynamicValueLong** | | [optional] | - - - -## Referenced Types - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Long | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/GitHubModelsChatModelConfig.md b/pe/docs/GitHubModelsChatModelConfig.md index 8b628fa5..72c7cc5c 100644 --- a/pe/docs/GitHubModelsChatModelConfig.md +++ b/pe/docs/GitHubModelsChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **modelType** | **AiModelType** | | [optional] [readonly] | | **providerConfig** | **GitHubModelsProviderConfig** | | | | **modelId** | **String** | | | | **temperature** | **Double** | | [optional] | @@ -19,6 +18,7 @@ | **maxOutputTokens** | **Integer** | | [optional] | | **timeoutSeconds** | **Integer** | | [optional] | | **maxRetries** | **Integer** | | [optional] | +| **modelType** | **AiModelType** | | [optional] [readonly] | @@ -29,14 +29,14 @@ |------|------|-------------|-------| | provider | String | | | -#### AiModelType (enum) -`CHAT` - #### GitHubModelsProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | personalAccessToken | String | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions diff --git a/pe/docs/GoogleAiGeminiChatModelConfig.md b/pe/docs/GoogleAiGeminiChatModelConfig.md index 15cc3f67..c84f2b3a 100644 --- a/pe/docs/GoogleAiGeminiChatModelConfig.md +++ b/pe/docs/GoogleAiGeminiChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **modelType** | **AiModelType** | | [optional] [readonly] | | **providerConfig** | **GoogleAiGeminiProviderConfig** | | | | **modelId** | **String** | | | | **temperature** | **Double** | | [optional] | @@ -20,6 +19,7 @@ | **maxOutputTokens** | **Integer** | | [optional] | | **timeoutSeconds** | **Integer** | | [optional] | | **maxRetries** | **Integer** | | [optional] | +| **modelType** | **AiModelType** | | [optional] [readonly] | @@ -30,14 +30,14 @@ |------|------|-------------|-------| | provider | String | | | -#### AiModelType (enum) -`CHAT` - #### GoogleAiGeminiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | apiKey | String | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions diff --git a/pe/docs/GoogleVertexAiGeminiChatModelConfig.md b/pe/docs/GoogleVertexAiGeminiChatModelConfig.md index 7e598e48..5c77c29b 100644 --- a/pe/docs/GoogleVertexAiGeminiChatModelConfig.md +++ b/pe/docs/GoogleVertexAiGeminiChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **modelType** | **AiModelType** | | [optional] [readonly] | | **providerConfig** | **GoogleVertexAiGeminiProviderConfig** | | | | **modelId** | **String** | | | | **temperature** | **Double** | | [optional] | @@ -20,6 +19,7 @@ | **maxOutputTokens** | **Integer** | | [optional] | | **timeoutSeconds** | **Integer** | | [optional] | | **maxRetries** | **Integer** | | [optional] | +| **modelType** | **AiModelType** | | [optional] [readonly] | @@ -30,9 +30,6 @@ |------|------|-------------|-------| | provider | String | | | -#### AiModelType (enum) -`CHAT` - #### GoogleVertexAiGeminiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -41,6 +38,9 @@ | location | String | | | | serviceAccountKey | String | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions diff --git a/pe/docs/GroupPermissionInfo.md b/pe/docs/GroupPermissionInfo.md index b82ea993..d5447b99 100644 --- a/pe/docs/GroupPermissionInfo.md +++ b/pe/docs/GroupPermissionInfo.md @@ -40,11 +40,12 @@ | id | RoleId | JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role. | [optional] | | createdTime | Long | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the role. May include: 'description' (string). | [optional] | -| tenantId | TenantId | JSON object with Tenant Id. | [readonly] | +| tenantId | TenantId | JSON object with Tenant Id. | [optional] [readonly] | | customerId | CustomerId | JSON object with Customer Id. | [optional] [readonly] | | name | String | Role Name | | | type | RoleType | Type of the role: generic or group | | -| permissions | com.fasterxml.jackson.databind.JsonNode | | [optional] | +| permissions | com.fasterxml.jackson.databind.JsonNode | JSON object with the set of permissions. Structure is specific for role type | [optional] [readonly] | +| excludedPermissions | com.fasterxml.jackson.databind.JsonNode | JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions | [optional] [readonly] | | version | Long | | [optional] | | ownerId | EntityId | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/pe/docs/HomeDashboard.md b/pe/docs/HomeDashboard.md new file mode 100644 index 00000000..2933d5f6 --- /dev/null +++ b/pe/docs/HomeDashboard.md @@ -0,0 +1,71 @@ + +# HomeDashboard + +`org.thingsboard.client.model.HomeDashboard` + +## Properties + +| 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] | +| **resources** | **List\** | | [optional] | +| **version** | **Long** | | [optional] | +| **hideDashboardToolbar** | **Boolean** | Hide dashboard toolbar flag. Useful for rendering dashboards on mobile. | [optional] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### ShortCustomerInfo +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| customerId | CustomerId | JSON object with the customer Id. | [optional] | +| title | String | Title of the customer. | [optional] | +| _public | Boolean | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | + +#### ResourceExportData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| link | String | | [optional] | +| title | String | | [optional] | +| type | ResourceType | | [optional] | +| subType | ResourceSubType | | [optional] | +| resourceKey | String | | [optional] | +| fileName | String | | [optional] | +| publicResourceKey | String | | [optional] | +| mediaType | String | | [optional] | +| data | String | | [optional] | +| isPublic | Boolean | | [optional] | +| _public | Boolean | | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) + +#### ResourceType (enum) +`LWM2_M_MODEL` | `JKS` | `PKCS_12` | `JS_MODULE` | `IMAGE` | `DASHBOARD` | `GENERAL` + +#### ResourceSubType (enum) +`IMAGE` | `SCADA_SYMBOL` | `EXTENSION` | `MODULE` + +--- + +### 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/IntegrationExportData.md b/pe/docs/IntegrationExportData.md index 9fe4f7a2..f5d6b26a 100644 --- a/pe/docs/IntegrationExportData.md +++ b/pe/docs/IntegrationExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/MistralAiChatModelConfig.md b/pe/docs/MistralAiChatModelConfig.md index 2c5ae0b4..b0a50ff3 100644 --- a/pe/docs/MistralAiChatModelConfig.md +++ b/pe/docs/MistralAiChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **modelType** | **AiModelType** | | [optional] [readonly] | | **providerConfig** | **MistralAiProviderConfig** | | | | **modelId** | **String** | | | | **temperature** | **Double** | | [optional] | @@ -19,6 +18,7 @@ | **maxOutputTokens** | **Integer** | | [optional] | | **timeoutSeconds** | **Integer** | | [optional] | | **maxRetries** | **Integer** | | [optional] | +| **modelType** | **AiModelType** | | [optional] [readonly] | @@ -29,14 +29,14 @@ |------|------|-------------|-------| | provider | String | | | -#### AiModelType (enum) -`CHAT` - #### MistralAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | apiKey | String | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions diff --git a/pe/docs/NotificationRuleExportData.md b/pe/docs/NotificationRuleExportData.md index 97507a02..7d06a83c 100644 --- a/pe/docs/NotificationRuleExportData.md +++ b/pe/docs/NotificationRuleExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/NotificationTargetExportData.md b/pe/docs/NotificationTargetExportData.md index 1ce99e7e..65add531 100644 --- a/pe/docs/NotificationTargetExportData.md +++ b/pe/docs/NotificationTargetExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/NotificationTemplateExportData.md b/pe/docs/NotificationTemplateExportData.md index ee391b55..a1df763e 100644 --- a/pe/docs/NotificationTemplateExportData.md +++ b/pe/docs/NotificationTemplateExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/OllamaChatModelConfig.md b/pe/docs/OllamaChatModelConfig.md index c6d5e324..342e6fa8 100644 --- a/pe/docs/OllamaChatModelConfig.md +++ b/pe/docs/OllamaChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **modelType** | **AiModelType** | | [optional] [readonly] | | **providerConfig** | **OllamaProviderConfig** | | | | **modelId** | **String** | | | | **temperature** | **Double** | | [optional] | @@ -19,6 +18,7 @@ | **maxOutputTokens** | **Integer** | | [optional] | | **timeoutSeconds** | **Integer** | | [optional] | | **maxRetries** | **Integer** | | [optional] | +| **modelType** | **AiModelType** | | [optional] [readonly] | @@ -29,15 +29,15 @@ |------|------|-------------|-------| | provider | String | | | -#### AiModelType (enum) -`CHAT` - #### OllamaProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | baseUrl | String | | | | auth | OllamaAuth | | | +#### AiModelType (enum) +`CHAT` + #### OllamaAuth | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/pe/docs/OpenAiChatModelConfig.md b/pe/docs/OpenAiChatModelConfig.md index 14e86e92..4d6060dc 100644 --- a/pe/docs/OpenAiChatModelConfig.md +++ b/pe/docs/OpenAiChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **modelType** | **AiModelType** | | [optional] [readonly] | | **providerConfig** | **OpenAiProviderConfig** | | | | **modelId** | **String** | | | | **temperature** | **Double** | | [optional] | @@ -19,6 +18,7 @@ | **maxOutputTokens** | **Integer** | | [optional] | | **timeoutSeconds** | **Integer** | | [optional] | | **maxRetries** | **Integer** | | [optional] | +| **modelType** | **AiModelType** | | [optional] [readonly] | @@ -29,15 +29,15 @@ |------|------|-------------|-------| | provider | String | | | -#### AiModelType (enum) -`CHAT` - #### OpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | baseUrl | String | | [optional] | | apiKey | String | | [optional] | +#### AiModelType (enum) +`CHAT` + --- ### Conventions diff --git a/pe/docs/OtaPackageExportData.md b/pe/docs/OtaPackageExportData.md index 7a08a738..e17d6a6b 100644 --- a/pe/docs/OtaPackageExportData.md +++ b/pe/docs/OtaPackageExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/PageDataAiModel.md b/pe/docs/PageDataAiModel.md index 37234e0c..42035345 100644 --- a/pe/docs/PageDataAiModel.md +++ b/pe/docs/PageDataAiModel.md @@ -36,7 +36,6 @@ #### AmazonBedrockChatModelConfig *(extends AiModelConfig, provider=`AMAZON_BEDROCK`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AmazonBedrockProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -44,11 +43,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### AnthropicChatModelConfig *(extends AiModelConfig, provider=`ANTHROPIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AnthropicProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -57,11 +56,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### AzureOpenAiChatModelConfig *(extends AiModelConfig, provider=`AZURE_OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AzureOpenAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -71,11 +70,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GitHubModelsChatModelConfig *(extends AiModelConfig, provider=`GITHUB_MODELS`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GitHubModelsProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -85,11 +84,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GoogleAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GoogleAiGeminiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -100,11 +99,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GoogleVertexAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_VERTEX_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GoogleVertexAiGeminiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -115,11 +114,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### MistralAiChatModelConfig *(extends AiModelConfig, provider=`MISTRAL_AI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | MistralAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -129,11 +128,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### OllamaChatModelConfig *(extends AiModelConfig, provider=`OLLAMA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | OllamaProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -143,11 +142,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### OpenAiChatModelConfig *(extends AiModelConfig, provider=`OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | OpenAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -157,19 +156,20 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) -#### AiModelType (enum) -`CHAT` - #### OpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | baseUrl | String | | [optional] | | apiKey | String | | [optional] | +#### AiModelType (enum) +`CHAT` + #### AzureOpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/pe/docs/PageDataAlarmRuleDefinition.md b/pe/docs/PageDataAlarmRuleDefinition.md new file mode 100644 index 00000000..702601b9 --- /dev/null +++ b/pe/docs/PageDataAlarmRuleDefinition.md @@ -0,0 +1,204 @@ + +# PageDataAlarmRuleDefinition + +`org.thingsboard.client.model.PageDataAlarmRuleDefinition` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **data** | **List\** | Array of the entities | [optional] | +| **totalPages** | **Integer** | Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria | [optional] [readonly] | +| **totalElements** | **Long** | Total number of elements in all available pages | [optional] [readonly] | +| **hasNext** | **Boolean** | 'false' value indicates the end of the result set | [optional] [readonly] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### AlarmRuleDefinition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| alarmDetails | String | | [optional] | +| condition | AlarmRuleCondition | | | +| dashboardId | DashboardId | | [optional] | + +#### AlarmRuleCondition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | AlarmConditionExpression | | | +| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| type | String | | | + +#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | + +#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* +*See AlarmRuleCondition for properties.* + +#### AlarmConditionExpression +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| filters | List | | | +| operation | ComplexOperation | | [optional] | + +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | String | | | + +#### AlarmConditionValueAlarmRuleSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| dynamicValueArgument | String | | [optional] | +| staticValue | AlarmRuleSchedule | | [optional] | + +#### AlarmRuleSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* +*See AlarmRuleSchedule for properties.* + +#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| items | List | | [optional] | +| timezone | String | | [optional] | + +#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| daysOfWeek | Set | | [optional] | +| endsOn | Long | | [optional] | +| startsOn | Long | | [optional] | +| timezone | String | | [optional] | + +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + +#### AlarmConditionValueLong +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Long | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmConditionValueInteger +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Integer | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) + +#### AlarmRuleConditionFilter +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| argument | String | | | +| operation | ComplexOperation | | [optional] | +| predicates | List | | | +| valueType | EntityKeyValueType | | | + +#### ComplexOperation (enum) +`AND` | `OR` + +#### AlarmRuleKeyFilterPredicate +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | BooleanOperation | | | +| value | AlarmConditionValueBoolean | | | + +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | ComplexOperation | | [optional] | +| predicates | List | | [optional] | + +#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | AlarmConditionValueLong | | | +| unit | TimeUnit | | | + +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | NumericOperation | | | +| value | AlarmConditionValueDouble | | | + +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ignoreCase | Boolean | | [optional] | +| operation | StringOperation | | | +| value | AlarmConditionValueString | | | + +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + +#### AlarmRuleCustomTimeScheduleItem +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| dayOfWeek | Integer | | [optional] | +| enabled | Boolean | | [optional] | +| endsOn | Long | | [optional] | +| startsOn | Long | | [optional] | + +#### StringOperation (enum) +`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` + +#### AlarmConditionValueString +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | String | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### NumericOperation (enum) +`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` + +#### AlarmConditionValueDouble +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Double | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### BooleanOperation (enum) +`EQUAL` | `NOT_EQUAL` + +#### AlarmConditionValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Boolean | | [optional] | +| dynamicValueArgument | String | | [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/PageDataAlarmRuleDefinitionInfo.md b/pe/docs/PageDataAlarmRuleDefinitionInfo.md new file mode 100644 index 00000000..c60e91b6 --- /dev/null +++ b/pe/docs/PageDataAlarmRuleDefinitionInfo.md @@ -0,0 +1,497 @@ + +# PageDataAlarmRuleDefinitionInfo + +`org.thingsboard.client.model.PageDataAlarmRuleDefinitionInfo` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **data** | **List\** | Array of the entities | [optional] | +| **totalPages** | **Integer** | Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria | [optional] [readonly] | +| **totalElements** | **Long** | Total number of elements in all available pages | [optional] [readonly] | +| **hasNext** | **Boolean** | 'false' value indicates the end of the result set | [optional] [readonly] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### AlarmRuleDefinitionInfo +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | CalculatedFieldId | JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error. | [optional] | +| createdTime | Long | Timestamp of the alarm rule creation, in milliseconds | [optional] [readonly] | +| tenantId | TenantId | | [optional] | +| entityId | EntityId | | [optional] | +| name | String | User defined name of the alarm rule. | [optional] | +| debugSettings | DebugSettings | Debug settings object. | [optional] | +| configurationVersion | Integer | Version of alarm rule configuration. | [optional] | +| _configuration | AlarmCalculatedFieldConfiguration | | | +| version | Long | | [optional] | +| additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the alarm rule. May include: 'description' (string). | [optional] | +| entityName | String | | [optional] | +| debugMode | Boolean | | [optional] | + +#### DebugSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| failuresEnabled | Boolean | Debug failures. | [optional] | +| allEnabled | Boolean | Debug All. Used as a trigger for updating debugAllUntil. | [optional] | +| allEnabledUntil | Long | Timestamp of the end time for the processing debug events. | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) + +#### CalculatedFieldConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| output | Output | | [optional] | +| type | String | | | + +#### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| createRules | Map | | | +| clearRule | AlarmRuleDefinition | | [optional] | +| propagate | Boolean | | [optional] | +| propagateToOwner | Boolean | | [optional] | +| propagateToOwnerHierarchy | Boolean | | [optional] | +| propagateToTenant | Boolean | | [optional] | +| propagateRelationTypes | List | | [optional] | + +#### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| metrics | Map | | | +| interval | AggInterval | | | +| watermark | Watermark | | [optional] | +| produceIntermediateResult | Boolean | | [optional] | + +#### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entityCoordinates | EntityCoordinates | | | +| zoneGroups | Map | | | +| scheduledUpdateEnabled | Boolean | | [optional] | +| scheduledUpdateInterval | Integer | | [optional] | + +#### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | +| relation | RelationPathLevel | | | +| applyExpressionToResolvedArguments | Boolean | | [optional] | + +#### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| relation | RelationPathLevel | | | +| arguments | Map | | | +| deduplicationIntervalInSec | Long | | [optional] | +| metrics | Map | | | +| useLatestTs | Boolean | | [optional] | +| scheduledUpdateInterval | Integer | | [optional] | +| scheduledUpdateEnabled | Boolean | | [optional] | + +#### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | + +#### SimpleCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | +| useLatestTs | Boolean | | [optional] | + +#### Argument +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| refEntityId | EntityId | | [optional] | +| refDynamicSourceConfiguration | CfArgumentDynamicSourceConfiguration | | [optional] | +| refEntityKey | ReferencedEntityKey | | [optional] | +| defaultValue | String | | [optional] | +| limit | Integer | | [optional] | +| timeWindow | Long | | [optional] | + +#### AlarmRuleDefinition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| alarmDetails | String | | [optional] | +| condition | AlarmRuleCondition | | | +| dashboardId | DashboardId | | [optional] | + +#### Output +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| name | String | | [optional] | +| scope | AttributeScope | | [optional] | +| decimalsByDefault | Integer | | [optional] | +| strategy | Object | | [optional] | +| type | String | | | + +#### AttributesOutput *(extends Output, type=`ATTRIBUTES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | AttributesOutputStrategy | | [optional] | + +#### TimeSeriesOutput *(extends Output, type=`TIME_SERIES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | TimeSeriesOutputStrategy | | [optional] | + +#### CfArgumentDynamicSourceConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### CurrentOwnerDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`CURRENT_OWNER`)* +*See CfArgumentDynamicSourceConfiguration for properties.* + +#### RelationPathQueryDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`RELATION_PATH_QUERY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| levels | List | | [optional] | + +#### ReferencedEntityKey +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | +| type | ArgumentType | | [optional] | +| scope | AttributeScope | | [optional] | + +#### AlarmRuleCondition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | AlarmConditionExpression | | | +| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| type | String | | | + +#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | + +#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* +*See AlarmRuleCondition for properties.* + +#### AttributeScope (enum) +`CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` + +#### EntityCoordinates +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| latitudeKeyName | String | | | +| longitudeKeyName | String | | | + +#### ZoneGroupConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| refEntityId | EntityId | | [optional] | +| refDynamicSourceConfiguration | CfArgumentDynamicSourceConfiguration | | [optional] | +| perimeterKeyName | String | | | +| reportStrategy | GeofencingReportStrategy | | | +| createRelationsWithMatchedZones | Boolean | | [optional] | +| relationType | String | | [optional] | +| direction | EntitySearchDirection | | [optional] | + +#### RelationPathLevel +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| direction | EntitySearchDirection | | | +| relationType | String | | | + +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | String | | [optional] | +| input | AggInput | | [optional] | +| defaultValue | Double | | [optional] | + +#### AggInterval +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### CustomInterval *(extends AggInterval, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | +| durationSec | Long | | | + +#### DayInterval *(extends AggInterval, type=`DAY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### HourInterval *(extends AggInterval, type=`HOUR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### MonthInterval *(extends AggInterval, type=`MONTH`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### QuarterInterval *(extends AggInterval, type=`QUARTER`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### WeekInterval *(extends AggInterval, type=`WEEK`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### WeekSunSatInterval *(extends AggInterval, type=`WEEK_SUN_SAT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### YearInterval *(extends AggInterval, type=`YEAR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### Watermark +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | Long | | [optional] | + +#### ArgumentType (enum) +`TS_LATEST` | `ATTRIBUTE` | `TS_ROLLING` + +#### AlarmConditionExpression +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| filters | List | | | +| operation | ComplexOperation | | [optional] | + +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | String | | | + +#### AlarmConditionValueAlarmRuleSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| dynamicValueArgument | String | | [optional] | +| staticValue | AlarmRuleSchedule | | [optional] | + +#### TimeSeriesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### TimeSeriesImmediateOutputStrategy *(extends TimeSeriesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ttl | Long | | [optional] | +| saveTimeSeries | Boolean | | [optional] | +| saveLatest | Boolean | | [optional] | +| sendWsUpdate | Boolean | | [optional] | +| processCfs | Boolean | | [optional] | + +#### TimeSeriesRuleChainOutputStrategy *(extends TimeSeriesOutputStrategy, type=`RULE_CHAIN`)* +*See TimeSeriesOutputStrategy for properties.* + +#### AttributesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AttributesImmediateOutputStrategy *(extends AttributesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| sendAttributesUpdatedNotification | Boolean | | [optional] | +| updateAttributesOnlyOnValueChange | Boolean | | [optional] | +| saveAttribute | Boolean | | [optional] | +| sendWsUpdate | Boolean | | [optional] | +| processCfs | Boolean | | [optional] | + +#### AttributesRuleChainOutputStrategy *(extends AttributesOutputStrategy, type=`RULE_CHAIN`)* +*See AttributesOutputStrategy for properties.* + +#### GeofencingReportStrategy (enum) +`REPORT_TRANSITION_EVENTS_ONLY` | `REPORT_PRESENCE_STATUS_ONLY` | `REPORT_TRANSITION_EVENTS_AND_PRESENCE_STATUS` + +#### EntitySearchDirection (enum) +`FROM` | `TO` + +#### AggFunction (enum) +`MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` + +#### AggInput +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AggFunctionInput *(extends AggInput, type=`function`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | String | | [optional] | + +#### AggKeyInput *(extends AggInput, type=`key`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | + +#### AlarmRuleSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* +*See AlarmRuleSchedule for properties.* + +#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| items | List | | [optional] | +| timezone | String | | [optional] | + +#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| daysOfWeek | Set | | [optional] | +| endsOn | Long | | [optional] | +| startsOn | Long | | [optional] | +| timezone | String | | [optional] | + +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + +#### AlarmConditionValueLong +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Long | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmConditionValueInteger +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Integer | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmRuleConditionFilter +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| argument | String | | | +| operation | ComplexOperation | | [optional] | +| predicates | List | | | +| valueType | EntityKeyValueType | | | + +#### ComplexOperation (enum) +`AND` | `OR` + +#### AlarmRuleKeyFilterPredicate +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | BooleanOperation | | | +| value | AlarmConditionValueBoolean | | | + +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | ComplexOperation | | [optional] | +| predicates | List | | [optional] | + +#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | AlarmConditionValueLong | | | +| unit | TimeUnit | | | + +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | NumericOperation | | | +| value | AlarmConditionValueDouble | | | + +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ignoreCase | Boolean | | [optional] | +| operation | StringOperation | | | +| value | AlarmConditionValueString | | | + +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + +#### AlarmRuleCustomTimeScheduleItem +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| dayOfWeek | Integer | | [optional] | +| enabled | Boolean | | [optional] | +| endsOn | Long | | [optional] | +| startsOn | Long | | [optional] | + +#### StringOperation (enum) +`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` + +#### AlarmConditionValueString +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | String | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### NumericOperation (enum) +`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` + +#### AlarmConditionValueDouble +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Double | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### BooleanOperation (enum) +`EQUAL` | `NOT_EQUAL` + +#### AlarmConditionValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Boolean | | [optional] | +| dynamicValueArgument | String | | [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/PageDataAssetProfileInfo.md b/pe/docs/PageDataAssetProfileInfo.md index a5f49044..ecab211e 100644 --- a/pe/docs/PageDataAssetProfileInfo.md +++ b/pe/docs/PageDataAssetProfileInfo.md @@ -21,7 +21,7 @@ #### AssetProfileInfo | Name | Type | Description | Notes | |------|------|-------------|-------| -| id | EntityId | JSON object with the entity Id. | [optional] | +| id | AssetProfileId | JSON object with the Asset Profile Id. | [optional] | | name | String | Entity Name | [optional] | | image | String | Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. | [optional] | | defaultDashboardId | DashboardId | Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to asset details. | [optional] | diff --git a/pe/docs/PageDataCustomer.md b/pe/docs/PageDataCustomer.md index e427689c..1ae878f5 100644 --- a/pe/docs/PageDataCustomer.md +++ b/pe/docs/PageDataCustomer.md @@ -31,7 +31,7 @@ | address2 | String | Address Line 2 | [optional] | | zip | String | Zip code | [optional] | | phone | String | Phone number | [optional] | -| email | String | Email | | +| email | String | Email | [optional] | | title | String | Title of the customer | | | tenantId | TenantId | JSON object with Tenant Id | [optional] | | parentCustomerId | CustomerId | JSON object with parent Customer Id | [optional] | diff --git a/pe/docs/PageDataCustomerInfo.md b/pe/docs/PageDataCustomerInfo.md index c549432e..ee83a47f 100644 --- a/pe/docs/PageDataCustomerInfo.md +++ b/pe/docs/PageDataCustomerInfo.md @@ -31,7 +31,7 @@ | address2 | String | Address Line 2 | [optional] | | zip | String | Zip code | [optional] | | phone | String | Phone number | [optional] | -| email | String | Email | | +| email | String | Email | [optional] | | title | String | Title of the customer | | | tenantId | TenantId | JSON object with Tenant Id | [optional] | | parentCustomerId | CustomerId | JSON object with parent Customer Id | [optional] | diff --git a/pe/docs/PageDataDashboardInfo.md b/pe/docs/PageDataDashboardInfo.md index 64b6380c..b65637b6 100644 --- a/pe/docs/PageDataDashboardInfo.md +++ b/pe/docs/PageDataDashboardInfo.md @@ -43,7 +43,7 @@ |------|------|-------------|-------| | customerId | CustomerId | JSON object with the customer Id. | [optional] | | title | String | Title of the customer. | [optional] | -| isPublic | Boolean | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | +| _public | Boolean | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | #### ResourceExportData | Name | Type | Description | Notes | diff --git a/pe/docs/PageDataDevice.md b/pe/docs/PageDataDevice.md index 2972c002..81217256 100644 --- a/pe/docs/PageDataDevice.md +++ b/pe/docs/PageDataDevice.md @@ -29,7 +29,7 @@ | name | String | Unique Device Name in scope of Tenant | [optional] | | type | String | Device Profile Name | [optional] | | label | String | Label that may be used in widgets | [optional] | -| deviceProfileId | DeviceProfileId | JSON object with Device Profile Id. | | +| deviceProfileId | DeviceProfileId | JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. | [optional] | | deviceData | DeviceData | JSON object with content specific to type of transport in the device profile. | [optional] | | firmwareId | OtaPackageId | JSON object with Ota Package Id. | [optional] | | softwareId | OtaPackageId | JSON object with Ota Package Id. | [optional] | diff --git a/pe/docs/PageDataDeviceInfo.md b/pe/docs/PageDataDeviceInfo.md index 1c34e087..2965abe5 100644 --- a/pe/docs/PageDataDeviceInfo.md +++ b/pe/docs/PageDataDeviceInfo.md @@ -29,7 +29,7 @@ | name | String | Unique Device Name in scope of Tenant | [optional] | | type | String | Device Profile Name | [optional] | | label | String | Label that may be used in widgets | [optional] | -| deviceProfileId | DeviceProfileId | JSON object with Device Profile Id. | | +| deviceProfileId | DeviceProfileId | JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. | [optional] | | deviceData | DeviceData | JSON object with content specific to type of transport in the device profile. | [optional] | | firmwareId | OtaPackageId | JSON object with Ota Package Id. | [optional] | | softwareId | OtaPackageId | JSON object with Ota Package Id. | [optional] | diff --git a/pe/docs/PageDataDeviceProfile.md b/pe/docs/PageDataDeviceProfile.md index 2e8cc8c1..04e73764 100644 --- a/pe/docs/PageDataDeviceProfile.md +++ b/pe/docs/PageDataDeviceProfile.md @@ -56,7 +56,6 @@ | _configuration | DeviceProfileConfiguration | JSON object of device profile configuration | [optional] | | transportConfiguration | DeviceProfileTransportConfiguration | JSON object of device profile transport configuration | [optional] | | provisionConfiguration | DeviceProfileProvisionConfiguration | JSON object of provisioning strategy type per device profile | [optional] | -| alarms | List | | [optional] | #### DeviceProfileConfiguration | Name | Type | Description | Notes | @@ -127,30 +126,9 @@ | certificateRegExPattern | String | | [optional] | | allowCreateNewDevicesByX509Certificate | Boolean | | [optional] | -#### DeviceProfileAlarm -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | String | String value representing the alarm rule id | [optional] | -| alarmType | String | String value representing type of the alarm | [optional] | -| createRules | Map | Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details | [optional] | -| clearRule | AlarmRule | JSON object representing clear alarm rule | [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] | -| propagateToTenant | Boolean | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | -| propagateRelationTypes | List | JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored. | [optional] | - #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) -#### AlarmRule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | AlarmCondition | JSON object representing the alarm rule condition | [optional] | -| alarmDetails | String | String value representing the additional details for an alarm rule | [optional] | -| dashboardId | DashboardId | JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application | [optional] | -| schedule | AlarmSchedule | JSON object representing time interval during which the rule is active | [optional] | - #### TransportPayloadTypeConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -253,35 +231,6 @@ |------|------|-------------|-------| | mappings | List | | [optional] | -#### AlarmCondition -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | List | | [optional] | -| spec | AlarmConditionSpec | JSON object representing alarm condition type | [optional] | - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamicValue | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* -*See AlarmSchedule for properties.* - -#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| timezone | String | | [optional] | -| items | List | | [optional] | - -#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| daysOfWeek | Set | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | -| timezone | String | | [optional] | - #### ObjectAttributes | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -307,44 +256,6 @@ #### SnmpCommunicationSpec (enum) `TELEMETRY_QUERYING` | `CLIENT_ATTRIBUTES_QUERYING` | `SHARED_ATTRIBUTES_SETTING` | `TO_DEVICE_RPC_REQUEST` | `TO_SERVER_RPC_REQUEST` -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| valueType | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | Object | | [optional] | - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - #### LwM2mVersion | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -357,144 +268,9 @@ | key | String | | [optional] | | dataType | DataType | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | String | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignoreCase | Boolean | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dayOfWeek | Integer | | [optional] | -| enabled | Boolean | | [optional] | -| endsOn | Long | | [optional] | -| startsOn | Long | | [optional] | - #### DataType (enum) `BOOLEAN` | `LONG` | `DOUBLE` | `STRING` | `JSON` -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Long | | [optional] | -| userValue | Long | | [optional] | -| dynamicValue | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Integer | | [optional] | -| userValue | Integer | | [optional] | -| dynamicValue | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | String | | [optional] | -| userValue | String | | [optional] | -| dynamicValue | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Double | | [optional] | -| userValue | Double | | [optional] | -| dynamicValue | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Boolean | | [optional] | -| userValue | Boolean | | [optional] | -| dynamicValue | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Long | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Integer | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Double | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Boolean | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - --- ### Conventions diff --git a/pe/docs/PageDataDeviceProfileInfo.md b/pe/docs/PageDataDeviceProfileInfo.md index 3b39172b..87cd06da 100644 --- a/pe/docs/PageDataDeviceProfileInfo.md +++ b/pe/docs/PageDataDeviceProfileInfo.md @@ -21,7 +21,7 @@ #### DeviceProfileInfo | Name | Type | Description | Notes | |------|------|-------------|-------| -| id | EntityId | JSON object with the entity Id. | [optional] | +| id | DeviceProfileId | JSON object with the Device Profile Id. | [optional] | | name | String | Entity Name | [optional] | | image | String | Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. | [optional] | | defaultDashboardId | DashboardId | Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details. | [optional] | diff --git a/pe/docs/PageDataEntityGroupInfo.md b/pe/docs/PageDataEntityGroupInfo.md index 6b6e6086..8cea026e 100644 --- a/pe/docs/PageDataEntityGroupInfo.md +++ b/pe/docs/PageDataEntityGroupInfo.md @@ -29,17 +29,11 @@ | 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 | | [optional] | | edgeGroupAll | Boolean | Indicates special edge group 'All' that contains all entities and can't be deleted. | [optional] [readonly] | | groupAll | Boolean | Indicates special group 'All' that contains all entities and can't be deleted. | [optional] | | tenantId | TenantId | | [optional] | -#### EntityGroupInfoOwnerIdsInner -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| entityType | EntityType | | | -| id | UUID | ID of the entity, time-based UUID v1 | | - #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) diff --git a/pe/docs/PageDataRole.md b/pe/docs/PageDataRole.md index aae98490..cfeeae32 100644 --- a/pe/docs/PageDataRole.md +++ b/pe/docs/PageDataRole.md @@ -24,11 +24,12 @@ | id | RoleId | JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role. | [optional] | | createdTime | Long | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the role. May include: 'description' (string). | [optional] | -| tenantId | TenantId | JSON object with Tenant Id. | [readonly] | +| tenantId | TenantId | JSON object with Tenant Id. | [optional] [readonly] | | customerId | CustomerId | JSON object with Customer Id. | [optional] [readonly] | | name | String | Role Name | | | type | RoleType | Type of the role: generic or group | | -| permissions | com.fasterxml.jackson.databind.JsonNode | | [optional] | +| permissions | com.fasterxml.jackson.databind.JsonNode | JSON object with the set of permissions. Structure is specific for role type | [optional] [readonly] | +| excludedPermissions | com.fasterxml.jackson.databind.JsonNode | JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions | [optional] [readonly] | | version | Long | | [optional] | | ownerId | EntityId | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/pe/docs/RepeatingAlarmConditionSpec.md b/pe/docs/RepeatingAlarmConditionSpec.md deleted file mode 100644 index c173660b..00000000 --- a/pe/docs/RepeatingAlarmConditionSpec.md +++ /dev/null @@ -1,49 +0,0 @@ - -# RepeatingAlarmConditionSpec - -`org.thingsboard.client.model.RepeatingAlarmConditionSpec` - -**Extends:** **AlarmConditionSpec** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **predicate** | **FilterPredicateValueInteger** | Repeating predicate | [optional] | - - - -## Referenced Types - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| defaultValue | Integer | | [optional] | -| userValue | Integer | | [optional] | -| dynamicValue | DynamicValueInteger | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | Integer | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/ReportTemplateExportData.md b/pe/docs/ReportTemplateExportData.md index 19669953..eb36fd2b 100644 --- a/pe/docs/ReportTemplateExportData.md +++ b/pe/docs/ReportTemplateExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/Role.md b/pe/docs/Role.md index 1922d9d2..34bd8d7a 100644 --- a/pe/docs/Role.md +++ b/pe/docs/Role.md @@ -12,11 +12,12 @@ A JSON value representing the role. | **id** | **RoleId** | JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role. | [optional] | | **createdTime** | **Long** | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | **additionalInfo** | **com.fasterxml.jackson.databind.JsonNode** | Additional parameters of the role. May include: 'description' (string). | [optional] | -| **tenantId** | **TenantId** | JSON object with Tenant Id. | [readonly] | +| **tenantId** | **TenantId** | JSON object with Tenant Id. | [optional] [readonly] | | **customerId** | **CustomerId** | JSON object with Customer Id. | [optional] [readonly] | | **name** | **String** | Role Name | | | **type** | **RoleType** | Type of the role: generic or group | | -| **permissions** | **com.fasterxml.jackson.databind.JsonNode** | | [optional] | +| **permissions** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with the set of permissions. Structure is specific for role type | [optional] [readonly] | +| **excludedPermissions** | **com.fasterxml.jackson.databind.JsonNode** | JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions | [optional] [readonly] | | **version** | **Long** | | [optional] | | **ownerId** | **EntityId** | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/pe/docs/RoleExportData.md b/pe/docs/RoleExportData.md index c2946a60..45782a13 100644 --- a/pe/docs/RoleExportData.md +++ b/pe/docs/RoleExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/RpcV1ControllerApi.md b/pe/docs/RpcV1ControllerApi.md index 1adfae98..8b66ff07 100644 --- a/pe/docs/RpcV1ControllerApi.md +++ b/pe/docs/RpcV1ControllerApi.md @@ -26,7 +26,7 @@ Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **deviceId** | **String** | A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **body** | **String** | | | +| **body** | **String** | A JSON object representing the RPC request. | | ### Return type @@ -51,7 +51,7 @@ Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **deviceId** | **String** | A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **body** | **String** | | | +| **body** | **String** | A JSON object representing the RPC request. | | ### Return type diff --git a/pe/docs/RpcV2ControllerApi.md b/pe/docs/RpcV2ControllerApi.md index f5ee944b..e09eef8f 100644 --- a/pe/docs/RpcV2ControllerApi.md +++ b/pe/docs/RpcV2ControllerApi.md @@ -107,7 +107,7 @@ Sends the one-way remote-procedure call (RPC) request to device. Sends the one-w | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **deviceId** | **String** | A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **body** | **String** | | | +| **body** | **String** | A JSON object representing the RPC request. | | ### Return type @@ -132,7 +132,7 @@ Sends the two-way remote-procedure call (RPC) request to device. Sends the one-w | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **deviceId** | **String** | A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **body** | **String** | | | +| **body** | **String** | A JSON object representing the RPC request. | | ### Return type diff --git a/pe/docs/RuleChainData.md b/pe/docs/RuleChainData.md index defcc412..d88adfeb 100644 --- a/pe/docs/RuleChainData.md +++ b/pe/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/pe/docs/RuleChainExportData.md b/pe/docs/RuleChainExportData.md index 5aaaa1d5..3787934e 100644 --- a/pe/docs/RuleChainExportData.md +++ b/pe/docs/RuleChainExportData.md @@ -35,12 +35,15 @@ | 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 | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -114,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` | `FROM_ENTITY_GROUP` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` diff --git a/pe/docs/RuleChainMetaData.md b/pe/docs/RuleChainMetaData.md index dd84a3c6..aa8bf7f0 100644 --- a/pe/docs/RuleChainMetaData.md +++ b/pe/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/pe/docs/RuleChainNote.md b/pe/docs/RuleChainNote.md new file mode 100644 index 00000000..09b6dacc --- /dev/null +++ b/pe/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/pe/docs/RuleEngineControllerApi.md b/pe/docs/RuleEngineControllerApi.md index a42c667b..3d07cd6b 100644 --- a/pe/docs/RuleEngineControllerApi.md +++ b/pe/docs/RuleEngineControllerApi.md @@ -29,7 +29,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ |------------- | ------------- | ------------- | -------------| | **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **body** | **String** | | | +| **body** | **String** | A JSON object representing the message. | | ### Return type @@ -57,7 +57,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **queueName** | **String** | Queue name to process the request in the rule engine | | | **timeout** | **Integer** | Timeout to process the request in milliseconds | | -| **body** | **String** | | | +| **body** | **String** | A JSON object representing the message. | | ### Return type @@ -84,7 +84,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ | **entityType** | **String** | A string value representing the entity type. For example, 'DEVICE' | | | **entityId** | **String** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **timeout** | **Integer** | Timeout to process the request in milliseconds | | -| **body** | **String** | | | +| **body** | **String** | A JSON object representing the message. | | ### Return type @@ -108,7 +108,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | **String** | | | +| **body** | **String** | A JSON object representing the message. | | ### Return type diff --git a/pe/docs/SaveDeviceWithCredentialsRequest.md b/pe/docs/SaveDeviceWithCredentialsRequest.md index 2c44f880..656995ed 100644 --- a/pe/docs/SaveDeviceWithCredentialsRequest.md +++ b/pe/docs/SaveDeviceWithCredentialsRequest.md @@ -29,7 +29,7 @@ The JSON object with device and credentials. See method description above for ex | name | String | Unique Device Name in scope of Tenant | [optional] | | type | String | Device Profile Name | [optional] | | label | String | Label that may be used in widgets | [optional] | -| deviceProfileId | DeviceProfileId | JSON object with Device Profile Id. | | +| deviceProfileId | DeviceProfileId | JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. | [optional] | | deviceData | DeviceData | JSON object with content specific to type of transport in the device profile. | [optional] | | firmwareId | OtaPackageId | JSON object with Ota Package Id. | [optional] | | softwareId | OtaPackageId | JSON object with Ota Package Id. | [optional] | diff --git a/pe/docs/SchedulerEventExportData.md b/pe/docs/SchedulerEventExportData.md index fea4e983..b5dbc17d 100644 --- a/pe/docs/SchedulerEventExportData.md +++ b/pe/docs/SchedulerEventExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/ShortCustomerInfo.md b/pe/docs/ShortCustomerInfo.md index 7e5a39f3..feba0802 100644 --- a/pe/docs/ShortCustomerInfo.md +++ b/pe/docs/ShortCustomerInfo.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| | **customerId** | **CustomerId** | JSON object with the customer Id. | [optional] | | **title** | **String** | Title of the customer. | [optional] | -| **isPublic** | **Boolean** | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | +| **_public** | **Boolean** | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | diff --git a/pe/docs/SolutionData.md b/pe/docs/SolutionData.md new file mode 100644 index 00000000..8a6e8720 --- /dev/null +++ b/pe/docs/SolutionData.md @@ -0,0 +1,720 @@ + +# SolutionData + +`org.thingsboard.client.model.SolutionData` + +Portable solution package containing exported entities grouped by type. Represents a self-contained snapshot that can be imported into another tenant. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **entities** | **Map\\>** | Exported entities grouped by entity type. Each key is an entity type (e.g. DEVICE_PROFILE, RULE_CHAIN) and the value is a list of entity export data objects. | | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### EntityExportData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entity | ExportableEntity | | [optional] | +| 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] | +| entityType | EntityType | | | + +#### AiModelExportData *(extends EntityExportData, entityType=`AI_MODEL`)* +*See EntityExportData for properties.* + +#### AssetExportData *(extends EntityExportData, entityType=`ASSET`)* +*See EntityExportData for properties.* + +#### AssetProfileExportData *(extends EntityExportData, entityType=`ASSET_PROFILE`)* +*See EntityExportData for properties.* + +#### ConverterExportData *(extends EntityExportData, entityType=`CONVERTER`)* +*See EntityExportData for properties.* + +#### CustomerExportData *(extends EntityExportData, entityType=`CUSTOMER`)* +*See EntityExportData for properties.* + +#### DashboardExportData *(extends EntityExportData, entityType=`DASHBOARD`)* +*See EntityExportData for properties.* + +#### DeviceExportData *(extends EntityExportData, entityType=`DEVICE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| credentials | DeviceCredentials | | [optional] | + +#### DeviceProfileExportData *(extends EntityExportData, entityType=`DEVICE_PROFILE`)* +*See EntityExportData for properties.* + +#### EntityGroupExportData *(extends EntityExportData, entityType=`ENTITY_GROUP`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| permissions | List | | [optional] | +| groupOtaPackages | List | | [optional] | +| groupEntities | Boolean | | [optional] | + +#### EntityViewExportData *(extends EntityExportData, entityType=`ENTITY_VIEW`)* +*See EntityExportData for properties.* + +#### IntegrationExportData *(extends EntityExportData, entityType=`INTEGRATION`)* +*See EntityExportData for properties.* + +#### NotificationRuleExportData *(extends EntityExportData, entityType=`NOTIFICATION_RULE`)* +*See EntityExportData for properties.* + +#### NotificationTargetExportData *(extends EntityExportData, entityType=`NOTIFICATION_TARGET`)* +*See EntityExportData for properties.* + +#### NotificationTemplateExportData *(extends EntityExportData, entityType=`NOTIFICATION_TEMPLATE`)* +*See EntityExportData for properties.* + +#### OtaPackageExportData *(extends EntityExportData, entityType=`OTA_PACKAGE`)* +*See EntityExportData for properties.* + +#### ReportTemplateExportData *(extends EntityExportData, entityType=`REPORT_TEMPLATE`)* +*See EntityExportData for properties.* + +#### RoleExportData *(extends EntityExportData, entityType=`ROLE`)* +*See EntityExportData for properties.* + +#### RuleChainExportData *(extends EntityExportData, entityType=`RULE_CHAIN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| metaData | RuleChainMetaData | | [optional] | + +#### SchedulerEventExportData *(extends EntityExportData, entityType=`SCHEDULER_EVENT`)* +*See EntityExportData for properties.* + +#### TbResourceExportData *(extends EntityExportData, entityType=`TB_RESOURCE`)* +*See EntityExportData for properties.* + +#### WidgetsBundleExportData *(extends EntityExportData, entityType=`WIDGETS_BUNDLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| widgets | List | | [optional] | +| fqns | List | | [optional] | + +#### WidgetTypeExportData *(extends EntityExportData, entityType=`WIDGET_TYPE`)* +*See EntityExportData for properties.* + +#### ExportableEntity +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| createdTime | Long | | [optional] | +| id | EntityId | | [optional] | +| name | String | | [optional] | +| tenantId | TenantId | | [optional] | + +#### EntityRelation +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| from | EntityId | JSON object with [from] Entity Id. | | +| to | EntityId | JSON object with [to] Entity Id. | | +| type | String | String value of relation type. | | +| typeGroup | RelationTypeGroup | Represents the type group of the relation. | | +| version | Long | | [optional] | +| additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the relation. | [optional] | + +#### AttributeExportData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | +| lastUpdateTs | Long | | [optional] | +| booleanValue | Boolean | | [optional] | +| strValue | String | | [optional] | +| longValue | Long | | [optional] | +| doubleValue | Double | | [optional] | +| jsonValue | String | | [optional] | + +#### CalculatedField +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | CalculatedFieldId | JSON object with the Calculated Field Id. Referencing non-existing Calculated Field Id will cause error. | [optional] | +| createdTime | Long | Timestamp of the calculated field creation, in milliseconds | [optional] [readonly] | +| tenantId | TenantId | | [optional] | +| entityId | EntityId | | [optional] | +| type | CalculatedFieldType | | [optional] | +| name | String | User defined name of the calculated field. | [optional] | +| debugSettings | DebugSettings | Debug settings object. | [optional] | +| 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] | +| debugMode | Boolean | | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) + +#### RelationTypeGroup (enum) +`COMMON` | `DASHBOARD` | `FROM_ENTITY_GROUP` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` + +#### CalculatedFieldType (enum) +`SIMPLE` | `SCRIPT` | `GEOFENCING` | `ALARM` | `PROPAGATION` | `RELATED_ENTITIES_AGGREGATION` | `ENTITY_AGGREGATION` + +#### DebugSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| failuresEnabled | Boolean | Debug failures. | [optional] | +| allEnabled | Boolean | Debug All. Used as a trigger for updating debugAllUntil. | [optional] | +| allEnabledUntil | Long | Timestamp of the end time for the processing debug events. | [optional] | + +#### CalculatedFieldConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| output | Output | | [optional] | +| type | String | | | + +#### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| createRules | Map | | | +| clearRule | AlarmRuleDefinition | | [optional] | +| propagate | Boolean | | [optional] | +| propagateToOwner | Boolean | | [optional] | +| propagateToOwnerHierarchy | Boolean | | [optional] | +| propagateToTenant | Boolean | | [optional] | +| propagateRelationTypes | List | | [optional] | + +#### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| metrics | Map | | | +| interval | AggInterval | | | +| watermark | Watermark | | [optional] | +| produceIntermediateResult | Boolean | | [optional] | + +#### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entityCoordinates | EntityCoordinates | | | +| zoneGroups | Map | | | +| scheduledUpdateEnabled | Boolean | | [optional] | +| scheduledUpdateInterval | Integer | | [optional] | + +#### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | +| relation | RelationPathLevel | | | +| applyExpressionToResolvedArguments | Boolean | | [optional] | + +#### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| relation | RelationPathLevel | | | +| arguments | Map | | | +| deduplicationIntervalInSec | Long | | [optional] | +| metrics | Map | | | +| useLatestTs | Boolean | | [optional] | +| scheduledUpdateInterval | Integer | | [optional] | +| scheduledUpdateEnabled | Boolean | | [optional] | + +#### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | + +#### SimpleCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | +| useLatestTs | Boolean | | [optional] | + +#### DeviceCredentials +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | DeviceCredentialsId | The Id is automatically generated during device creation. Use 'getDeviceCredentialsByDeviceId' to obtain the id based on device id. Use 'updateDeviceCredentials' to update device credentials. | [readonly] | +| createdTime | Long | Timestamp of the device credentials creation, in milliseconds | [optional] | +| deviceId | DeviceId | JSON object with the device Id. | | +| credentialsType | DeviceCredentialsType | Type of the credentials | [optional] | +| credentialsId | String | Unique Credentials Id per platform instance. Used to lookup credentials from the database. By default, new access token for your device. Depends on the type of the credentials. | | +| credentialsValue | String | Value of the credentials. Null in case of ACCESS_TOKEN credentials type. Base64 value in case of X509_CERTIFICATE. Complex object in case of MQTT_BASIC and LWM2M_CREDENTIALS | [optional] | +| version | Long | | [optional] | + +#### RuleChainMetaData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ruleChainId | RuleChainId | JSON object with Rule Chain Id. | [readonly] | +| version | Long | Version of the Rule Chain | [optional] | +| firstNodeIndex | Integer | Index of the first rule node in the 'nodes' list | | +| 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] | + +#### GroupPermission +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | GroupPermissionId | JSON object with the Group Permission Id. Specify this field to update the Group Permission. Referencing non-existing Group Permission Id will cause error. Omit this field to create new Group Permission. | [optional] | +| createdTime | Long | Timestamp of the group permission creation, in milliseconds | [optional] [readonly] | +| tenantId | TenantId | JSON object with the Tenant Id. | [optional] [readonly] | +| userGroupId | EntityGroupId | JSON object with the User Group Id. Represents the user group that will have permissions to perform operations against the corresponding entity group. | | +| roleId | RoleId | JSON object with the Role Id. Represents the set of permissions. The role type (GENERIC or GROUP) determines whether 'entityGroupId' is required. | | +| entityGroupId | EntityGroupId | JSON object with the Entity Group Id. Required when using a GROUP role — specifies the entity group to which the permissions apply. Must be null or omitted when using a GENERIC role. | [optional] | +| entityGroupType | EntityType | Type of the entities in the group: DEVICE, ASSET, CUSTOMER, etc. Auto-populated from the referenced entity group. Null for generic permissions. | [optional] [readonly] | +| isPublic | Boolean | | [optional] | +| name | String | Name of the Group Permissions. Auto-generated | [optional] [readonly] | +| _public | Boolean | | [optional] | + +#### DeviceGroupOtaPackage +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | UUID | | [optional] | +| groupId | EntityGroupId | | [optional] | +| otaPackageType | OtaPackageType | | [optional] | +| otaPackageId | OtaPackageId | | [optional] | +| otaPackageUpdateTime | Long | | [optional] | + +#### Output +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| name | String | | [optional] | +| scope | AttributeScope | | [optional] | +| decimalsByDefault | Integer | | [optional] | +| strategy | Object | | [optional] | +| type | String | | | + +#### AttributesOutput *(extends Output, type=`ATTRIBUTES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | AttributesOutputStrategy | | [optional] | + +#### TimeSeriesOutput *(extends Output, type=`TIME_SERIES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | TimeSeriesOutputStrategy | | [optional] | + +#### DeviceCredentialsId +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | UUID | string | | + +#### DeviceCredentialsType (enum) +`ACCESS_TOKEN` | `X509_CERTIFICATE` | `MQTT_BASIC` | `LWM2_M_CREDENTIALS` + +#### RuleNode +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | RuleNodeId | JSON object with the Rule Node Id. Specify this field to update the Rule Node. Referencing non-existing Rule Node Id will cause error. Omit this field to create new rule node. | [optional] | +| createdTime | Long | Timestamp of the rule node creation, in milliseconds | [optional] [readonly] | +| additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the rule node. May include: 'layoutX' (number, X coordinate for visualization), 'layoutY' (number, Y coordinate for visualization), 'description' (string). | [optional] | +| ruleChainId | RuleChainId | JSON object with the Rule Chain Id. | [optional] [readonly] | +| type | String | Full Java Class Name of the rule node implementation. | [optional] | +| name | String | User defined name of the rule node. Used on UI and for logging. | [optional] | +| debugSettings | DebugSettings | Debug settings object. | [optional] | +| singletonMode | Boolean | Enable/disable singleton mode. | [optional] | +| queueName | String | Queue name. | [optional] | +| configurationVersion | Integer | Version of rule node configuration. | [optional] | +| _configuration | com.fasterxml.jackson.databind.JsonNode | JSON with the rule node configuration. Structure depends on the rule node implementation. | [optional] | +| externalId | RuleNodeId | | [optional] | +| debugMode | Boolean | | [optional] | + +#### NodeConnectionInfo +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| fromIndex | Integer | Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection. | | +| toIndex | Integer | Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'to' part of the connection. | | +| type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | + +#### RuleChainConnectionInfo +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| fromIndex | Integer | Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection. | | +| targetRuleChainId | RuleChainId | JSON object with the Rule Chain Id. | | +| 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] | + +#### OtaPackageType (enum) +`FIRMWARE` | `SOFTWARE` + +#### AttributeScope (enum) +`CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` + +#### Argument +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| refEntityId | EntityId | | [optional] | +| refDynamicSourceConfiguration | CfArgumentDynamicSourceConfiguration | | [optional] | +| refEntityKey | ReferencedEntityKey | | [optional] | +| defaultValue | String | | [optional] | +| limit | Integer | | [optional] | +| timeWindow | Long | | [optional] | + +#### EntityCoordinates +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| latitudeKeyName | String | | | +| longitudeKeyName | String | | | + +#### ZoneGroupConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| refEntityId | EntityId | | [optional] | +| refDynamicSourceConfiguration | CfArgumentDynamicSourceConfiguration | | [optional] | +| perimeterKeyName | String | | | +| reportStrategy | GeofencingReportStrategy | | | +| createRelationsWithMatchedZones | Boolean | | [optional] | +| relationType | String | | [optional] | +| direction | EntitySearchDirection | | [optional] | + +#### AlarmRuleDefinition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| alarmDetails | String | | [optional] | +| condition | AlarmRuleCondition | | | +| dashboardId | DashboardId | | [optional] | + +#### RelationPathLevel +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| direction | EntitySearchDirection | | | +| relationType | String | | | + +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | String | | [optional] | +| input | AggInput | | [optional] | +| defaultValue | Double | | [optional] | + +#### AggInterval +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### CustomInterval *(extends AggInterval, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | +| durationSec | Long | | | + +#### DayInterval *(extends AggInterval, type=`DAY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### HourInterval *(extends AggInterval, type=`HOUR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### MonthInterval *(extends AggInterval, type=`MONTH`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### QuarterInterval *(extends AggInterval, type=`QUARTER`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### WeekInterval *(extends AggInterval, type=`WEEK`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### WeekSunSatInterval *(extends AggInterval, type=`WEEK_SUN_SAT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### YearInterval *(extends AggInterval, type=`YEAR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### Watermark +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | Long | | [optional] | + +#### TimeSeriesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### TimeSeriesImmediateOutputStrategy *(extends TimeSeriesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ttl | Long | | [optional] | +| saveTimeSeries | Boolean | | [optional] | +| saveLatest | Boolean | | [optional] | +| sendWsUpdate | Boolean | | [optional] | +| processCfs | Boolean | | [optional] | + +#### TimeSeriesRuleChainOutputStrategy *(extends TimeSeriesOutputStrategy, type=`RULE_CHAIN`)* +*See TimeSeriesOutputStrategy for properties.* + +#### AttributesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AttributesImmediateOutputStrategy *(extends AttributesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| sendAttributesUpdatedNotification | Boolean | | [optional] | +| updateAttributesOnlyOnValueChange | Boolean | | [optional] | +| saveAttribute | Boolean | | [optional] | +| sendWsUpdate | Boolean | | [optional] | +| processCfs | Boolean | | [optional] | + +#### AttributesRuleChainOutputStrategy *(extends AttributesOutputStrategy, type=`RULE_CHAIN`)* +*See AttributesOutputStrategy for properties.* + +#### CfArgumentDynamicSourceConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### CurrentOwnerDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`CURRENT_OWNER`)* +*See CfArgumentDynamicSourceConfiguration for properties.* + +#### RelationPathQueryDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`RELATION_PATH_QUERY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| levels | List | | [optional] | + +#### ReferencedEntityKey +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | +| type | ArgumentType | | [optional] | +| scope | AttributeScope | | [optional] | + +#### GeofencingReportStrategy (enum) +`REPORT_TRANSITION_EVENTS_ONLY` | `REPORT_PRESENCE_STATUS_ONLY` | `REPORT_TRANSITION_EVENTS_AND_PRESENCE_STATUS` + +#### EntitySearchDirection (enum) +`FROM` | `TO` + +#### AlarmRuleCondition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | AlarmConditionExpression | | | +| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| type | String | | | + +#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | + +#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* +*See AlarmRuleCondition for properties.* + +#### AggFunction (enum) +`MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` + +#### AggInput +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AggFunctionInput *(extends AggInput, type=`function`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | String | | [optional] | + +#### AggKeyInput *(extends AggInput, type=`key`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | + +#### ArgumentType (enum) +`TS_LATEST` | `ATTRIBUTE` | `TS_ROLLING` + +#### AlarmConditionExpression +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| filters | List | | | +| operation | ComplexOperation | | [optional] | + +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | String | | | + +#### AlarmConditionValueAlarmRuleSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| dynamicValueArgument | String | | [optional] | +| staticValue | AlarmRuleSchedule | | [optional] | + +#### AlarmRuleSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* +*See AlarmRuleSchedule for properties.* + +#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| items | List | | [optional] | +| timezone | String | | [optional] | + +#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| daysOfWeek | Set | | [optional] | +| endsOn | Long | | [optional] | +| startsOn | Long | | [optional] | +| timezone | String | | [optional] | + +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + +#### AlarmConditionValueLong +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Long | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmConditionValueInteger +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Integer | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmRuleConditionFilter +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| argument | String | | | +| operation | ComplexOperation | | [optional] | +| predicates | List | | | +| valueType | EntityKeyValueType | | | + +#### ComplexOperation (enum) +`AND` | `OR` + +#### AlarmRuleKeyFilterPredicate +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | BooleanOperation | | | +| value | AlarmConditionValueBoolean | | | + +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | ComplexOperation | | [optional] | +| predicates | List | | [optional] | + +#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | AlarmConditionValueLong | | | +| unit | TimeUnit | | | + +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | NumericOperation | | | +| value | AlarmConditionValueDouble | | | + +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ignoreCase | Boolean | | [optional] | +| operation | StringOperation | | | +| value | AlarmConditionValueString | | | + +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + +#### AlarmRuleCustomTimeScheduleItem +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| dayOfWeek | Integer | | [optional] | +| enabled | Boolean | | [optional] | +| endsOn | Long | | [optional] | +| startsOn | Long | | [optional] | + +#### StringOperation (enum) +`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` + +#### AlarmConditionValueString +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | String | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### NumericOperation (enum) +`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` + +#### AlarmConditionValueDouble +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Double | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### BooleanOperation (enum) +`EQUAL` | `NOT_EQUAL` + +#### AlarmConditionValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Boolean | | [optional] | +| dynamicValueArgument | String | | [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/SolutionExportImportControllerApi.md b/pe/docs/SolutionExportImportControllerApi.md new file mode 100644 index 00000000..dd304f2b --- /dev/null +++ b/pe/docs/SolutionExportImportControllerApi.md @@ -0,0 +1,82 @@ +# SolutionExportImportControllerApi + +`ThingsboardClient` methods: + +``` +SolutionExportResponse exportSolution(@Nonnull SolutionExportRequest solutionExportRequest) // Export Solution (exportSolution) +SolutionImportResult importSolution(@Nonnull SolutionData solutionData) // Import Solution (importSolution) +SolutionValidationResult validateSolution(@Nonnull SolutionData solutionData) // Validate Solution (validateSolution) +``` + + +## exportSolution + +``` +SolutionExportResponse exportSolution(@Nonnull SolutionExportRequest solutionExportRequest) +``` + +**POST** `/api/solution/export` + +Export Solution (exportSolution) + +Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solutionExportRequest** | **SolutionExportRequest** | Export request with entity IDs and optional settings. | | + +### Return type + +**SolutionExportResponse** + + +## importSolution + +``` +SolutionImportResult importSolution(@Nonnull SolutionData solutionData) +``` + +**POST** `/api/solution/import` + +Import Solution (importSolution) + +Imports a solution package into the current tenant. Before importing, the endpoint checks for name conflicts with existing entities in the tenant. If name conflicts are detected, the import is rejected with HTTP 409 (Conflict). The import is transactional — if any entity fails to import, all changes are rolled back (all-or-nothing). Entities are imported in dependency order with a two-pass resolution for circular references (e.g. rule chains referencing each other). Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solutionData** | **SolutionData** | Solution data exported via the export endpoint. | | + +### Return type + +**SolutionImportResult** + + +## validateSolution + +``` +SolutionValidationResult validateSolution(@Nonnull SolutionData solutionData) +``` + +**POST** `/api/solution/validate` + +Validate Solution (validateSolution) + +Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solutionData** | **SolutionData** | Solution data to validate. | | + +### Return type + +**SolutionValidationResult** + diff --git a/pe/docs/SolutionExportRequest.md b/pe/docs/SolutionExportRequest.md new file mode 100644 index 00000000..de4b3a98 --- /dev/null +++ b/pe/docs/SolutionExportRequest.md @@ -0,0 +1,42 @@ + +# SolutionExportRequest + +`org.thingsboard.client.model.SolutionExportRequest` + +Solution export request specifying which entities to include and export settings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **entityIds** | **Set\** | | [optional] | +| **settings** | **EntityExportSettings** | Optional export settings controlling what additional data is included (relations, attributes, credentials, etc.). If not specified, default settings will be used that include all available data. | [optional] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### EntityExportSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| exportRelations | Boolean | | [optional] | +| exportAttributes | Boolean | | [optional] | +| exportCredentials | Boolean | | [optional] | +| exportCalculatedFields | Boolean | | [optional] | +| exportPermissions | Boolean | | [optional] | +| exportGroupEntities | Boolean | | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) + +--- + +### Conventions + +- **Package:** `org.thingsboard.client.model` +- **Getter pattern:** `get()` — 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/SolutionExportResponse.md b/pe/docs/SolutionExportResponse.md new file mode 100644 index 00000000..364387de --- /dev/null +++ b/pe/docs/SolutionExportResponse.md @@ -0,0 +1,726 @@ + +# SolutionExportResponse + +`org.thingsboard.client.model.SolutionExportResponse` + +Solution export response containing the exported solution data and any dependency warnings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **solution** | **SolutionData** | The exported solution data containing all requested entities grouped by type. | [optional] | +| **warnings** | **List\** | List of dependency warnings. Generated when exported entities reference other entities that are not included in the export (e.g. a device profile references a rule chain that was not selected for export). | [optional] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entityType: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### SolutionData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entities | Map> | Exported entities grouped by entity type. Each key is an entity type (e.g. DEVICE_PROFILE, RULE_CHAIN) and the value is a list of entity export data objects. | | + +#### EntityExportData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entity | ExportableEntity | | [optional] | +| 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] | +| entityType | EntityType | | | + +#### AiModelExportData *(extends EntityExportData, entityType=`AI_MODEL`)* +*See EntityExportData for properties.* + +#### AssetExportData *(extends EntityExportData, entityType=`ASSET`)* +*See EntityExportData for properties.* + +#### AssetProfileExportData *(extends EntityExportData, entityType=`ASSET_PROFILE`)* +*See EntityExportData for properties.* + +#### ConverterExportData *(extends EntityExportData, entityType=`CONVERTER`)* +*See EntityExportData for properties.* + +#### CustomerExportData *(extends EntityExportData, entityType=`CUSTOMER`)* +*See EntityExportData for properties.* + +#### DashboardExportData *(extends EntityExportData, entityType=`DASHBOARD`)* +*See EntityExportData for properties.* + +#### DeviceExportData *(extends EntityExportData, entityType=`DEVICE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| credentials | DeviceCredentials | | [optional] | + +#### DeviceProfileExportData *(extends EntityExportData, entityType=`DEVICE_PROFILE`)* +*See EntityExportData for properties.* + +#### EntityGroupExportData *(extends EntityExportData, entityType=`ENTITY_GROUP`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| permissions | List | | [optional] | +| groupOtaPackages | List | | [optional] | +| groupEntities | Boolean | | [optional] | + +#### EntityViewExportData *(extends EntityExportData, entityType=`ENTITY_VIEW`)* +*See EntityExportData for properties.* + +#### IntegrationExportData *(extends EntityExportData, entityType=`INTEGRATION`)* +*See EntityExportData for properties.* + +#### NotificationRuleExportData *(extends EntityExportData, entityType=`NOTIFICATION_RULE`)* +*See EntityExportData for properties.* + +#### NotificationTargetExportData *(extends EntityExportData, entityType=`NOTIFICATION_TARGET`)* +*See EntityExportData for properties.* + +#### NotificationTemplateExportData *(extends EntityExportData, entityType=`NOTIFICATION_TEMPLATE`)* +*See EntityExportData for properties.* + +#### OtaPackageExportData *(extends EntityExportData, entityType=`OTA_PACKAGE`)* +*See EntityExportData for properties.* + +#### ReportTemplateExportData *(extends EntityExportData, entityType=`REPORT_TEMPLATE`)* +*See EntityExportData for properties.* + +#### RoleExportData *(extends EntityExportData, entityType=`ROLE`)* +*See EntityExportData for properties.* + +#### RuleChainExportData *(extends EntityExportData, entityType=`RULE_CHAIN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| metaData | RuleChainMetaData | | [optional] | + +#### SchedulerEventExportData *(extends EntityExportData, entityType=`SCHEDULER_EVENT`)* +*See EntityExportData for properties.* + +#### TbResourceExportData *(extends EntityExportData, entityType=`TB_RESOURCE`)* +*See EntityExportData for properties.* + +#### WidgetsBundleExportData *(extends EntityExportData, entityType=`WIDGETS_BUNDLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| widgets | List | | [optional] | +| fqns | List | | [optional] | + +#### WidgetTypeExportData *(extends EntityExportData, entityType=`WIDGET_TYPE`)* +*See EntityExportData for properties.* + +#### ExportableEntity +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| createdTime | Long | | [optional] | +| id | EntityId | | [optional] | +| name | String | | [optional] | +| tenantId | TenantId | | [optional] | + +#### EntityRelation +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| from | EntityId | JSON object with [from] Entity Id. | | +| to | EntityId | JSON object with [to] Entity Id. | | +| type | String | String value of relation type. | | +| typeGroup | RelationTypeGroup | Represents the type group of the relation. | | +| version | Long | | [optional] | +| additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the relation. | [optional] | + +#### AttributeExportData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | +| lastUpdateTs | Long | | [optional] | +| booleanValue | Boolean | | [optional] | +| strValue | String | | [optional] | +| longValue | Long | | [optional] | +| doubleValue | Double | | [optional] | +| jsonValue | String | | [optional] | + +#### CalculatedField +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | CalculatedFieldId | JSON object with the Calculated Field Id. Referencing non-existing Calculated Field Id will cause error. | [optional] | +| createdTime | Long | Timestamp of the calculated field creation, in milliseconds | [optional] [readonly] | +| tenantId | TenantId | | [optional] | +| entityId | EntityId | | [optional] | +| type | CalculatedFieldType | | [optional] | +| name | String | User defined name of the calculated field. | [optional] | +| debugSettings | DebugSettings | Debug settings object. | [optional] | +| 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] | +| debugMode | Boolean | | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (46 values total) + +#### RelationTypeGroup (enum) +`COMMON` | `DASHBOARD` | `FROM_ENTITY_GROUP` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` + +#### CalculatedFieldType (enum) +`SIMPLE` | `SCRIPT` | `GEOFENCING` | `ALARM` | `PROPAGATION` | `RELATED_ENTITIES_AGGREGATION` | `ENTITY_AGGREGATION` + +#### DebugSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| failuresEnabled | Boolean | Debug failures. | [optional] | +| allEnabled | Boolean | Debug All. Used as a trigger for updating debugAllUntil. | [optional] | +| allEnabledUntil | Long | Timestamp of the end time for the processing debug events. | [optional] | + +#### CalculatedFieldConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| output | Output | | [optional] | +| type | String | | | + +#### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| createRules | Map | | | +| clearRule | AlarmRuleDefinition | | [optional] | +| propagate | Boolean | | [optional] | +| propagateToOwner | Boolean | | [optional] | +| propagateToOwnerHierarchy | Boolean | | [optional] | +| propagateToTenant | Boolean | | [optional] | +| propagateRelationTypes | List | | [optional] | + +#### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| metrics | Map | | | +| interval | AggInterval | | | +| watermark | Watermark | | [optional] | +| produceIntermediateResult | Boolean | | [optional] | + +#### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entityCoordinates | EntityCoordinates | | | +| zoneGroups | Map | | | +| scheduledUpdateEnabled | Boolean | | [optional] | +| scheduledUpdateInterval | Integer | | [optional] | + +#### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | +| relation | RelationPathLevel | | | +| applyExpressionToResolvedArguments | Boolean | | [optional] | + +#### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| relation | RelationPathLevel | | | +| arguments | Map | | | +| deduplicationIntervalInSec | Long | | [optional] | +| metrics | Map | | | +| useLatestTs | Boolean | | [optional] | +| scheduledUpdateInterval | Integer | | [optional] | +| scheduledUpdateEnabled | Boolean | | [optional] | + +#### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | + +#### SimpleCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Map | | | +| expression | String | | [optional] | +| useLatestTs | Boolean | | [optional] | + +#### DeviceCredentials +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | DeviceCredentialsId | The Id is automatically generated during device creation. Use 'getDeviceCredentialsByDeviceId' to obtain the id based on device id. Use 'updateDeviceCredentials' to update device credentials. | [readonly] | +| createdTime | Long | Timestamp of the device credentials creation, in milliseconds | [optional] | +| deviceId | DeviceId | JSON object with the device Id. | | +| credentialsType | DeviceCredentialsType | Type of the credentials | [optional] | +| credentialsId | String | Unique Credentials Id per platform instance. Used to lookup credentials from the database. By default, new access token for your device. Depends on the type of the credentials. | | +| credentialsValue | String | Value of the credentials. Null in case of ACCESS_TOKEN credentials type. Base64 value in case of X509_CERTIFICATE. Complex object in case of MQTT_BASIC and LWM2M_CREDENTIALS | [optional] | +| version | Long | | [optional] | + +#### RuleChainMetaData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ruleChainId | RuleChainId | JSON object with Rule Chain Id. | [readonly] | +| version | Long | Version of the Rule Chain | [optional] | +| firstNodeIndex | Integer | Index of the first rule node in the 'nodes' list | | +| 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] | + +#### GroupPermission +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | GroupPermissionId | JSON object with the Group Permission Id. Specify this field to update the Group Permission. Referencing non-existing Group Permission Id will cause error. Omit this field to create new Group Permission. | [optional] | +| createdTime | Long | Timestamp of the group permission creation, in milliseconds | [optional] [readonly] | +| tenantId | TenantId | JSON object with the Tenant Id. | [optional] [readonly] | +| userGroupId | EntityGroupId | JSON object with the User Group Id. Represents the user group that will have permissions to perform operations against the corresponding entity group. | | +| roleId | RoleId | JSON object with the Role Id. Represents the set of permissions. The role type (GENERIC or GROUP) determines whether 'entityGroupId' is required. | | +| entityGroupId | EntityGroupId | JSON object with the Entity Group Id. Required when using a GROUP role — specifies the entity group to which the permissions apply. Must be null or omitted when using a GENERIC role. | [optional] | +| entityGroupType | EntityType | Type of the entities in the group: DEVICE, ASSET, CUSTOMER, etc. Auto-populated from the referenced entity group. Null for generic permissions. | [optional] [readonly] | +| isPublic | Boolean | | [optional] | +| name | String | Name of the Group Permissions. Auto-generated | [optional] [readonly] | +| _public | Boolean | | [optional] | + +#### DeviceGroupOtaPackage +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | UUID | | [optional] | +| groupId | EntityGroupId | | [optional] | +| otaPackageType | OtaPackageType | | [optional] | +| otaPackageId | OtaPackageId | | [optional] | +| otaPackageUpdateTime | Long | | [optional] | + +#### Output +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| name | String | | [optional] | +| scope | AttributeScope | | [optional] | +| decimalsByDefault | Integer | | [optional] | +| strategy | Object | | [optional] | +| type | String | | | + +#### AttributesOutput *(extends Output, type=`ATTRIBUTES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | AttributesOutputStrategy | | [optional] | + +#### TimeSeriesOutput *(extends Output, type=`TIME_SERIES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | TimeSeriesOutputStrategy | | [optional] | + +#### DeviceCredentialsId +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | UUID | string | | + +#### DeviceCredentialsType (enum) +`ACCESS_TOKEN` | `X509_CERTIFICATE` | `MQTT_BASIC` | `LWM2_M_CREDENTIALS` + +#### RuleNode +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | RuleNodeId | JSON object with the Rule Node Id. Specify this field to update the Rule Node. Referencing non-existing Rule Node Id will cause error. Omit this field to create new rule node. | [optional] | +| createdTime | Long | Timestamp of the rule node creation, in milliseconds | [optional] [readonly] | +| additionalInfo | com.fasterxml.jackson.databind.JsonNode | Additional parameters of the rule node. May include: 'layoutX' (number, X coordinate for visualization), 'layoutY' (number, Y coordinate for visualization), 'description' (string). | [optional] | +| ruleChainId | RuleChainId | JSON object with the Rule Chain Id. | [optional] [readonly] | +| type | String | Full Java Class Name of the rule node implementation. | [optional] | +| name | String | User defined name of the rule node. Used on UI and for logging. | [optional] | +| debugSettings | DebugSettings | Debug settings object. | [optional] | +| singletonMode | Boolean | Enable/disable singleton mode. | [optional] | +| queueName | String | Queue name. | [optional] | +| configurationVersion | Integer | Version of rule node configuration. | [optional] | +| _configuration | com.fasterxml.jackson.databind.JsonNode | JSON with the rule node configuration. Structure depends on the rule node implementation. | [optional] | +| externalId | RuleNodeId | | [optional] | +| debugMode | Boolean | | [optional] | + +#### NodeConnectionInfo +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| fromIndex | Integer | Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection. | | +| toIndex | Integer | Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'to' part of the connection. | | +| type | String | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | + +#### RuleChainConnectionInfo +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| fromIndex | Integer | Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection. | | +| targetRuleChainId | RuleChainId | JSON object with the Rule Chain Id. | | +| 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] | + +#### OtaPackageType (enum) +`FIRMWARE` | `SOFTWARE` + +#### AttributeScope (enum) +`CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` + +#### Argument +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| refEntityId | EntityId | | [optional] | +| refDynamicSourceConfiguration | CfArgumentDynamicSourceConfiguration | | [optional] | +| refEntityKey | ReferencedEntityKey | | [optional] | +| defaultValue | String | | [optional] | +| limit | Integer | | [optional] | +| timeWindow | Long | | [optional] | + +#### EntityCoordinates +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| latitudeKeyName | String | | | +| longitudeKeyName | String | | | + +#### ZoneGroupConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| refEntityId | EntityId | | [optional] | +| refDynamicSourceConfiguration | CfArgumentDynamicSourceConfiguration | | [optional] | +| perimeterKeyName | String | | | +| reportStrategy | GeofencingReportStrategy | | | +| createRelationsWithMatchedZones | Boolean | | [optional] | +| relationType | String | | [optional] | +| direction | EntitySearchDirection | | [optional] | + +#### AlarmRuleDefinition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| alarmDetails | String | | [optional] | +| condition | AlarmRuleCondition | | | +| dashboardId | DashboardId | | [optional] | + +#### RelationPathLevel +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| direction | EntitySearchDirection | | | +| relationType | String | | | + +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | String | | [optional] | +| input | AggInput | | [optional] | +| defaultValue | Double | | [optional] | + +#### AggInterval +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### CustomInterval *(extends AggInterval, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | +| durationSec | Long | | | + +#### DayInterval *(extends AggInterval, type=`DAY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### HourInterval *(extends AggInterval, type=`HOUR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### MonthInterval *(extends AggInterval, type=`MONTH`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### QuarterInterval *(extends AggInterval, type=`QUARTER`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### WeekInterval *(extends AggInterval, type=`WEEK`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### WeekSunSatInterval *(extends AggInterval, type=`WEEK_SUN_SAT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### YearInterval *(extends AggInterval, type=`YEAR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | String | | | +| offsetSec | Long | | [optional] | + +#### Watermark +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | Long | | [optional] | + +#### TimeSeriesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### TimeSeriesImmediateOutputStrategy *(extends TimeSeriesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ttl | Long | | [optional] | +| saveTimeSeries | Boolean | | [optional] | +| saveLatest | Boolean | | [optional] | +| sendWsUpdate | Boolean | | [optional] | +| processCfs | Boolean | | [optional] | + +#### TimeSeriesRuleChainOutputStrategy *(extends TimeSeriesOutputStrategy, type=`RULE_CHAIN`)* +*See TimeSeriesOutputStrategy for properties.* + +#### AttributesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AttributesImmediateOutputStrategy *(extends AttributesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| sendAttributesUpdatedNotification | Boolean | | [optional] | +| updateAttributesOnlyOnValueChange | Boolean | | [optional] | +| saveAttribute | Boolean | | [optional] | +| sendWsUpdate | Boolean | | [optional] | +| processCfs | Boolean | | [optional] | + +#### AttributesRuleChainOutputStrategy *(extends AttributesOutputStrategy, type=`RULE_CHAIN`)* +*See AttributesOutputStrategy for properties.* + +#### CfArgumentDynamicSourceConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### CurrentOwnerDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`CURRENT_OWNER`)* +*See CfArgumentDynamicSourceConfiguration for properties.* + +#### RelationPathQueryDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`RELATION_PATH_QUERY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| levels | List | | [optional] | + +#### ReferencedEntityKey +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | +| type | ArgumentType | | [optional] | +| scope | AttributeScope | | [optional] | + +#### GeofencingReportStrategy (enum) +`REPORT_TRANSITION_EVENTS_ONLY` | `REPORT_PRESENCE_STATUS_ONLY` | `REPORT_TRANSITION_EVENTS_AND_PRESENCE_STATUS` + +#### EntitySearchDirection (enum) +`FROM` | `TO` + +#### AlarmRuleCondition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | AlarmConditionExpression | | | +| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| type | String | | | + +#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | + +#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* +*See AlarmRuleCondition for properties.* + +#### AggFunction (enum) +`MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` + +#### AggInput +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AggFunctionInput *(extends AggInput, type=`function`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | String | | [optional] | + +#### AggKeyInput *(extends AggInput, type=`key`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | String | | [optional] | + +#### ArgumentType (enum) +`TS_LATEST` | `ATTRIBUTE` | `TS_ROLLING` + +#### AlarmConditionExpression +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| filters | List | | | +| operation | ComplexOperation | | [optional] | + +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | String | | | + +#### AlarmConditionValueAlarmRuleSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| dynamicValueArgument | String | | [optional] | +| staticValue | AlarmRuleSchedule | | [optional] | + +#### AlarmRuleSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* +*See AlarmRuleSchedule for properties.* + +#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| items | List | | [optional] | +| timezone | String | | [optional] | + +#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| daysOfWeek | Set | | [optional] | +| endsOn | Long | | [optional] | +| startsOn | Long | | [optional] | +| timezone | String | | [optional] | + +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + +#### AlarmConditionValueLong +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Long | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmConditionValueInteger +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Integer | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### AlarmRuleConditionFilter +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| argument | String | | | +| operation | ComplexOperation | | [optional] | +| predicates | List | | | +| valueType | EntityKeyValueType | | | + +#### ComplexOperation (enum) +`AND` | `OR` + +#### AlarmRuleKeyFilterPredicate +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | String | | | + +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | BooleanOperation | | | +| value | AlarmConditionValueBoolean | | | + +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | ComplexOperation | | [optional] | +| predicates | List | | [optional] | + +#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | AlarmConditionValueLong | | | +| unit | TimeUnit | | | + +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | NumericOperation | | | +| value | AlarmConditionValueDouble | | | + +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ignoreCase | Boolean | | [optional] | +| operation | StringOperation | | | +| value | AlarmConditionValueString | | | + +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + +#### AlarmRuleCustomTimeScheduleItem +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| dayOfWeek | Integer | | [optional] | +| enabled | Boolean | | [optional] | +| endsOn | Long | | [optional] | +| startsOn | Long | | [optional] | + +#### StringOperation (enum) +`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` + +#### AlarmConditionValueString +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | String | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### NumericOperation (enum) +`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` + +#### AlarmConditionValueDouble +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Double | | [optional] | +| dynamicValueArgument | String | | [optional] | + +#### BooleanOperation (enum) +`EQUAL` | `NOT_EQUAL` + +#### AlarmConditionValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| staticValue | Boolean | | [optional] | +| dynamicValueArgument | String | | [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/SimpleAlarmConditionSpec.md b/pe/docs/SolutionImportResult.md similarity index 55% rename from pe/docs/SimpleAlarmConditionSpec.md rename to pe/docs/SolutionImportResult.md index 8b813c14..5f0a51f1 100644 --- a/pe/docs/SimpleAlarmConditionSpec.md +++ b/pe/docs/SolutionImportResult.md @@ -1,24 +1,19 @@ -# SimpleAlarmConditionSpec +# SolutionImportResult -`org.thingsboard.client.model.SimpleAlarmConditionSpec` +`org.thingsboard.client.model.SolutionImportResult` -**Extends:** **AlarmConditionSpec** +Result of a solution import operation. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **success** | **Boolean** | 'true' if all entities were imported successfully. | [optional] | +| **created** | **Map\** | Number of newly created entities per entity type. Entity types with zero created entities are omitted. | [optional] | -## Referenced Types - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | String | | | - --- ### Conventions diff --git a/pe/docs/SolutionValidationResult.md b/pe/docs/SolutionValidationResult.md new file mode 100644 index 00000000..d756c48e --- /dev/null +++ b/pe/docs/SolutionValidationResult.md @@ -0,0 +1,27 @@ + +# SolutionValidationResult + +`org.thingsboard.client.model.SolutionValidationResult` + +Result of a solution validation (dry-run). Checks structural validity and dependency references without modifying any data. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **valid** | **Boolean** | 'true' if the solution can be imported without errors. 'false' if there are structural issues (empty entities, unsupported types, malformed data). | [optional] | +| **entitySummary** | **Map\** | Number of entities per type found in the solution file. | [optional] | +| **conflicts** | **List\** | List of blocking issues that would prevent import (e.g. unsupported entity types, missing or malformed entity data). | [optional] | +| **warnings** | **List\** | List of non-blocking warnings (e.g. missing dependency references). | [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/SpecificTimeSchedule.md b/pe/docs/SpecificTimeSchedule.md deleted file mode 100644 index fcd3caf4..00000000 --- a/pe/docs/SpecificTimeSchedule.md +++ /dev/null @@ -1,49 +0,0 @@ - -# SpecificTimeSchedule - -`org.thingsboard.client.model.SpecificTimeSchedule` - -**Extends:** **AlarmSchedule** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **daysOfWeek** | **Set\** | | [optional] | -| **endsOn** | **Long** | | [optional] | -| **startsOn** | **Long** | | [optional] | -| **timezone** | **String** | | [optional] | - - - -## Referenced Types - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamicValue | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolvedValue | String | | [optional] | -| sourceType | DynamicValueSourceType | | [optional] | -| sourceAttribute | String | | [optional] | -| inherit | Boolean | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### 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/TbChatRequest.md b/pe/docs/TbChatRequest.md index 60c0edf7..6389386e 100644 --- a/pe/docs/TbChatRequest.md +++ b/pe/docs/TbChatRequest.md @@ -28,7 +28,6 @@ #### AmazonBedrockChatModelConfig *(extends AiModelConfig, provider=`AMAZON_BEDROCK`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AmazonBedrockProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -36,11 +35,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### AnthropicChatModelConfig *(extends AiModelConfig, provider=`ANTHROPIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AnthropicProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -49,11 +48,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### AzureOpenAiChatModelConfig *(extends AiModelConfig, provider=`AZURE_OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | AzureOpenAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -63,11 +62,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GitHubModelsChatModelConfig *(extends AiModelConfig, provider=`GITHUB_MODELS`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GitHubModelsProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -77,11 +76,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GoogleAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GoogleAiGeminiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -92,11 +91,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### GoogleVertexAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_VERTEX_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | GoogleVertexAiGeminiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -107,11 +106,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### MistralAiChatModelConfig *(extends AiModelConfig, provider=`MISTRAL_AI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | MistralAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -121,11 +120,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### OllamaChatModelConfig *(extends AiModelConfig, provider=`OLLAMA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | OllamaProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -135,11 +134,11 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### OpenAiChatModelConfig *(extends AiModelConfig, provider=`OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| modelType | AiModelType | | [optional] [readonly] | | providerConfig | OpenAiProviderConfig | | | | modelId | String | | | | temperature | Double | | [optional] | @@ -149,6 +148,7 @@ | maxOutputTokens | Integer | | [optional] | | timeoutSeconds | Integer | | [optional] | | maxRetries | Integer | | [optional] | +| modelType | AiModelType | | [optional] [readonly] | #### TbContent | Name | Type | Description | Notes | @@ -160,15 +160,15 @@ |------|------|-------------|-------| | text | String | The text content | | -#### AiModelType (enum) -`CHAT` - #### OpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | baseUrl | String | | [optional] | | apiKey | String | | [optional] | +#### AiModelType (enum) +`CHAT` + #### AzureOpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/pe/docs/TbResourceExportData.md b/pe/docs/TbResourceExportData.md index 4c460652..41dfb7d6 100644 --- a/pe/docs/TbResourceExportData.md +++ b/pe/docs/TbResourceExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/TranslationControllerApi.md b/pe/docs/TranslationControllerApi.md index c8fe06cf..d81c8d66 100644 --- a/pe/docs/TranslationControllerApi.md +++ b/pe/docs/TranslationControllerApi.md @@ -6,7 +6,7 @@ File downloadFullTranslation(@Nonnull String localeCode) // Download end-user all-to-one translation (downloadFullTranslation) com.fasterxml.jackson.databind.JsonNode getAvailableJavaLocales() // Get list of available java locales (getAvailableJavaLocales) com.fasterxml.jackson.databind.JsonNode getAvailableLocales() // Get list of available locales (getAvailableLocales) -void getFullTranslation(@Nonnull String localeCode, @Nullable String ifNoneMatch, @Nullable String acceptEncoding) // Get end-user all-to-one translation (getFullTranslation) +com.fasterxml.jackson.databind.JsonNode getFullTranslation(@Nonnull String localeCode, @Nullable String ifNoneMatch, @Nullable String acceptEncoding) // Get end-user all-to-one translation (getFullTranslation) com.fasterxml.jackson.databind.JsonNode getLoginPageTranslation(@Nonnull String localeCode, @Nullable String ifNoneMatch, @Nullable String acceptEncoding) // Get system translation for login page com.fasterxml.jackson.databind.JsonNode getTranslationForBasicEdit(@Nonnull String localeCode) // Get end-user multi-translation for basic edit (getTranslationForBasicEdit) List getTranslationInfos() // Get Translation info (getTranslationInfos) @@ -74,7 +74,7 @@ Fetch the list of customized locales from all levels Security check is performe ## getFullTranslation ``` -void getFullTranslation(@Nonnull String localeCode, @Nullable String ifNoneMatch, @Nullable String acceptEncoding) +com.fasterxml.jackson.databind.JsonNode getFullTranslation(@Nonnull String localeCode, @Nullable String ifNoneMatch, @Nullable String acceptEncoding) ``` **GET** `/api/translation/full/{localeCode}` @@ -94,7 +94,7 @@ Fetch the end-user translation for specified locale. The result is the merge of ### Return type -null (empty response body) +**com.fasterxml.jackson.databind.JsonNode** ## getLoginPageTranslation diff --git a/pe/docs/WidgetTypeExportData.md b/pe/docs/WidgetTypeExportData.md index cbaaff68..aa0e8a0f 100644 --- a/pe/docs/WidgetTypeExportData.md +++ b/pe/docs/WidgetTypeExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/docs/WidgetsBundleExportData.md b/pe/docs/WidgetsBundleExportData.md index 94e0a43d..3bbb8bbc 100644 --- a/pe/docs/WidgetsBundleExportData.md +++ b/pe/docs/WidgetsBundleExportData.md @@ -30,8 +30,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| createdTime | Long | | [optional] | | id | EntityId | | [optional] | | name | String | | [optional] | +| tenantId | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | diff --git a/pe/spec/openapi.json b/pe/spec/openapi.json index 7953d559..86ed2124 100644 --- a/pe/spec/openapi.json +++ b/pe/spec/openapi.json @@ -37,6 +37,10 @@ "name": "alarm-controller", "description": "Alarm Controller" }, + { + "name": "alarm-rule-controller", + "description": "Alarm Rule Controller" + }, { "name": "api-key-controller", "description": "Api Key Controller" @@ -277,6 +281,10 @@ "name": "solution-controller", "description": "Solution Controller" }, + { + "name": "solution-export-import-controller", + "description": "Solution Export Import Controller" + }, { "name": "tb-resource-controller", "description": "Tb Resource Controller" @@ -7726,19 +7734,20 @@ ] } }, - "/api/apiKey": { + "/api/alarm/rule": { "post": { "tags": [ - "api-key-controller" + "alarm-rule-controller" ], - "summary": "Save API key for user (saveApiKey)", - "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", + "summary": "Create Or Update Alarm Rule (saveAlarmRule)", + "description": "Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveAlarmRule", "requestBody": { + "description": "A JSON value representing the alarm rule.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyInfo" + "$ref": "#/components/schemas/AlarmRuleDefinition" } } }, @@ -7750,7 +7759,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKey" + "$ref": "#/components/schemas/AlarmRuleDefinition" } } } @@ -7871,28 +7880,35 @@ ] } }, - "/api/apiKey/{id}": { - "delete": { + "/api/alarm/rule/testScript": { + "post": { "tags": [ - "api-key-controller" + "alarm-rule-controller" ], - "summary": "Delete API key by ID (deleteApiKey)", - "description": "Deletes the API key. Referencing non-existing ApiKey Id will cause an error.\n\nAvailable for any authorized user. ", - "operationId": "deleteApiKey", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Test alarm rule TBEL expression (testAlarmRuleScript)", + "description": "Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: \n\n```json\n{\n \"expression\": \"return temperature > 50;\",\n \"arguments\": {\n \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "testAlarmRuleScript", + "requestBody": { + "description": "Test alarm rule TBEL condition expression. The expression must return a boolean value.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } }, "400": { "description": "Bad Request", @@ -7906,7 +7922,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -8010,43 +8026,31 @@ ] } }, - "/api/apiKey/{id}/description": { - "put": { + "/api/alarm/rule/{alarmRuleId}": { + "get": { "tags": [ - "api-key-controller" + "alarm-rule-controller" ], - "summary": "Update API key Description", - "description": "Updates the description of the existing API key by apiKeyId. Only the description can be updated. Referencing a non-existing ApiKey Id will cause a 'Not Found' error.\n\nAvailable for any authorized user. ", - "operationId": "updateApiKeyDescription", + "summary": "Get Alarm Rule (getAlarmRuleById)", + "description": "Fetch the Alarm Rule object based on the provided Alarm Rule Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRuleById", "parameters": [ { - "name": "id", + "name": "alarmRuleId", "in": "path", - "description": "A string value representing the api key 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 API key" - } - } - } - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyInfo" + "$ref": "#/components/schemas/AlarmRuleDefinition" } } } @@ -8165,34 +8169,159 @@ "ApiKeyForm": [] } ] - } - }, - "/api/apiKey/{id}/enabled/{enabledValue}": { - "put": { + }, + "delete": { "tags": [ - "api-key-controller" + "alarm-rule-controller" ], - "summary": "Enable or disable API key (enableApiKey)", - "description": "Updates api key with enabled = true/false. \n\nAvailable for any authorized user. ", - "operationId": "enableApiKey", + "summary": "Delete Alarm Rule (deleteAlarmRule)", + "description": "Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteAlarmRule", "parameters": [ { - "name": "id", + "name": "alarmRuleId", "in": "path", - "description": "Unique identifier of the API key to enable/disable", "required": true, "schema": { - "type": "string", - "format": "uuid" + "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 + } + } + } + } + } + }, + "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": "enabledValue", + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/alarm/rule/{alarmRuleId}/debug": { + "get": { + "tags": [ + "alarm-rule-controller" + ], + "summary": "Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent)", + "description": "Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLatestAlarmRuleDebugEvent", + "parameters": [ + { + "name": "alarmRuleId", "in": "path", - "description": "Enabled or disabled api key", "required": true, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -8202,7 +8331,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -8323,24 +8452,15 @@ ] } }, - "/api/apiKeys/{userId}": { + "/api/alarm/rules": { "get": { "tags": [ - "api-key-controller" + "alarm-rule-controller" ], - "summary": "Get User Api Keys (getUserApiKeys)", - "description": "Returns a page of api keys owned by 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 any authorized user. ", - "operationId": "getUserApiKeys", + "summary": "Get alarm rules (getAlarmRules)", + "description": "Fetch tenant alarm rules based on the filter.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRules", "parameters": [ - { - "name": "userId", - "in": "path", - "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -8361,10 +8481,33 @@ "format": "int32" } }, + { + "name": "entityType", + "in": "query", + "description": "Entity type filter. If not specified, alarm rules for all supported entity types will be returned.", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "entities", + "in": "query", + "description": "Entities filter. If not specified, alarm rules for entity type filter will be returned.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the description.", + "description": "The case insensitive 'substring' filter based on the calculated field name.", "required": false, "schema": { "type": "string" @@ -8379,9 +8522,7 @@ "type": "string", "enum": [ "createdTime", - "expirationTime", - "description", - "enabled" + "name" ] } }, @@ -8405,7 +8546,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataApiKeyInfo" + "$ref": "#/components/schemas/PageDataAlarmRuleDefinitionInfo" } } } @@ -8526,85 +8667,65 @@ ] } }, - "/api/asset": { - "post": { + "/api/alarm/rules/names": { + "get": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Create Or Update Asset (saveAsset)", - "description": "Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. \n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveAsset", + "summary": "Get alarm rule names (getAlarmRuleNames)", + "description": "Fetch the list of alarm rule names.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRuleNames", "parameters": [ { - "name": "entityGroupId", + "name": "pageSize", "in": "query", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group.", - "required": false, + "description": "Maximum amount of entities in a one page", + "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "entityGroupIds", + "name": "page", "in": "query", - "description": "A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups.", - "required": false, + "description": "Sequence number of page starting from 0", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "format": "int32" } }, { - "name": "nameConflictPolicy", + "name": "textSearch", "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.", + "description": "The case insensitive 'substring' filter based on the calculated field name.", "required": false, "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" + "type": "string" } }, { - "name": "uniquifySeparator", + "name": "sortOrder", "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": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "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" + "enum": [ + "ASC", + "DESC" + ] } } ], - "requestBody": { - "description": "A JSON value representing the asset.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Asset" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Asset" + "$ref": "#/components/schemas/PageDataString" } } } @@ -8621,7 +8742,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -8725,31 +8846,96 @@ ] } }, - "/api/asset/bulk_import": { - "post": { + "/api/alarm/rules/{entityType}/{entityId}": { + "get": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Import the bulk of assets (processAssetsBulkImport)", - "description": "There's an ability to import the bulk of assets using the only .csv file.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "processAssetBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } + "summary": "Get Alarm Rules by Entity Id (getAlarmRulesByEntityId)", + "description": "Fetch the Alarm Rules based on the provided Entity Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRulesByEntityId", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" } }, - "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" + } + }, + { + "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 calculated field 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" + ] + } + }, + { + "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/BulkImportResultAsset" + "$ref": "#/components/schemas/PageDataAlarmRuleDefinition" } } } @@ -8766,7 +8952,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -8870,32 +9056,31 @@ ] } }, - "/api/asset/info/{assetId}": { - "get": { + "/api/apiKey": { + "post": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Get Asset Info (getAssetInfoById)", - "description": "Fetch the Asset Info object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.Asset Info is an extension of the default Asset object that contains information about the owner name. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetInfoById", - "parameters": [ - { - "name": "assetId", - "in": "path", - "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Save API key for user (saveApiKey)", + "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": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKeyInfo" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetInfo" + "$ref": "#/components/schemas/ApiKey" } } } @@ -8912,7 +9097,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -9016,27 +9201,28 @@ ] } }, - "/api/asset/types": { - "get": { + "/api/apiKey/{id}": { + "delete": { "tags": [ - "asset-controller" + "api-key-controller" + ], + "summary": "Delete API key by ID (deleteApiKey)", + "description": "Deletes the API key. Referencing non-existing ApiKey Id will cause an error.\n\nAvailable for any authorized user. ", + "operationId": "deleteApiKey", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Get Asset Types (getAssetTypes)", - "description": "Deprecated. See 'getAssetProfileNames' API from Asset Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetTypes", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -9144,7 +9330,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -9155,32 +9340,43 @@ ] } }, - "/api/asset/{assetId}": { - "get": { + "/api/apiKey/{id}/description": { + "put": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Get Asset (getAssetById)", - "description": "Fetch the Asset object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetById", + "summary": "Update API key Description", + "description": "Updates the description of the existing API key by apiKeyId. Only the description can be updated. Referencing a non-existing ApiKey Id will cause a 'Not Found' error.\n\nAvailable for any authorized user. ", + "operationId": "updateApiKeyDescription", "parameters": [ { - "name": "assetId", + "name": "id", "in": "path", - "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the api key id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New description for the API key" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Asset" + "$ref": "#/components/schemas/ApiKeyInfo" } } } @@ -9299,28 +9495,47 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/apiKey/{id}/enabled/{enabledValue}": { + "put": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Delete asset (deleteAsset)", - "description": "Deletes the asset and all the relations (from and to the asset). Referencing non-existing asset Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteAsset", + "summary": "Enable or disable API key (enableApiKey)", + "description": "Updates api key with enabled = true/false. \n\nAvailable for any authorized user. ", + "operationId": "enableApiKey", "parameters": [ { - "name": "assetId", + "name": "id", "in": "path", - "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Unique identifier of the API key to enable/disable", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" + } + }, + { + "name": "enabledValue", + "in": "path", + "description": "Enabled or disabled api key", + "required": true, + "schema": { + "type": "boolean" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKeyInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -9438,15 +9653,24 @@ ] } }, - "/api/assetInfos/all": { + "/api/apiKeys/{userId}": { "get": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Get All Asset Infos for current user (getAllAssetInfos)", - "description": "Returns a page of asset info objects owned by the tenant or the customer of a current user. Asset Info is an extension of the default Asset 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": "getAllAssetInfos", + "summary": "Get User Api Keys (getUserApiKeys)", + "description": "Returns a page of api keys owned by 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 any authorized user. ", + "operationId": "getUserApiKeys", "parameters": [ + { + "name": "userId", + "in": "path", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", @@ -9467,28 +9691,10 @@ "format": "int32" } }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "assetProfileId", - "in": "query", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", + "description": "The case insensitive 'substring' filter based on the description.", "required": false, "schema": { "type": "string" @@ -9503,10 +9709,9 @@ "type": "string", "enum": [ "createdTime", - "name", - "type", - "label", - "customerTitle" + "expirationTime", + "description", + "enabled" ] } }, @@ -9530,7 +9735,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAssetInfo" + "$ref": "#/components/schemas/PageDataApiKeyInfo" } } } @@ -9651,38 +9856,85 @@ ] } }, - "/api/assets": { - "get": { + "/api/asset": { + "post": { "tags": [ "asset-controller" ], - "summary": "Get Assets By Ids (getAssetsByIds)", - "description": "Requested assets 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": "getAssetsByIds", + "summary": "Create Or Update Asset (saveAsset)", + "description": "Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. \n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveAsset", "parameters": [ { - "name": "assetIds", + "name": "entityGroupId", "in": "query", - "description": "A list of asset ids, separated by comma ','", - "required": true, + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups.", + "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 asset.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Asset" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } + "$ref": "#/components/schemas/Asset" } } } @@ -9699,7 +9951,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -9801,19 +10053,21 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/asset/bulk_import": { "post": { "tags": [ "asset-controller" ], - "summary": "Find related assets (findAssetsByQuery)", - "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findAssetsByQuery", + "summary": "Import the bulk of assets (processAssetsBulkImport)", + "description": "There's an ability to import the bulk of assets using the only .csv file.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "processAssetBulkImport", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetSearchQuery" + "$ref": "#/components/schemas/BulkImportRequest" } } }, @@ -9825,10 +10079,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } + "$ref": "#/components/schemas/BulkImportResultAsset" } } } @@ -9949,99 +10200,23 @@ ] } }, - "/api/customer/{customerId}/assetInfos": { + "/api/asset/info/{assetId}": { "get": { "tags": [ "asset-controller" ], - "summary": "Get Customer Asset Infos (getCustomerAssetInfos)", - "description": "Returns a page of asset info objects owned by the specified customer. Asset Info is an extension of the default Asset 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": "getCustomerAssetInfos", + "summary": "Get Asset Info (getAssetInfoById)", + "description": "Fetch the Asset Info object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.Asset Info is an extension of the default Asset object that contains information about the owner name. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAssetInfoById", "parameters": [ { - "name": "customerId", + "name": "assetId", "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 asset 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": "assetProfileId", - "in": "query", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset 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": { @@ -10050,7 +10225,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAssetInfo" + "$ref": "#/components/schemas/AssetInfo" } } } @@ -10171,99 +10346,24 @@ ] } }, - "/api/customer/{customerId}/assets": { + "/api/asset/types": { "get": { "tags": [ "asset-controller" ], - "summary": "Get Customer Assets (getCustomerAssets)", - "description": "Returns a page of assets objects owned by 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\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerAssets", - "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": "Asset type", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset 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 Asset Types (getAssetTypes)", + "description": "Deprecated. See 'getAssetProfileNames' API from Asset Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -10374,6 +10474,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -10384,81 +10485,23 @@ ] } }, - "/api/entityGroup/{entityGroupId}/assets": { + "/api/asset/{assetId}": { "get": { "tags": [ "asset-controller" ], - "summary": "Get assets by Entity Group Id (getAssetsByEntityGroupId)", - "description": "Returns a page of asset 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\n Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAssetsByEntityGroupId", + "summary": "Get Asset (getAssetById)", + "description": "Fetch the Asset object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAssetById", "parameters": [ { - "name": "entityGroupId", + "name": "assetId", "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 asset 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 asset 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": { @@ -10467,7 +10510,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "$ref": "#/components/schemas/Asset" } } } @@ -10586,21 +10629,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/tenant/asset": { - "get": { + }, + "delete": { "tags": [ "asset-controller" ], - "summary": "Get Tenant Asset (getTenantAssetByName)", - "description": "Requested asset must be owned by tenant that the user belongs to. Asset name is an unique property of asset. So it can be used to identify the asset.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantAssetByName", + "summary": "Delete asset (deleteAsset)", + "description": "Deletes the asset and all the relations (from and to the asset). Referencing non-existing asset Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteAsset", "parameters": [ { - "name": "assetName", - "in": "query", - "description": "A string value representing the Asset name.", + "name": "assetId", + "in": "path", + "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -10609,14 +10650,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Asset" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -10734,14 +10768,14 @@ ] } }, - "/api/tenant/assets": { + "/api/assetInfos/all": { "get": { "tags": [ "asset-controller" ], - "summary": "Get Tenant Assets (getTenantAssets)", - "description": "Returns a page of assets 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": "getTenantAssets", + "summary": "Get All Asset Infos for current user (getAllAssetInfos)", + "description": "Returns a page of asset info objects owned by the tenant or the customer of a current user. Asset Info is an extension of the default Asset 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": "getAllAssetInfos", "parameters": [ { "name": "pageSize", @@ -10764,9 +10798,18 @@ } }, { - "name": "type", + "name": "includeCustomers", "in": "query", - "description": "Asset type", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "assetProfileId", + "in": "query", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { "type": "string" @@ -10817,7 +10860,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "$ref": "#/components/schemas/PageDataAssetInfo" } } } @@ -10938,89 +10981,25 @@ ] } }, - "/api/user/assets": { + "/api/assets": { "get": { "tags": [ "asset-controller" ], - "summary": "Get Assets (getUserAssets)", - "description": "Returns a page of assets objects 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. Asset Info is an extension of the default Asset 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": "getUserAssets", + "summary": "Get Assets By Ids (getAssetsByIds)", + "description": "Requested assets 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": "getAssetsByIds", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", + "name": "assetIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of asset ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "Asset type", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "assetProfileId", - "in": "query", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset 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" + } } } ], @@ -11030,7 +11009,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "type": "array", + "items": { + "$ref": "#/components/schemas/Asset" + } } } } @@ -11149,21 +11131,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/assetProfile": { + }, "post": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Create Or Update Asset Profile (saveAssetProfile)", - "description": "Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. \n\nAsset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveAssetProfile", + "summary": "Find related assets (findAssetsByQuery)", + "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findAssetsByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfile" + "$ref": "#/components/schemas/AssetSearchQuery" } } }, @@ -11175,7 +11155,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfile" + "type": "array", + "items": { + "$ref": "#/components/schemas/Asset" + } } } } @@ -11296,23 +11279,98 @@ ] } }, - "/api/assetProfile/names": { + "/api/customer/{customerId}/assetInfos": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profile names (getAssetProfileNames)", - "description": "Returns a set of unique asset profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetProfileNames", + "summary": "Get Customer Asset Infos (getCustomerAssetInfos)", + "description": "Returns a page of asset info objects owned by the specified customer. Asset Info is an extension of the default Asset 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": "getCustomerAssetInfos", "parameters": [ { - "name": "activeOnly", + "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": "Flag indicating whether to retrieve exclusively the names of asset profiles that are referenced by tenant's assets.", + "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", - "default": false + "type": "boolean" + } + }, + { + "name": "assetProfileId", + "in": "query", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset 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" + ] } } ], @@ -11322,10 +11380,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/PageDataAssetInfo" } } } @@ -11446,31 +11501,89 @@ ] } }, - "/api/assetProfile/{assetProfileId}": { + "/api/customer/{customerId}/assets": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profile (getAssetProfileById)", - "description": "Fetch the Asset Profile object based on the provided Asset Profile Id. The server checks that the asset profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAssetProfileById", + "summary": "Get Customer Assets (getCustomerAssets)", + "description": "Returns a page of assets objects owned by 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\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerAssets", "parameters": [ { - "name": "assetProfileId", + "name": "customerId", "in": "path", - "description": "A string value representing the asset profile 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": "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": "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": "Asset type", "required": false, "schema": { - "type": "boolean" + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset 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" + ] } } ], @@ -11480,7 +11593,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfile" + "$ref": "#/components/schemas/PageDataAsset" } } } @@ -11599,28 +11712,95 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entityGroup/{entityGroupId}/assets": { + "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Delete asset profile (deleteAssetProfile)", - "description": "Deletes the asset profile. Referencing non-existing asset profile Id will cause an error. Can't delete the asset profile if it is referenced by existing assets.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteAssetProfile", + "summary": "Get assets by Entity Group Id (getAssetsByEntityGroupId)", + "description": "Returns a page of asset 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\n Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAssetsByEntityGroupId", "parameters": [ { - "name": "assetProfileId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the asset 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": "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 asset 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/PageDataAsset" + } + } + } }, "400": { "description": "Bad Request", @@ -11738,19 +11918,19 @@ ] } }, - "/api/assetProfile/{assetProfileId}/default": { - "post": { + "/api/tenant/asset": { + "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Make Asset Profile Default (setDefaultAssetProfile)", - "description": "Marks asset profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDefaultAssetProfile", + "summary": "Get Tenant Asset (getTenantAssetByName)", + "description": "Requested asset must be owned by tenant that the user belongs to. Asset name is an unique property of asset. So it can be used to identify the asset.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantAssetByName", "parameters": [ { - "name": "assetProfileId", - "in": "path", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "assetName", + "in": "query", + "description": "A string value representing the Asset name.", "required": true, "schema": { "type": "string" @@ -11763,7 +11943,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfile" + "$ref": "#/components/schemas/Asset" } } } @@ -11780,7 +11960,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -11884,157 +12064,80 @@ ] } }, - "/api/assetProfileInfo/default": { + "/api/tenant/assets": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Default Asset Profile (getDefaultAssetProfileInfo)", - "description": "Fetch the Default Asset Profile Info object. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDefaultAssetProfileInfo", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetProfileInfo" - } - } - } - }, - "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 - } - } - } - } + "summary": "Get Tenant Assets (getTenantAssets)", + "description": "Returns a page of assets 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": "getTenantAssets", + "parameters": [ + { + "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": "Asset type", + "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": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset 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", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } }, { - "ApiKeyForm": [] - } - ] - } - }, - "/api/assetProfileInfo/{assetProfileId}": { - "get": { - "tags": [ - "asset-profile-controller" - ], - "summary": "Get Asset Profile Info (getAssetProfileInfoById)", - "description": "Fetch the Asset Profile Info object based on the provided Asset Profile Id. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetProfileInfoById", - "parameters": [ - { - "name": "assetProfileId", - "in": "path", - "description": "A string value representing the asset 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" + ] } } ], @@ -12044,7 +12147,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfileInfo" + "$ref": "#/components/schemas/PageDataAsset" } } } @@ -12165,14 +12268,14 @@ ] } }, - "/api/assetProfileInfos": { + "/api/user/assets": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profile infos (getAssetProfileInfos)", - "description": "Returns a page of asset 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. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetProfileInfos", + "summary": "Get Assets (getUserAssets)", + "description": "Returns a page of assets objects 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. Asset Info is an extension of the default Asset 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": "getUserAssets", "parameters": [ { "name": "pageSize", @@ -12180,8 +12283,8 @@ "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 1 } }, { @@ -12190,14 +12293,32 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Asset type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "assetProfileId", + "in": "query", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" } }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the asset profile name.", + "description": "The case insensitive 'substring' filter based on the asset name.", "required": false, "schema": { "type": "string" @@ -12213,8 +12334,9 @@ "enum": [ "createdTime", "name", - "description", - "isDefault" + "type", + "label", + "customerTitle" ] } }, @@ -12238,7 +12360,1215 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAssetProfileInfo" + "$ref": "#/components/schemas/PageDataAsset" + } + } + } + }, + "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/assetProfile": { + "post": { + "tags": [ + "asset-profile-controller" + ], + "summary": "Create Or Update Asset Profile (saveAssetProfile)", + "description": "Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. \n\nAsset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveAssetProfile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfile" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfile" + } + } + } + }, + "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/assetProfile/names": { + "get": { + "tags": [ + "asset-profile-controller" + ], + "summary": "Get Asset Profile names (getAssetProfileNames)", + "description": "Returns a set of unique asset profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetProfileNames", + "parameters": [ + { + "name": "activeOnly", + "in": "query", + "description": "Flag indicating whether to retrieve exclusively the names of asset profiles that are referenced by tenant's assets.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$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 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/assetProfile/{assetProfileId}": { + "get": { + "tags": [ + "asset-profile-controller" + ], + "summary": "Get Asset Profile (getAssetProfileById)", + "description": "Fetch the Asset Profile object based on the provided Asset Profile Id. The server checks that the asset profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAssetProfileById", + "parameters": [ + { + "name": "assetProfileId", + "in": "path", + "description": "A string value representing the asset profile 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, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfile" + } + } + } + }, + "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": [] + } + ] + }, + "delete": { + "tags": [ + "asset-profile-controller" + ], + "summary": "Delete asset profile (deleteAssetProfile)", + "description": "Deletes the asset profile. Referencing non-existing asset profile Id will cause an error. Can't delete the asset profile if it is referenced by existing assets.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteAssetProfile", + "parameters": [ + { + "name": "assetProfileId", + "in": "path", + "description": "A string value representing the asset profile 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 + } + } + } + } + } + }, + "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/assetProfile/{assetProfileId}/default": { + "post": { + "tags": [ + "asset-profile-controller" + ], + "summary": "Make Asset Profile Default (setDefaultAssetProfile)", + "description": "Marks asset profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDefaultAssetProfile", + "parameters": [ + { + "name": "assetProfileId", + "in": "path", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfile" + } + } + } + }, + "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/assetProfileInfo/default": { + "get": { + "tags": [ + "asset-profile-controller" + ], + "summary": "Get Default Asset Profile (getDefaultAssetProfileInfo)", + "description": "Fetch the Default Asset Profile Info object. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDefaultAssetProfileInfo", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfileInfo" + } + } + } + }, + "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/assetProfileInfo/{assetProfileId}": { + "get": { + "tags": [ + "asset-profile-controller" + ], + "summary": "Get Asset Profile Info (getAssetProfileInfoById)", + "description": "Fetch the Asset Profile Info object based on the provided Asset Profile Id. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetProfileInfoById", + "parameters": [ + { + "name": "assetProfileId", + "in": "path", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfileInfo" + } + } + } + }, + "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/assetProfileInfos": { + "get": { + "tags": [ + "asset-profile-controller" + ], + "summary": "Get Asset Profile infos (getAssetProfileInfos)", + "description": "Returns a page of asset 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. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetProfileInfos", + "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 asset 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", + "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/PageDataAssetProfileInfo" } } } @@ -20929,7 +22259,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuConfig" + } + } + } }, "400": { "description": "Bad Request", @@ -26431,7 +27768,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HomeDashboard" + } + } + } }, "400": { "description": "Bad Request", @@ -27142,7 +28486,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + } }, "400": { "description": "Bad Request", @@ -34324,7 +35675,7 @@ "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 < 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.", + "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 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 \"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 \"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:# 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": { @@ -78775,11 +80126,11 @@ } ], "requestBody": { + "description": "A JSON object representing the RPC request.", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." + "type": "string" } } }, @@ -78932,11 +80283,11 @@ } ], "requestBody": { + "description": "A JSON object representing the RPC request.", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." + "type": "string" } } }, @@ -79089,11 +80440,11 @@ } ], "requestBody": { + "description": "A JSON object representing the RPC request.", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." + "type": "string" } } }, @@ -79748,11 +81099,11 @@ } ], "requestBody": { + "description": "A JSON object representing the RPC request.", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." + "type": "string" } } }, @@ -83396,11 +84747,11 @@ "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": { + "description": "A JSON object representing the message.", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "string", - "description": "A JSON value representing the message." + "type": "string" } } }, @@ -83562,11 +84913,11 @@ } ], "requestBody": { + "description": "A JSON object representing the message.", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "string", - "description": "A JSON value representing the message." + "type": "string" } } }, @@ -83747,11 +85098,11 @@ } ], "requestBody": { + "description": "A JSON object representing the message.", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "string", - "description": "A JSON value representing the message." + "type": "string" } } }, @@ -83923,11 +85274,11 @@ } ], "requestBody": { + "description": "A JSON object representing the message.", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "string", - "description": "A JSON value representing the message." + "type": "string" } } }, @@ -84593,7 +85944,224 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventInfo" + "$ref": "#/components/schemas/PageDataSchedulerEventInfo" + } + } + } + }, + "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/scheduledReports": { + "get": { + "tags": [ + "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" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataScheduledReportInfo" } } } @@ -84714,93 +86282,167 @@ ] } }, - "/api/scheduledReports": { - "get": { + "/api/schedulerEvent": { + "post": { "tags": [ "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" + "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": "userId", - "in": "query", - "description": "The user used for report generation.", - "required": false, - "schema": { - "type": "string", - "format": "uuid" + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEvent" + } + } } }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" + "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 + } + } + } + } } }, - { - "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": { + "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": "string", - "minimum": 0 + "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": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the scheduler event name or customer 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": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "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": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } } + } + }, + "security": [ + { + "HttpLoginForm": [] }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "ApiKeyForm": [] + } + ] + } + }, + "/api/schedulerEvent/info/{schedulerEventId}": { + "get": { + "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", + "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", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -84810,7 +86452,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataScheduledReportInfo" + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" } } } @@ -84931,24 +86573,25 @@ ] } }, - "/api/schedulerEvent": { - "post": { + "/api/schedulerEvent/{schedulerEventId}": { + "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 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": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", @@ -84972,7 +86615,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -85074,16 +86717,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/schedulerEvent/info/{schedulerEventId}": { - "get": { + }, + "delete": { "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": "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", @@ -85097,14 +86738,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -85222,14 +86856,14 @@ ] } }, - "/api/schedulerEvent/{schedulerEventId}": { - "get": { + "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { + "put": { "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": "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", @@ -85239,6 +86873,15 @@ "schema": { "type": "string" } + }, + { + "name": "enabledValue", + "in": "path", + "description": "Enabled or disabled scheduler", + "required": true, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -85366,28 +87009,94 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/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 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": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler 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 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" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -85505,32 +87214,23 @@ ] } }, - "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { - "put": { + "/api/schedulerEvents/all": { + "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 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": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "type", + "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, "schema": { "type": "string" } - }, - { - "name": "enabledValue", - "in": "path", - "description": "Enabled or disabled scheduler", - "required": true, - "schema": { - "type": "boolean" - } } ], "responses": { @@ -85539,7 +87239,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } } } } @@ -85660,79 +87363,25 @@ ] } }, - "/api/schedulerEvents": { + "/api/schedulerEvents/list": { "get": { "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", + "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": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "schedulerEventIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of scheduler event ids, separated by comma ','", "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" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -85742,7 +87391,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } } } } @@ -85863,15 +87515,35 @@ ] } }, - "/api/schedulerEvents/all": { + "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { "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 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": "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", @@ -85880,6 +87552,25 @@ "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" + } } ], "responses": { @@ -86012,25 +87703,21 @@ ] } }, - "/api/schedulerEvents/list": { + "/api/secret": { "get": { "tags": [ - "scheduler-event-controller" + "secret-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 Secret info by name (getSecretInfoByName)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretInfoByName", "parameters": [ { - "name": "schedulerEventIds", + "name": "name", "in": "query", - "description": "A list of scheduler event ids, separated by comma ','", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -86040,10 +87727,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventInfo" - } + "$ref": "#/components/schemas/SecretInfo" } } } @@ -86162,66 +87846,159 @@ "ApiKeyForm": [] } ] - } - }, - "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { - "get": { + }, + "post": { "tags": [ - "scheduler-event-controller" + "secret-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", - "parameters": [ - { - "name": "startTime", - "in": "path", - "description": "Start time filter in milliseconds for scheduler event run time", - "required": true, - "schema": { - "type": "integer", - "format": "int64" + "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" + } } }, - { - "name": "endTime", - "in": "path", - "description": "End time filter in milliseconds for scheduler event run time", - "required": true, - "schema": { - "type": "integer", - "format": "int64" + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecretInfo" + } + } } }, - { - "name": "type", - "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "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 + } + } + } + } } }, - { - "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" + "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": "Case-insensitive 'substring' filter based on event's name, type, or customer's 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 + } + } + } + } + } + }, + "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/secret/names": { + "get": { + "tags": [ + "secret-controller" ], + "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", @@ -86230,7 +88007,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + "type": "string" } } } @@ -86352,21 +88129,22 @@ ] } }, - "/api/secret": { - "get": { + "/api/secret/{id}": { + "delete": { "tags": [ "secret-controller" ], - "summary": "Get Secret info by name (getSecretInfoByName)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoByName", + "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": "name", - "in": "query", + "name": "id", + "in": "path", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -86376,7 +88154,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/TbSecretDeleteResult" } } } @@ -86495,23 +88273,37 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/secret/{id}/description": { + "put": { "tags": [ "secret-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", + "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": "id", + "in": "path", + "description": "Unique identifier of the Secret to update", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Secret" + "type": "string", + "description": "New description for the Secret" } } - }, - "required": true + } }, "responses": { "200": { @@ -86536,7 +88328,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -86640,152 +88432,14 @@ ] } }, - "/api/secret/names": { + "/api/secret/{id}/info": { "get": { "tags": [ "secret-controller" ], - "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" - } - } - } - } - }, - "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/secret/{id}": { - "delete": { - "tags": [ - "secret-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 Secret info by Id (getSecretInfoById)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretInfoById", "parameters": [ { "name": "id", @@ -86803,7 +88457,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbSecretDeleteResult" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -86924,14 +88578,14 @@ ] } }, - "/api/secret/{id}/description": { + "/api/secret/{id}/value": { "put": { "tags": [ "secret-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": "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", @@ -86949,10 +88603,11 @@ "application/json": { "schema": { "type": "string", - "description": "New description for the Secret" + "description": "New value for the Secret" } } - } + }, + "required": true }, "responses": { "200": { @@ -87081,22 +88736,67 @@ ] } }, - "/api/secret/{id}/info": { + "/api/secrets": { "get": { "tags": [ "secret-controller" ], - "summary": "Get Secret info by Id (getSecretInfoById)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoById", + "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": "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": "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", - "format": "uuid" + "enum": [ + "name" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -87106,7 +88806,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/PageDataSecretInfo" } } } @@ -87227,44 +88927,39 @@ ] } }, - "/api/secret/{id}/value": { - "put": { + "/api/noauth/selfRegistration/privacyPolicy": { + "get": { "tags": [ - "secret-controller" + "self-registration-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": "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": "id", - "in": "path", - "description": "Unique identifier of the Secret to update", - "required": true, + "name": "pkgName", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PlatformType" } } ], - "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/SecretInfo" + "type": "string" } } } @@ -87374,77 +89069,36 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/secrets": { + "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { "get": { "tags": [ - "secret-controller" + "self-registration-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 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": "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": "pkgName", "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", + "name": "platformType", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Platform type", "required": false, "schema": { "type": "string", "enum": [ - "ASC", - "DESC" + "ANDROID", + "IOS" ] } } @@ -87455,7 +89109,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSecretInfo" + "$ref": "#/components/schemas/SignUpSelfRegistrationParams" } } } @@ -87565,25 +89219,17 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/noauth/selfRegistration/privacyPolicy": { + "/api/noauth/selfRegistration/termsOfUse": { "get": { "tags": [ "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", + "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", @@ -87721,44 +89367,21 @@ } } }, - "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { + "/api/selfRegistration/selfRegistrationParams": { "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": [ - { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platformType", - "in": "query", - "description": "Platform type", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } - } - ], + "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/SignUpSelfRegistrationParams" + "$ref": "#/components/schemas/SelfRegistrationParams" } } } @@ -87868,42 +89491,40 @@ } } } - } - } - }, - "/api/noauth/selfRegistration/termsOfUse": { - "get": { - "tags": [ - "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": [ + }, + "security": [ { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } + "HttpLoginForm": [] }, { - "name": "platform", - "in": "query", - "required": false, - "schema": { - "$ref": "#/components/schemas/PlatformType" - } + "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" } } } @@ -87920,7 +89541,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -88013,27 +89634,25 @@ } } } - } - } - }, - "/api/selfRegistration/selfRegistrationParams": { - "get": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { "tags": [ "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", + "summary": "deleteWebSelfRegistrationParams", + "operationId": "deleteWebSelfRegistrationParams", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SelfRegistrationParams" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -88149,31 +89768,56 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/noauth/activateByEmailCode": { "post": { "tags": [ - "self-registration-controller" + "sign-up-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": "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": "emailCode", + "in": "query", + "description": "Activation token.", + "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/WebSelfRegistrationParams" + "$ref": "#/components/schemas/JwtPair" } } } @@ -88283,25 +89927,60 @@ } } } - }, - "security": [ + } + } + }, + "/api/noauth/activateEmail": { + "get": { + "tags": [ + "sign-up-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", + "parameters": [ { - "HttpLoginForm": [] + "name": "emailCode", + "in": "query", + "description": "Activation token.", + "required": true, + "schema": { + "type": "string" + } }, { - "ApiKeyForm": [] + "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" + ] + } } - ] - }, - "delete": { - "tags": [ - "self-registration-controller" ], - "summary": "deleteWebSelfRegistrationParams", - "operationId": "deleteWebSelfRegistrationParams", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -88408,40 +90087,23 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/noauth/activateByEmailCode": { - "post": { + "/api/noauth/login": { + "get": { "tags": [ "sign-up-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": "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": "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, + "description": "Mobile app package name. Used to identify the application and build the redirect link.", + "required": true, "schema": { "type": "string" } @@ -88450,7 +90112,7 @@ "name": "platform", "in": "query", "description": "Platform type", - "required": false, + "required": true, "schema": { "type": "string", "enum": [ @@ -88466,7 +90128,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "type": "string" } } } @@ -88483,7 +90145,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -88579,23 +90241,24 @@ } } }, - "/api/noauth/activateEmail": { - "get": { + "/api/noauth/resendEmailActivation": { + "post": { "tags": [ "sign-up-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": "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": "emailCode", + "name": "email", "in": "query", - "description": "Activation token.", + "description": "Email of the user.", "required": true, "schema": { "type": "string" - } + }, + "example": "john.doe@company.com" }, { "name": "pkgName", @@ -88622,14 +90285,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -88643,7 +90299,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -88739,45 +90395,31 @@ } } }, - "/api/noauth/login": { - "get": { + "/api/noauth/signup": { + "post": { "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", - "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" + "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" + } } }, - { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SignUpResult" } } } @@ -88794,7 +90436,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -88890,51 +90532,24 @@ } } }, - "/api/noauth/resendEmailActivation": { + "/api/signup/acceptPrivacyPolicy": { "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", - "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" - ] - } - } - ], + "summary": "Accept privacy policy (acceptPrivacyPolicy)", + "description": "Accept privacy policy by the current user.", + "operationId": "acceptPrivacyPolicy", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } }, "400": { "description": "Bad Request", @@ -89041,34 +90656,32 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/signup": { + "/api/signup/acceptTermsOfUse": { "post": { "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" - } - } - }, - "required": true - }, + "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/SignUpResult" + "$ref": "#/components/schemas/JsonNode" } } } @@ -89178,24 +90791,32 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/signup/acceptPrivacyPolicy": { - "post": { + "/api/signup/privacyPolicyAccepted": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "Accept privacy policy (acceptPrivacyPolicy)", - "description": "Accept privacy policy by the current user.", - "operationId": "acceptPrivacyPolicy", + "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/JsonNode" + "type": "boolean" } } } @@ -89212,7 +90833,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -89316,21 +90937,21 @@ ] } }, - "/api/signup/acceptTermsOfUse": { - "post": { + "/api/signup/termsOfUseAccepted": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "Accept Terms of Use (acceptTermsOfUse)", - "description": "Accept Terms of Use by the current user.", - "operationId": "acceptTermsOfUse", + "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/JsonNode" + "type": "boolean" } } } @@ -89347,7 +90968,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -89451,21 +91072,32 @@ ] } }, - "/api/signup/privacyPolicyAccepted": { + "/api/solutions/templates/details/{solutionTemplateId}": { "get": { "tags": [ - "sign-up-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": "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" + "$ref": "#/components/schemas/TenantSolutionTemplateDetails" } } } @@ -89586,21 +91218,24 @@ ] } }, - "/api/signup/termsOfUseAccepted": { + "/api/solutions/templates/infos": { "get": { "tags": [ - "sign-up-controller" + "solution-controller" ], - "summary": "Check Terms Of User (termsOfUseAccepted)", - "description": "Checks that current user accepted the privacy policy.", - "operationId": "termsOfUseAccepted", + "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": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSolutionTemplateInfo" + } } } } @@ -89721,14 +91356,14 @@ ] } }, - "/api/solutions/templates/details/{solutionTemplateId}": { + "/api/solutions/templates/instructions/{solutionTemplateId}": { "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", + "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", @@ -89746,7 +91381,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateDetails" + "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" } } } @@ -89867,27 +91502,28 @@ ] } }, - "/api/solutions/templates/infos": { - "get": { + "/api/solutions/templates/{solutionTemplateId}/delete": { + "delete": { "tags": [ "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", + "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" + } + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenantSolutionTemplateInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -90005,14 +91641,14 @@ ] } }, - "/api/solutions/templates/instructions/{solutionTemplateId}": { - "get": { + "/api/solutions/templates/{solutionTemplateId}/install": { + "post": { "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", + "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", @@ -90030,7 +91666,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" + "$ref": "#/components/schemas/SolutionInstallResponse" } } } @@ -90047,7 +91683,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -90151,28 +91787,35 @@ ] } }, - "/api/solutions/templates/{solutionTemplateId}/delete": { - "delete": { + "/api/solution/export": { + "post": { "tags": [ - "solution-controller" + "solution-export-import-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": "Export Solution (exportSolution)", + "description": "Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint.\n\nAvailable for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission.", + "operationId": "exportSolution", + "requestBody": { + "description": "Export request with entity IDs and optional settings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SolutionExportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SolutionExportResponse" + } + } + } }, "400": { "description": "Bad Request", @@ -90186,7 +91829,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -90290,32 +91933,178 @@ ] } }, - "/api/solutions/templates/{solutionTemplateId}/install": { + "/api/solution/import": { "post": { "tags": [ - "solution-controller" + "solution-export-import-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" + "summary": "Import Solution (importSolution)", + "description": "Imports a solution package into the current tenant. Before importing, the endpoint checks for name conflicts with existing entities in the tenant. If name conflicts are detected, the import is rejected with HTTP 409 (Conflict). The import is transactional — if any entity fails to import, all changes are rolled back (all-or-nothing). Entities are imported in dependency order with a two-pass resolution for circular references (e.g. rule chains referencing each other).\n\nAvailable for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission.", + "operationId": "importSolution", + "requestBody": { + "description": "Solution data exported via the export endpoint.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SolutionData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SolutionImportResult" + } + } + } + }, + "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/solution/validate": { + "post": { + "tags": [ + "solution-export-import-controller" ], + "summary": "Validate Solution (validateSolution)", + "description": "Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings.\n\nAvailable for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission.", + "operationId": "validateSolution", + "requestBody": { + "description": "Solution data to validate.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SolutionData" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SolutionInstallResponse" + "$ref": "#/components/schemas/SolutionValidationResult" } } } @@ -93618,7 +95407,7 @@ "requestBody": { "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } @@ -93951,7 +95740,7 @@ "requestBody": { "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } @@ -94818,7 +96607,7 @@ "requestBody": { "description": "A JSON with the telemetry values. See API call description for more details.", "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } @@ -94994,7 +96783,7 @@ "requestBody": { "description": "A JSON with the telemetry values. See API call description for more details.", "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } @@ -96178,7 +97967,7 @@ "requestBody": { "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } @@ -99603,7 +101392,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } }, "400": { "description": "Bad Request", @@ -114079,12 +115875,10 @@ } } }, - "AiChatModelConfigObject": { - "type": "object", + "AiChatModelConfig": { "properties": { "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true + "$ref": "#/components/schemas/AiModelType" } } }, @@ -114641,21 +116435,6 @@ "OTHER" ] }, - "AlarmCondition": { - "type": "object", - "properties": { - "condition": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AlarmConditionFilter" - } - }, - "spec": { - "$ref": "#/components/schemas/AlarmConditionSpec", - "description": "JSON object representing alarm condition type" - } - } - }, "AlarmConditionExpression": { "discriminator": { "propertyName": "type", @@ -114673,70 +116452,6 @@ "type" ] }, - "AlarmConditionFilter": { - "type": "object", - "properties": { - "valueType": { - "$ref": "#/components/schemas/EntityKeyValueType", - "description": "String representation of the type of the value", - "example": "NUMERIC" - }, - "key": { - "$ref": "#/components/schemas/AlarmConditionFilterKey", - "description": "JSON object for specifying alarm condition by specific key" - }, - "predicate": { - "$ref": "#/components/schemas/KeyFilterPredicate", - "description": "JSON object representing filter condition" - }, - "value": { - "description": "Value used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is used" - } - } - }, - "AlarmConditionFilterKey": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/AlarmConditionKeyType", - "description": "The key type", - "example": "TIME_SERIES" - }, - "key": { - "type": "string", - "description": "String value representing the key", - "example": "temp" - } - } - }, - "AlarmConditionKeyType": { - "type": "string", - "enum": [ - "ATTRIBUTE", - "TIME_SERIES", - "ENTITY_FIELD", - "CONSTANT" - ] - }, - "AlarmConditionSpec": { - "description": "Specification for alarm conditions", - "discriminator": { - "propertyName": "type", - "mapping": { - "SIMPLE": "#/components/schemas/SimpleAlarmConditionSpec", - "DURATION": "#/components/schemas/DurationAlarmConditionSpec", - "REPEATING": "#/components/schemas/RepeatingAlarmConditionSpec" - } - }, - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - }, "AlarmConditionValueAlarmRuleSchedule": { "type": "object", "properties": { @@ -115353,27 +117068,6 @@ "notifyOn" ] }, - "AlarmRule": { - "type": "object", - "properties": { - "condition": { - "$ref": "#/components/schemas/AlarmCondition", - "description": "JSON object representing the alarm rule condition" - }, - "alarmDetails": { - "type": "string", - "description": "String value representing the additional details for an alarm rule" - }, - "dashboardId": { - "$ref": "#/components/schemas/DashboardId", - "description": "JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application" - }, - "schedule": { - "$ref": "#/components/schemas/AlarmSchedule", - "description": "JSON object representing time interval during which the rule is active" - } - } - }, "AlarmRuleAnyTimeSchedule": { "allOf": [ { @@ -115535,6 +117229,67 @@ "condition" ] }, + "AlarmRuleDefinitionInfo": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/CalculatedFieldId", + "description": "JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm rule creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "entityId": { + "$ref": "#/components/schemas/EntityId" + }, + "name": { + "type": "string", + "description": "User defined name of the alarm rule." + }, + "debugSettings": { + "$ref": "#/components/schemas/DebugSettings", + "description": "Debug settings object." + }, + "configurationVersion": { + "type": "integer", + "format": "int32", + "description": "Version of alarm rule configuration.", + "example": 0 + }, + "configuration": { + "$ref": "#/components/schemas/AlarmCalculatedFieldConfiguration" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the alarm rule. May include: 'description' (string).", + "example": { + "description": "High temperature alarm rule" + } + }, + "entityName": { + "type": "string" + }, + "debugMode": { + "type": "boolean", + "deprecated": true, + "writeOnly": true + } + }, + "required": [ + "configuration" + ] + }, "AlarmRuleDurationCondition": { "allOf": [ { @@ -115721,34 +117476,6 @@ "value" ] }, - "AlarmSchedule": { - "type": "object", - "description": "Configuration for alarm schedule", - "discriminator": { - "propertyName": "type", - "mapping": { - "ANY_TIME": "#/components/schemas/AnyTimeSchedule", - "SPECIFIC_TIME": "#/components/schemas/SpecificTimeSchedule", - "CUSTOM": "#/components/schemas/CustomTimeSchedule" - } - }, - "properties": { - "dynamicValue": { - "$ref": "#/components/schemas/DynamicValueString" - }, - "type": { - "$ref": "#/components/schemas/AlarmScheduleType" - } - } - }, - "AlarmScheduleType": { - "type": "string", - "enum": [ - "ANY_TIME", - "SPECIFIC_TIME", - "CUSTOM" - ] - }, "AlarmSearchStatus": { "type": "string", "enum": [ @@ -115961,42 +117688,10 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/AmazonBedrockProviderConfig" }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } @@ -116064,46 +117759,10 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/AnthropicProviderConfig" }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "topK": { - "type": "integer", - "format": "int32" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } @@ -116124,13 +117783,6 @@ "apiKey" ] }, - "AnyTimeSchedule": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmSchedule" - } - ] - }, "ApiFeature": { "type": "string", "enum": [ @@ -116619,8 +118271,8 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with the entity Id. " + "$ref": "#/components/schemas/AssetProfileId", + "description": "JSON object with the Asset Profile Id." }, "name": { "type": "string", @@ -117188,50 +118840,10 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/AzureOpenAiProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } @@ -118871,7 +120483,6 @@ }, "CustomMenuConfig": { "type": "object", - "description": "A JSON value representing the custom menu configuration", "properties": { "items": { "type": "array", @@ -119058,47 +120669,6 @@ } ] }, - "CustomTimeSchedule": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmSchedule" - }, - { - "type": "object", - "properties": { - "timezone": { - "type": "string" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomTimeScheduleItem" - } - } - } - } - ] - }, - "CustomTimeScheduleItem": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "dayOfWeek": { - "type": "integer", - "format": "int32" - }, - "startsOn": { - "type": "integer", - "format": "int64" - }, - "endsOn": { - "type": "integer", - "format": "int64" - } - } - }, "Customer": { "type": "object", "properties": { @@ -119200,7 +120770,6 @@ } }, "required": [ - "email", "title" ] }, @@ -119336,7 +120905,6 @@ } }, "required": [ - "email", "title" ] }, @@ -120556,7 +122124,7 @@ }, "deviceProfileId": { "$ref": "#/components/schemas/DeviceProfileId", - "description": "JSON object with Device Profile Id." + "description": "JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used." }, "deviceData": { "$ref": "#/components/schemas/DeviceData", @@ -120579,10 +122147,7 @@ "description": "JSON object with Customer or Tenant Id", "readOnly": true } - }, - "required": [ - "deviceProfileId" - ] + } }, "DeviceActivityNotificationRuleTriggerConfig": { "allOf": [ @@ -120761,9 +122326,6 @@ }, "DeviceExportData": { "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - }, { "type": "object", "properties": { @@ -120771,6 +122333,9 @@ "$ref": "#/components/schemas/DeviceCredentials" } } + }, + { + "$ref": "#/components/schemas/EntityExportData" } ] }, @@ -120857,7 +122422,7 @@ }, "deviceProfileId": { "$ref": "#/components/schemas/DeviceProfileId", - "description": "JSON object with Device Profile Id." + "description": "JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used." }, "deviceData": { "$ref": "#/components/schemas/DeviceData", @@ -120898,10 +122463,7 @@ "description": "JSON object with Customer or Tenant Id", "readOnly": true } - }, - "required": [ - "deviceProfileId" - ] + } }, "DeviceProfile": { "type": "object", @@ -120990,59 +122552,6 @@ } } }, - "DeviceProfileAlarm": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "String value representing the alarm rule id", - "example": "highTemperatureAlarmID" - }, - "alarmType": { - "type": "string", - "description": "String value representing type of the alarm", - "example": "High Temperature Alarm" - }, - "createRules": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AlarmRule" - }, - "description": "Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details" - }, - "clearRule": { - "$ref": "#/components/schemas/AlarmRule", - "description": "JSON object representing clear alarm rule" - }, - "propagate": { - "type": "boolean", - "description": "Propagation flag to specify if alarm should be propagated to parent entities of alarm originator", - "example": true - }, - "propagateToOwner": { - "type": "boolean", - "description": "Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator", - "example": true - }, - "propagateToOwnerHierarchy": { - "type": "boolean", - "description": "Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy", - "example": true - }, - "propagateToTenant": { - "type": "boolean", - "description": "Propagation flag to specify if alarm should be propagated to the tenant entity", - "example": true - }, - "propagateRelationTypes": { - "type": "array", - "description": "JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored.", - "items": { - "type": "string" - } - } - } - }, "DeviceProfileConfiguration": { "description": "Device profile configuration", "discriminator": { @@ -121074,12 +122583,6 @@ "provisionConfiguration": { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration", "description": "JSON object of provisioning strategy type per device profile" - }, - "alarms": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceProfileAlarm" - } } } }, @@ -121105,8 +122608,8 @@ "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with the entity Id. " + "$ref": "#/components/schemas/DeviceProfileId", + "description": "JSON object with the Device Profile Id." }, "name": { "type": "string", @@ -121574,27 +123077,6 @@ } ] }, - "DurationAlarmConditionSpec": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmConditionSpec" - }, - { - "type": "object", - "properties": { - "unit": { - "$ref": "#/components/schemas/TimeUnit", - "description": "Duration time unit" - }, - "predicate": { - "$ref": "#/components/schemas/FilterPredicateValueLong", - "description": "Duration predicate" - } - } - } - ], - "description": "Duration Alarm Condition Specification" - }, "DynamicValueBoolean": { "type": "object", "properties": { @@ -121630,42 +123112,6 @@ } } }, - "DynamicValueInteger": { - "type": "object", - "properties": { - "resolvedValue": { - "type": "integer", - "format": "int32" - }, - "sourceType": { - "$ref": "#/components/schemas/DynamicValueSourceType" - }, - "sourceAttribute": { - "type": "string" - }, - "inherit": { - "type": "boolean" - } - } - }, - "DynamicValueLong": { - "type": "object", - "properties": { - "resolvedValue": { - "type": "integer", - "format": "int64" - }, - "sourceType": { - "$ref": "#/components/schemas/DynamicValueSourceType" - }, - "sourceAttribute": { - "type": "string" - }, - "inherit": { - "type": "boolean" - } - } - }, "DynamicValueSourceType": { "type": "string", "enum": [ @@ -122795,6 +124241,29 @@ "entityType" ] }, + "EntityExportSettings": { + "type": "object", + "properties": { + "exportRelations": { + "type": "boolean" + }, + "exportAttributes": { + "type": "boolean" + }, + "exportCredentials": { + "type": "boolean" + }, + "exportCalculatedFields": { + "type": "boolean" + }, + "exportPermissions": { + "type": "boolean" + }, + "exportGroupEntities": { + "type": "boolean" + } + } + }, "EntityFilter": { "description": "Filter for selecting entities", "discriminator": { @@ -122905,9 +124374,6 @@ }, "EntityGroupExportData": { "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - }, { "type": "object", "properties": { @@ -122927,6 +124393,9 @@ "type": "boolean" } } + }, + { + "$ref": "#/components/schemas/EntityExportData" } ] }, @@ -123021,148 +124490,8 @@ }, "ownerIds": { "type": "array", - "description": "List of the entity group owners.", "items": { - "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" - } - ] + "$ref": "#/components/schemas/EntityId" }, "uniqueItems": true }, @@ -123182,7 +124511,6 @@ }, "required": [ "name", - "ownerIds", "type" ] }, @@ -124354,11 +125682,19 @@ "ExportableEntity": { "type": "object", "properties": { + "createdTime": { + "type": "integer", + "format": "int64" + }, "id": { "$ref": "#/components/schemas/EntityId" }, "name": { "type": "string" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "writeOnly": true } } }, @@ -124456,38 +125792,6 @@ } } }, - "FilterPredicateValueInteger": { - "type": "object", - "properties": { - "defaultValue": { - "type": "integer", - "format": "int32" - }, - "userValue": { - "type": "integer", - "format": "int32" - }, - "dynamicValue": { - "$ref": "#/components/schemas/DynamicValueInteger" - } - } - }, - "FilterPredicateValueLong": { - "type": "object", - "properties": { - "defaultValue": { - "type": "integer", - "format": "int64" - }, - "userValue": { - "type": "integer", - "format": "int64" - }, - "dynamicValue": { - "$ref": "#/components/schemas/DynamicValueLong" - } - } - }, "FilterPredicateValueString": { "type": "object", "properties": { @@ -124632,50 +125936,10 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/GitHubModelsProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } @@ -124743,54 +126007,10 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/GoogleAiGeminiProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "topK": { - "type": "integer", - "format": "int32" - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } @@ -124858,54 +126078,10 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/GoogleVertexAiGeminiProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "topK": { - "type": "integer", - "format": "int32" - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } @@ -125215,6 +126391,87 @@ } } }, + "HomeDashboard": { + "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.", + "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" + }, + "hideDashboardToolbar": { + "type": "boolean", + "description": "Hide dashboard toolbar flag. Useful for rendering dashboards on mobile." + } + } + }, "HomeDashboardInfo": { "type": "object", "description": "A JSON object that represents home dashboard id and other parameters", @@ -126997,50 +128254,10 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/MistralAiProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } @@ -128991,50 +130208,10 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/OllamaProviderConfig" }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "topK": { - "type": "integer", - "format": "int32" - }, - "contextLength": { - "type": "integer", - "format": "int32" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } @@ -129102,50 +130279,10 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/OpenAiProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } @@ -129715,6 +130852,66 @@ } } }, + "PageDataAlarmRuleDefinition": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AlarmRuleDefinition" + }, + "readOnly": true + }, + "totalPages": { + "type": "integer", + "format": "int32", + "description": "Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + "readOnly": true + }, + "totalElements": { + "type": "integer", + "format": "int64", + "description": "Total number of elements in all available pages", + "readOnly": true + }, + "hasNext": { + "type": "boolean", + "description": "'false' value indicates the end of the result set", + "readOnly": true + } + } + }, + "PageDataAlarmRuleDefinitionInfo": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AlarmRuleDefinitionInfo" + }, + "readOnly": true + }, + "totalPages": { + "type": "integer", + "format": "int32", + "description": "Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + "readOnly": true + }, + "totalElements": { + "type": "integer", + "format": "int64", + "description": "Total number of elements in all available pages", + "readOnly": true + }, + "hasNext": { + "type": "boolean", + "description": "'false' value indicates the end of the result set", + "readOnly": true + } + } + }, "PageDataApiKeyInfo": { "type": "object", "properties": { @@ -132634,22 +133831,6 @@ } } }, - "RepeatingAlarmConditionSpec": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmConditionSpec" - }, - { - "type": "object", - "properties": { - "predicate": { - "$ref": "#/components/schemas/FilterPredicateValueInteger", - "description": "Repeating predicate" - } - } - } - ] - }, "Report": { "type": "object", "properties": { @@ -133849,7 +135030,14 @@ "example": "GROUP" }, "permissions": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with the set of permissions. Structure is specific for role type", + "readOnly": true + }, + "excludedPermissions": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions", + "readOnly": true }, "version": { "type": "integer", @@ -133863,7 +135051,6 @@ }, "required": [ "name", - "tenantId", "type" ] }, @@ -134116,9 +135303,6 @@ }, "RuleChainExportData": { "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - }, { "type": "object", "properties": { @@ -134126,6 +135310,9 @@ "$ref": "#/components/schemas/RuleChainMetaData" } } + }, + { + "$ref": "#/components/schemas/EntityExportData" } ] }, @@ -134196,6 +135383,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": [ @@ -134206,6 +135400,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": { @@ -135242,7 +136490,7 @@ "type": "string", "description": "Title of the customer." }, - "isPublic": { + "public": { "type": "boolean", "description": "Indicates special 'Public' customer used to embed dashboards on public websites." } @@ -135389,13 +136637,6 @@ "filters" ] }, - "SimpleAlarmConditionSpec": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmConditionSpec" - } - ] - }, "SimpleCalculatedFieldConfiguration": { "allOf": [ { @@ -135874,6 +137115,86 @@ "V3" ] }, + "SolutionData": { + "type": "object", + "description": "Portable solution package containing exported entities grouped by type. Represents a self-contained snapshot that can be imported into another tenant.", + "properties": { + "entities": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityExportData" + } + }, + "description": "Exported entities grouped by entity type. Each key is an entity type (e.g. DEVICE_PROFILE, RULE_CHAIN) and the value is a list of entity export data objects." + } + }, + "required": [ + "entities" + ] + }, + "SolutionExportRequest": { + "type": "object", + "description": "Solution export request specifying which entities to include and export settings.", + "properties": { + "entityIds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + }, + "uniqueItems": true + }, + "settings": { + "$ref": "#/components/schemas/EntityExportSettings", + "description": "Optional export settings controlling what additional data is included (relations, attributes, credentials, etc.). If not specified, default settings will be used that include all available data." + } + } + }, + "SolutionExportResponse": { + "type": "object", + "description": "Solution export response containing the exported solution data and any dependency warnings.", + "properties": { + "solution": { + "$ref": "#/components/schemas/SolutionData", + "description": "The exported solution data containing all requested entities grouped by type." + }, + "warnings": { + "type": "array", + "description": "List of dependency warnings. Generated when exported entities reference other entities that are not included in the export (e.g. a device profile references a rule chain that was not selected for export).", + "example": [ + "DEVICE_PROFILE 'My DP' references RuleChain (784f394c-42b6-435a-983c-b7beff2784f9) which is not in the export selection" + ], + "items": { + "type": "string" + } + } + } + }, + "SolutionImportResult": { + "type": "object", + "description": "Result of a solution import operation.", + "properties": { + "success": { + "type": "boolean", + "description": "'true' if all entities were imported successfully.", + "example": true + }, + "created": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + }, + "description": "Number of newly created entities per entity type. Entity types with zero created entities are omitted.", + "example": { + "RULE_CHAIN": 2, + "DEVICE_PROFILE": 1, + "DEVICE": 3 + } + } + } + }, "SolutionInstallResponse": { "type": "object", "properties": { @@ -135911,36 +137232,48 @@ "STARTUP" ] }, - "SpecificTimeSchedule": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmSchedule" + "SolutionValidationResult": { + "type": "object", + "description": "Result of a solution validation (dry-run). Checks structural validity and dependency references without modifying any data.", + "properties": { + "valid": { + "type": "boolean", + "description": "'true' if the solution can be imported without errors. 'false' if there are structural issues (empty entities, unsupported types, malformed data).", + "example": true }, - { + "entitySummary": { "type": "object", - "properties": { - "timezone": { - "type": "string" - }, - "daysOfWeek": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "uniqueItems": true - }, - "startsOn": { - "type": "integer", - "format": "int64" - }, - "endsOn": { - "type": "integer", - "format": "int64" - } + "additionalProperties": { + "type": "integer", + "format": "int32" + }, + "description": "Number of entities per type found in the solution file.", + "example": { + "RULE_CHAIN": 2, + "DEVICE_PROFILE": 1 + } + }, + "conflicts": { + "type": "array", + "description": "List of blocking issues that would prevent import (e.g. unsupported entity types, missing or malformed entity data).", + "example": [ + "Unsupported entity types: UNKNOWN_TYPE" + ], + "items": { + "type": "string" + } + }, + "warnings": { + "type": "array", + "description": "List of non-blocking warnings (e.g. missing dependency references).", + "example": [ + "DEVICE_PROFILE 'My DP' references rule chain (uuid) which is not included in the solution file" + ], + "items": { + "type": "string" } } - ] + } }, "SplitViewComponent": { "allOf": [ @@ -139813,9 +141146,6 @@ }, "WidgetsBundleExportData": { "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - }, { "type": "object", "properties": { @@ -139832,6 +141162,9 @@ } } } + }, + { + "$ref": "#/components/schemas/EntityExportData" } ] }, 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 ef32e0c1..cb509b3f 100644 --- a/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -31,6 +31,7 @@ import org.thingsboard.client.model.AlarmCountQuery; import org.thingsboard.client.model.AlarmDataQuery; import org.thingsboard.client.model.AlarmInfo; +import org.thingsboard.client.model.AlarmRuleDefinition; import org.thingsboard.client.model.AlarmSeverity; import org.thingsboard.client.model.AllowedPermissionsInfo; import org.thingsboard.client.model.ApiKey; @@ -107,6 +108,7 @@ import java.io.File; import org.thingsboard.client.model.GroupPermission; import org.thingsboard.client.model.GroupPermissionInfo; +import org.thingsboard.client.model.HomeDashboard; import org.thingsboard.client.model.HomeDashboardInfo; import org.thingsboard.client.model.Integration; import org.thingsboard.client.model.IntegrationConvertersInfo; @@ -148,6 +150,8 @@ import org.thingsboard.client.model.PageDataAlarmCommentInfo; import org.thingsboard.client.model.PageDataAlarmData; import org.thingsboard.client.model.PageDataAlarmInfo; +import org.thingsboard.client.model.PageDataAlarmRuleDefinition; +import org.thingsboard.client.model.PageDataAlarmRuleDefinitionInfo; import org.thingsboard.client.model.PageDataApiKeyInfo; import org.thingsboard.client.model.PageDataAsset; import org.thingsboard.client.model.PageDataAssetInfo; @@ -256,7 +260,12 @@ import org.thingsboard.client.model.SignUpSelfRegistrationParams; import org.thingsboard.client.model.SlackConversation; import org.thingsboard.client.model.SlackConversationType; +import org.thingsboard.client.model.SolutionData; +import org.thingsboard.client.model.SolutionExportRequest; +import org.thingsboard.client.model.SolutionExportResponse; +import org.thingsboard.client.model.SolutionImportResult; import org.thingsboard.client.model.SolutionInstallResponse; +import org.thingsboard.client.model.SolutionValidationResult; import org.thingsboard.client.model.SystemInfo; import org.thingsboard.client.model.TbChatRequest; import org.thingsboard.client.model.TbChatResponse; @@ -4029,6 +4038,79 @@ private HttpRequest.Builder deleteAlarmCommentRequestBuilder(@Nonnull String ala return localVarRequestBuilder; } + /** + * Delete Alarm Rule (deleteAlarmRule) + * Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error. Available for users with 'TENANT_ADMIN' authority. + * @param alarmRuleId (required) + * @throws ApiException if fails to make API call + */ + public void deleteAlarmRule(@Nonnull String alarmRuleId) throws ApiException { + deleteAlarmRuleWithHttpInfo(alarmRuleId, null); + } + + /** + * Delete Alarm Rule (deleteAlarmRule) + * Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error. Available for users with 'TENANT_ADMIN' authority. + * @param alarmRuleId (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteAlarmRuleWithHttpInfo(@Nonnull String alarmRuleId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = deleteAlarmRuleRequestBuilder(alarmRuleId, 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("deleteAlarmRule", 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 deleteAlarmRuleRequestBuilder(@Nonnull String alarmRuleId, Map headers) throws ApiException { + // verify the required parameter 'alarmRuleId' is set + if (alarmRuleId == null) { + throw new ApiException(400, "Missing the required parameter 'alarmRuleId' when calling deleteAlarmRule"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/alarm/rule/{alarmRuleId}" + .replace("{alarmRuleId}", ApiClient.urlEncode(alarmRuleId.toString())); + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.method("DELETE", 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; + } + /** * Delete API key by ID (deleteApiKey) * Deletes the API key. Referencing non-existing ApiKey Id will cause an error. Available for any authorized user. @@ -10667,6 +10749,88 @@ private HttpRequest.Builder exportRuleChainsRequestBuilder(@Nonnull Integer limi return localVarRequestBuilder; } + /** + * Export Solution (exportSolution) + * Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + * @param solutionExportRequest Export request with entity IDs and optional settings. (required) + * @return SolutionExportResponse + * @throws ApiException if fails to make API call + */ + public SolutionExportResponse exportSolution(@Nonnull SolutionExportRequest solutionExportRequest) throws ApiException { + ApiResponse localVarResponse = exportSolutionWithHttpInfo(solutionExportRequest, null); + return localVarResponse.getData(); + } + + /** + * Export Solution (exportSolution) + * Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + * @param solutionExportRequest Export request with entity IDs and optional settings. (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<SolutionExportResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse exportSolutionWithHttpInfo(@Nonnull SolutionExportRequest solutionExportRequest, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = exportSolutionRequestBuilder(solutionExportRequest, 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("exportSolution", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + SolutionExportResponse 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 exportSolutionRequestBuilder(@Nonnull SolutionExportRequest solutionExportRequest, Map headers) throws ApiException { + // verify the required parameter 'solutionExportRequest' is set + if (solutionExportRequest == null) { + throw new ApiException(400, "Missing the required parameter 'solutionExportRequest' when calling exportSolution"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/solution/export"; + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(solutionExportRequest); + 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; + } + /** * Find Alarms by Query * 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'. 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. 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: ```json { \"entityFilter\": { \"type\": \"entityType\", \"resolveMultiple\": true, \"entityType\": \"DEVICE\" }, \"pageLink\": { \"page\": 0, \"pageSize\": 100, \"textSearch\": null, \"searchPropagatedAlarms\": false, \"statusList\": [ \"ACTIVE\" ], \"severityList\": [ \"CRITICAL\", \"MAJOR\" ], \"typeList\": [ \"Temperature Alarm\", \"Fire Alarm\" ], \"sortOrder\": { \"key\": { \"key\": \"createdTime\", \"type\": \"ALARM_FIELD\" }, \"direction\": \"DESC\" }, \"timeWindow\": 86400000 }, \"keyFilters\": [ { \"key\": { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" }, \"valueType\": \"NUMERIC\", \"predicate\": { \"operation\": \"GREATER\", \"value\": { \"defaultValue\": 0, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } } ], \"alarmFields\": [ { \"type\": \"ALARM_FIELD\", \"key\": \"createdTime\" }, { \"type\": \"ALARM_FIELD\", \"key\": \"type\" }, { \"type\": \"ALARM_FIELD\", \"key\": \"severity\" }, { \"type\": \"ALARM_FIELD\", \"key\": \"status\" } ], \"entityFields\": [ { \"type\": \"ENTITY_FIELD\", \"key\": \"name\" } ], \"latestValues\": [ { \"type\": \"ATTRIBUTE\", \"key\": \"model\" }, { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ] } ``` @@ -13595,33 +13759,110 @@ private HttpRequest.Builder getAlarmInfoByIdRequestBuilder(@Nonnull String alarm } /** - * Get Alarm Types (getAlarmTypes) - * Returns a set of unique alarm types based on alarms that are either owned by the tenant or assigned to the customer which user is performing the request. + * Get Alarm Rule (getAlarmRuleById) + * Fetch the Alarm Rule object based on the provided Alarm Rule Id. Available for users with 'TENANT_ADMIN' authority. + * @param alarmRuleId (required) + * @return AlarmRuleDefinition + * @throws ApiException if fails to make API call + */ + public AlarmRuleDefinition getAlarmRuleById(@Nonnull String alarmRuleId) throws ApiException { + ApiResponse localVarResponse = getAlarmRuleByIdWithHttpInfo(alarmRuleId, null); + return localVarResponse.getData(); + } + + /** + * Get Alarm Rule (getAlarmRuleById) + * Fetch the Alarm Rule object based on the provided Alarm Rule Id. Available for users with 'TENANT_ADMIN' authority. + * @param alarmRuleId (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<AlarmRuleDefinition> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAlarmRuleByIdWithHttpInfo(@Nonnull String alarmRuleId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlarmRuleByIdRequestBuilder(alarmRuleId, 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("getAlarmRuleById", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + AlarmRuleDefinition 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 getAlarmRuleByIdRequestBuilder(@Nonnull String alarmRuleId, Map headers) throws ApiException { + // verify the required parameter 'alarmRuleId' is set + if (alarmRuleId == null) { + throw new ApiException(400, "Missing the required parameter 'alarmRuleId' when calling getAlarmRuleById"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/alarm/rule/{alarmRuleId}" + .replace("{alarmRuleId}", ApiClient.urlEncode(alarmRuleId.toString())); + 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 alarm rule names (getAlarmRuleNames) + * Fetch the list of alarm rule names. Available for users with 'TENANT_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 The case insensitive 'substring' filter based on of next alarm fields: type, severity or status (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @return PageDataEntitySubtype + * @return PageDataString * @throws ApiException if fails to make API call */ - public PageDataEntitySubtype getAlarmTypes(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortOrder) throws ApiException { - ApiResponse localVarResponse = getAlarmTypesWithHttpInfo(pageSize, page, textSearch, sortOrder, null); + public PageDataString getAlarmRuleNames(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortOrder) throws ApiException { + ApiResponse localVarResponse = getAlarmRuleNamesWithHttpInfo(pageSize, page, textSearch, sortOrder, null); return localVarResponse.getData(); } /** - * Get Alarm Types (getAlarmTypes) - * Returns a set of unique alarm types based on alarms that are either owned by the tenant or assigned to the customer which user is performing the request. + * Get alarm rule names (getAlarmRuleNames) + * Fetch the list of alarm rule names. Available for users with 'TENANT_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 The case insensitive 'substring' filter based on of next alarm fields: type, severity or status (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataEntitySubtype> + * @return ApiResponse<PageDataString> * @throws ApiException if fails to make API call */ - public ApiResponse getAlarmTypesWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortOrder, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAlarmTypesRequestBuilder(pageSize, page, textSearch, sortOrder, headers); + public ApiResponse getAlarmRuleNamesWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlarmRuleNamesRequestBuilder(pageSize, page, textSearch, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13632,15 +13873,15 @@ public ApiResponse getAlarmTypesWithHttpInfo(@Nonnull Int InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAlarmTypes", localVarResponse); + throw getApiException("getAlarmRuleNames", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); } String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataEntitySubtype responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue); + PageDataString responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue); } finally { if (localVarResponseBody != null) { localVarResponseBody.close(); @@ -13655,17 +13896,17 @@ public ApiResponse getAlarmTypesWithHttpInfo(@Nonnull Int } } - private HttpRequest.Builder getAlarmTypesRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortOrder, Map headers) throws ApiException { + private HttpRequest.Builder getAlarmRuleNamesRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @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 getAlarmTypes"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarmRuleNames"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmTypes"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmRuleNames"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/alarm/types"; + String localVarPath = "/api/alarm/rules/names"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; @@ -13701,51 +13942,39 @@ private HttpRequest.Builder getAlarmTypesRequestBuilder(@Nonnull Integer pageSiz } /** - * Get Alarms (getAlarmsByEntity) - * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. 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). - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get alarm rules (getAlarmRules) + * Fetch tenant alarm rules based on the filter. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param searchStatus A string value representing one of the AlarmSearchStatus enumeration value (optional) - * @param status A string value representing one of the AlarmStatus enumeration value (optional) - * @param assigneeId A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @param textSearch The case insensitive 'substring' filter based on of next alarm fields: type, severity or status (optional) + * @param entityType Entity type filter. If not specified, alarm rules for all supported entity types will be returned. (optional) + * @param entities Entities filter. If not specified, alarm rules for entity type filter will be returned. (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. (optional) - * @param endTime The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. (optional) - * @param fetchOriginator A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null. (optional) - * @return PageDataAlarmInfo + * @return PageDataAlarmRuleDefinitionInfo * @throws ApiException if fails to make API call */ - public PageDataAlarmInfo getAlarmsByEntity(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String searchStatus, @Nullable String status, @Nullable String assigneeId, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean fetchOriginator) throws ApiException { - ApiResponse localVarResponse = getAlarmsByEntityWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); + public PageDataAlarmRuleDefinitionInfo getAlarmRules(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable EntityType entityType, @Nullable Set entities, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) throws ApiException { + ApiResponse localVarResponse = getAlarmRulesWithHttpInfo(pageSize, page, entityType, entities, textSearch, sortProperty, sortOrder, null); return localVarResponse.getData(); } /** - * Get Alarms (getAlarmsByEntity) - * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. 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). - * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) - * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * Get alarm rules (getAlarmRules) + * Fetch tenant alarm rules based on the filter. Available for users with 'TENANT_ADMIN' authority. * @param pageSize Maximum amount of entities in a one page (required) * @param page Sequence number of page starting from 0 (required) - * @param searchStatus A string value representing one of the AlarmSearchStatus enumeration value (optional) - * @param status A string value representing one of the AlarmStatus enumeration value (optional) - * @param assigneeId A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) - * @param textSearch The case insensitive 'substring' filter based on of next alarm fields: type, severity or status (optional) + * @param entityType Entity type filter. If not specified, alarm rules for all supported entity types will be returned. (optional) + * @param entities Entities filter. If not specified, alarm rules for entity type filter will be returned. (optional) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) * @param sortProperty Property of entity to sort by (optional) * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) - * @param startTime The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. (optional) - * @param endTime The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. (optional) - * @param fetchOriginator A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null. (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<PageDataAlarmInfo> + * @return ApiResponse<PageDataAlarmRuleDefinitionInfo> * @throws ApiException if fails to make API call */ - public ApiResponse getAlarmsByEntityWithHttpInfo(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String searchStatus, @Nullable String status, @Nullable String assigneeId, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean fetchOriginator, Map headers) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = getAlarmsByEntityRequestBuilder(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, headers); + public ApiResponse getAlarmRulesWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable EntityType entityType, @Nullable Set entities, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlarmRulesRequestBuilder(pageSize, page, entityType, entities, textSearch, sortProperty, sortOrder, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -13756,15 +13985,15 @@ public ApiResponse getAlarmsByEntityWithHttpInfo(@Nonnull Str InputStream localVarResponseBody = null; try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("getAlarmsByEntity", localVarResponse); + throw getApiException("getAlarmRules", localVarResponse); } localVarResponseBody = ApiClient.getResponseBody(localVarResponse); if (localVarResponseBody == null) { - return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); } String responseBody = new String(localVarResponseBody.readAllBytes()); - PageDataAlarmInfo responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); - return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue); + PageDataAlarmRuleDefinitionInfo responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue); } finally { if (localVarResponseBody != null) { localVarResponseBody.close(); @@ -13779,52 +14008,412 @@ public ApiResponse getAlarmsByEntityWithHttpInfo(@Nonnull Str } } - private HttpRequest.Builder getAlarmsByEntityRequestBuilder(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String searchStatus, @Nullable String status, @Nullable String assigneeId, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean fetchOriginator, Map headers) throws ApiException { - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarmsByEntity"); - } - // verify the required parameter 'entityId' is set - if (entityId == null) { - throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarmsByEntity"); - } + private HttpRequest.Builder getAlarmRulesRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable EntityType entityType, @Nullable Set entities, @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 getAlarmsByEntity"); + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarmRules"); } // verify the required parameter 'page' is set if (page == null) { - throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmsByEntity"); + throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmRules"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/api/alarm/{entityType}/{entityId}" - .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) - .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); + String localVarPath = "/api/alarm/rules"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "searchStatus"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("searchStatus", searchStatus)); - localVarQueryParameterBaseName = "status"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); - localVarQueryParameterBaseName = "assigneeId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("assigneeId", assigneeId)); localVarQueryParameterBaseName = "pageSize"; localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); localVarQueryParameterBaseName = "page"; localVarQueryParams.addAll(ApiClient.parameterToPairs("page", page)); + localVarQueryParameterBaseName = "entityType"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("entityType", entityType)); + localVarQueryParameterBaseName = "entities"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "entities", entities)); localVarQueryParameterBaseName = "textSearch"; localVarQueryParams.addAll(ApiClient.parameterToPairs("textSearch", textSearch)); localVarQueryParameterBaseName = "sortProperty"; localVarQueryParams.addAll(ApiClient.parameterToPairs("sortProperty", sortProperty)); localVarQueryParameterBaseName = "sortOrder"; localVarQueryParams.addAll(ApiClient.parameterToPairs("sortOrder", sortOrder)); - localVarQueryParameterBaseName = "startTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); - localVarQueryParameterBaseName = "endTime"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); - localVarQueryParameterBaseName = "fetchOriginator"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("fetchOriginator", fetchOriginator)); + 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 Alarm Rules by Entity Id (getAlarmRulesByEntityId) + * Fetch the Alarm Rules based on the provided Entity Id. Available for users with 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on the calculated field name. (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return PageDataAlarmRuleDefinition + * @throws ApiException if fails to make API call + */ + public PageDataAlarmRuleDefinition getAlarmRulesByEntityId(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder) throws ApiException { + ApiResponse localVarResponse = getAlarmRulesByEntityIdWithHttpInfo(entityType, entityId, pageSize, page, textSearch, sortProperty, sortOrder, null); + return localVarResponse.getData(); + } + + /** + * Get Alarm Rules by Entity Id (getAlarmRulesByEntityId) + * Fetch the Alarm Rules based on the provided Entity Id. Available for users with 'TENANT_ADMIN' authority. + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on the calculated field 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<PageDataAlarmRuleDefinition> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAlarmRulesByEntityIdWithHttpInfo(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlarmRulesByEntityIdRequestBuilder(entityType, entityId, 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("getAlarmRulesByEntityId", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + PageDataAlarmRuleDefinition 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 getAlarmRulesByEntityIdRequestBuilder(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, Map headers) throws ApiException { + // verify the required parameter 'entityType' is set + if (entityType == null) { + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarmRulesByEntityId"); + } + // verify the required parameter 'entityId' is set + if (entityId == null) { + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarmRulesByEntityId"); + } + // verify the required parameter 'pageSize' is set + if (pageSize == null) { + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarmRulesByEntityId"); + } + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmRulesByEntityId"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/alarm/rules/{entityType}/{entityId}" + .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) + .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); + 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 Alarm Types (getAlarmTypes) + * Returns a set of unique alarm types based on alarms that are either owned by the tenant or assigned to the customer which user is performing the request. + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on of next alarm fields: type, severity or status (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @return PageDataEntitySubtype + * @throws ApiException if fails to make API call + */ + public PageDataEntitySubtype getAlarmTypes(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortOrder) throws ApiException { + ApiResponse localVarResponse = getAlarmTypesWithHttpInfo(pageSize, page, textSearch, sortOrder, null); + return localVarResponse.getData(); + } + + /** + * Get Alarm Types (getAlarmTypes) + * Returns a set of unique alarm types based on alarms that are either owned by the tenant or assigned to the customer which user is performing the request. + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param textSearch The case insensitive 'substring' filter based on of next alarm fields: type, severity or status (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<PageDataEntitySubtype> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAlarmTypesWithHttpInfo(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @Nullable String sortOrder, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlarmTypesRequestBuilder(pageSize, page, textSearch, 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("getAlarmTypes", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + PageDataEntitySubtype 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 getAlarmTypesRequestBuilder(@Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String textSearch, @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 getAlarmTypes"); + } + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmTypes"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/alarm/types"; + 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 = "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 Alarms (getAlarmsByEntity) + * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. 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). + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param searchStatus A string value representing one of the AlarmSearchStatus enumeration value (optional) + * @param status A string value representing one of the AlarmStatus enumeration value (optional) + * @param assigneeId A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @param textSearch The case insensitive 'substring' filter based on of next alarm fields: type, severity or status (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param startTime The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. (optional) + * @param endTime The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. (optional) + * @param fetchOriginator A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null. (optional) + * @return PageDataAlarmInfo + * @throws ApiException if fails to make API call + */ + public PageDataAlarmInfo getAlarmsByEntity(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String searchStatus, @Nullable String status, @Nullable String assigneeId, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean fetchOriginator) throws ApiException { + ApiResponse localVarResponse = getAlarmsByEntityWithHttpInfo(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, null); + return localVarResponse.getData(); + } + + /** + * Get Alarms (getAlarmsByEntity) + * Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. 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). + * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) + * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + * @param pageSize Maximum amount of entities in a one page (required) + * @param page Sequence number of page starting from 0 (required) + * @param searchStatus A string value representing one of the AlarmSearchStatus enumeration value (optional) + * @param status A string value representing one of the AlarmStatus enumeration value (optional) + * @param assigneeId A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (optional) + * @param textSearch The case insensitive 'substring' filter based on of next alarm fields: type, severity or status (optional) + * @param sortProperty Property of entity to sort by (optional) + * @param sortOrder Sort order. ASC (ASCENDING) or DESC (DESCENDING) (optional) + * @param startTime The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. (optional) + * @param endTime The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. (optional) + * @param fetchOriginator A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null. (optional) + * @param headers Optional headers to include in the request + * @return ApiResponse<PageDataAlarmInfo> + * @throws ApiException if fails to make API call + */ + public ApiResponse getAlarmsByEntityWithHttpInfo(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String searchStatus, @Nullable String status, @Nullable String assigneeId, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean fetchOriginator, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getAlarmsByEntityRequestBuilder(entityType, entityId, pageSize, page, searchStatus, status, assigneeId, textSearch, sortProperty, sortOrder, startTime, endTime, fetchOriginator, 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("getAlarmsByEntity", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + PageDataAlarmInfo 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 getAlarmsByEntityRequestBuilder(@Nonnull String entityType, @Nonnull String entityId, @Nonnull Integer pageSize, @Nonnull Integer page, @Nullable String searchStatus, @Nullable String status, @Nullable String assigneeId, @Nullable String textSearch, @Nullable String sortProperty, @Nullable String sortOrder, @Nullable Long startTime, @Nullable Long endTime, @Nullable Boolean fetchOriginator, Map headers) throws ApiException { + // verify the required parameter 'entityType' is set + if (entityType == null) { + throw new ApiException(400, "Missing the required parameter 'entityType' when calling getAlarmsByEntity"); + } + // verify the required parameter 'entityId' is set + if (entityId == null) { + throw new ApiException(400, "Missing the required parameter 'entityId' when calling getAlarmsByEntity"); + } + // verify the required parameter 'pageSize' is set + if (pageSize == null) { + throw new ApiException(400, "Missing the required parameter 'pageSize' when calling getAlarmsByEntity"); + } + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException(400, "Missing the required parameter 'page' when calling getAlarmsByEntity"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/alarm/{entityType}/{entityId}" + .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) + .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "searchStatus"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("searchStatus", searchStatus)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + localVarQueryParameterBaseName = "assigneeId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("assigneeId", assigneeId)); + 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)); + localVarQueryParameterBaseName = "startTime"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); + localVarQueryParameterBaseName = "endTime"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); + localVarQueryParameterBaseName = "fetchOriginator"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("fetchOriginator", fetchOriginator)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); @@ -20444,10 +21033,12 @@ private HttpRequest.Builder getCurrentWhiteLabelParamsRequestBuilder(@Nullable S * Get end-user Custom Menu configuration (getCustomMenu) * Fetch the Custom Menu configuration object for the authorized user. The custom menu is configured in the white labeling parameters and has one of three user scopes:SYSTEM, TENANT, CUSTOMER and four assignee type: NO_ASSIGN, ALL, CUSTOMERS, USERS.There are three default (assignee type: ALL) menus configured on the system level for each scope and if no other menu is configured for user, system configuration of the corresponding scope will be applied.If a custom menu with assignee type ALL is configured on the tenant level, it overrides the menu configuration of the corresponding scope on the system level. If a custom menu with assignee type USER_GROUPS is configured on the tenant level, it overrides default tenant menu.If a custom menu with assignee type CUSTOMERS is configured on tenant level for specific customer, it will be applied to all customer users.If a custom menu with assignee type ALL is configured on the customer level, it overrides the menu assigned on tenant level.If a custom menu with assignee type USER_GROUPS is configured on the customer level, it overrides default customer menu.If a custom menu is assigned to specific user, it overrides all other configuration. * @param ifNoneMatch (optional) + * @return CustomMenuConfig * @throws ApiException if fails to make API call */ - public void getCustomMenu(@Nullable String ifNoneMatch) throws ApiException { - getCustomMenuWithHttpInfo(ifNoneMatch, null); + public CustomMenuConfig getCustomMenu(@Nullable String ifNoneMatch) throws ApiException { + ApiResponse localVarResponse = getCustomMenuWithHttpInfo(ifNoneMatch, null); + return localVarResponse.getData(); } /** @@ -20455,10 +21046,10 @@ public void getCustomMenu(@Nullable String ifNoneMatch) throws ApiException { * Fetch the Custom Menu configuration object for the authorized user. The custom menu is configured in the white labeling parameters and has one of three user scopes:SYSTEM, TENANT, CUSTOMER and four assignee type: NO_ASSIGN, ALL, CUSTOMERS, USERS.There are three default (assignee type: ALL) menus configured on the system level for each scope and if no other menu is configured for user, system configuration of the corresponding scope will be applied.If a custom menu with assignee type ALL is configured on the tenant level, it overrides the menu configuration of the corresponding scope on the system level. If a custom menu with assignee type USER_GROUPS is configured on the tenant level, it overrides default tenant menu.If a custom menu with assignee type CUSTOMERS is configured on tenant level for specific customer, it will be applied to all customer users.If a custom menu with assignee type ALL is configured on the customer level, it overrides the menu assigned on tenant level.If a custom menu with assignee type USER_GROUPS is configured on the customer level, it overrides default customer menu.If a custom menu is assigned to specific user, it overrides all other configuration. * @param ifNoneMatch (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<CustomMenuConfig> * @throws ApiException if fails to make API call */ - public ApiResponse getCustomMenuWithHttpInfo(@Nullable String ifNoneMatch, Map headers) throws ApiException { + public ApiResponse getCustomMenuWithHttpInfo(@Nullable String ifNoneMatch, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = getCustomMenuRequestBuilder(ifNoneMatch, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -20473,10 +21064,12 @@ public ApiResponse getCustomMenuWithHttpInfo(@Nullable String ifNoneMatch, throw getApiException("getCustomMenu", 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(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + String responseBody = new String(localVarResponseBody.readAllBytes()); + CustomMenuConfig responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue); } finally { if (localVarResponseBody != null) { localVarResponseBody.close(); @@ -23029,10 +23622,12 @@ private HttpRequest.Builder getCustomersByIdsRequestBuilder(@Nonnull List localVarResponse = getDashboardByIdWithHttpInfo(dashboardId, includeResources, acceptEncoding, null); + return localVarResponse.getData(); } /** @@ -23042,10 +23637,10 @@ public void getDashboardById(@Nonnull String dashboardId, @Nullable Boolean incl * @param includeResources Export used resources and replace resource links with resource metadata (optional) * @param acceptEncoding (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<Dashboard> * @throws ApiException if fails to make API call */ - public ApiResponse getDashboardByIdWithHttpInfo(@Nonnull String dashboardId, @Nullable Boolean includeResources, @Nullable String acceptEncoding, Map headers) throws ApiException { + public ApiResponse getDashboardByIdWithHttpInfo(@Nonnull String dashboardId, @Nullable Boolean includeResources, @Nullable String acceptEncoding, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = getDashboardByIdRequestBuilder(dashboardId, includeResources, acceptEncoding, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -23060,10 +23655,12 @@ public ApiResponse getDashboardByIdWithHttpInfo(@Nonnull String dashboardI throw getApiException("getDashboardById", 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(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + String responseBody = new String(localVarResponseBody.readAllBytes()); + Dashboard responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue); } finally { if (localVarResponseBody != null) { localVarResponseBody.close(); @@ -29397,10 +29994,12 @@ private HttpRequest.Builder getFirmwareByIdRequestBuilder(@Nonnull String groupI * @param localeCode Locale code (e.g. 'en_US'). (required) * @param ifNoneMatch (optional) * @param acceptEncoding (optional) + * @return com.fasterxml.jackson.databind.JsonNode * @throws ApiException if fails to make API call */ - public void getFullTranslation(@Nonnull String localeCode, @Nullable String ifNoneMatch, @Nullable String acceptEncoding) throws ApiException { - getFullTranslationWithHttpInfo(localeCode, ifNoneMatch, acceptEncoding, null); + public com.fasterxml.jackson.databind.JsonNode getFullTranslation(@Nonnull String localeCode, @Nullable String ifNoneMatch, @Nullable String acceptEncoding) throws ApiException { + ApiResponse localVarResponse = getFullTranslationWithHttpInfo(localeCode, ifNoneMatch, acceptEncoding, null); + return localVarResponse.getData(); } /** @@ -29410,10 +30009,10 @@ public void getFullTranslation(@Nonnull String localeCode, @Nullable String ifNo * @param ifNoneMatch (optional) * @param acceptEncoding (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> * @throws ApiException if fails to make API call */ - public ApiResponse getFullTranslationWithHttpInfo(@Nonnull String localeCode, @Nullable String ifNoneMatch, @Nullable String acceptEncoding, Map headers) throws ApiException { + public ApiResponse getFullTranslationWithHttpInfo(@Nonnull String localeCode, @Nullable String ifNoneMatch, @Nullable String acceptEncoding, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = getFullTranslationRequestBuilder(localeCode, ifNoneMatch, acceptEncoding, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -29428,10 +30027,12 @@ public ApiResponse getFullTranslationWithHttpInfo(@Nonnull String localeCo throw getApiException("getFullTranslation", 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(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + String responseBody = new String(localVarResponseBody.readAllBytes()); + com.fasterxml.jackson.databind.JsonNode responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue); } finally { if (localVarResponseBody != null) { localVarResponseBody.close(); @@ -30108,10 +30709,12 @@ private HttpRequest.Builder getHighestAlarmSeverityRequestBuilder(@Nonnull Strin * Get Home Dashboard (getHomeDashboard) * Returns the home dashboard object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases). Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param acceptEncoding (optional) + * @return HomeDashboard * @throws ApiException if fails to make API call */ - public void getHomeDashboard(@Nullable String acceptEncoding) throws ApiException { - getHomeDashboardWithHttpInfo(acceptEncoding, null); + public HomeDashboard getHomeDashboard(@Nullable String acceptEncoding) throws ApiException { + ApiResponse localVarResponse = getHomeDashboardWithHttpInfo(acceptEncoding, null); + return localVarResponse.getData(); } /** @@ -30119,10 +30722,10 @@ public void getHomeDashboard(@Nullable String acceptEncoding) throws ApiExceptio * Returns the home dashboard object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases). Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param acceptEncoding (optional) * @param headers Optional headers to include in the request - * @return ApiResponse<Void> + * @return ApiResponse<HomeDashboard> * @throws ApiException if fails to make API call */ - public ApiResponse getHomeDashboardWithHttpInfo(@Nullable String acceptEncoding, Map headers) throws ApiException { + public ApiResponse getHomeDashboardWithHttpInfo(@Nullable String acceptEncoding, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = getHomeDashboardRequestBuilder(acceptEncoding, headers); try { HttpResponse localVarResponse = memberVarHttpClient.send( @@ -30137,10 +30740,12 @@ public ApiResponse getHomeDashboardWithHttpInfo(@Nullable String acceptEnc throw getApiException("getHomeDashboard", 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(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + String responseBody = new String(localVarResponseBody.readAllBytes()); + HomeDashboard responseValue = responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference() {}); + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), responseValue); } finally { if (localVarResponseBody != null) { localVarResponseBody.close(); @@ -31413,6 +32018,83 @@ private HttpRequest.Builder getLastVisitedDashboardsRequestBuilder(Map localVarResponse = getLatestAlarmRuleDebugEventWithHttpInfo(alarmRuleId, null); + return localVarResponse.getData(); + } + + /** + * Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent) + * Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. Available for users with 'TENANT_ADMIN' authority. + * @param alarmRuleId (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> + * @throws ApiException if fails to make API call + */ + public ApiResponse getLatestAlarmRuleDebugEventWithHttpInfo(@Nonnull String alarmRuleId, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = getLatestAlarmRuleDebugEventRequestBuilder(alarmRuleId, 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("getLatestAlarmRuleDebugEvent", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + com.fasterxml.jackson.databind.JsonNode 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 getLatestAlarmRuleDebugEventRequestBuilder(@Nonnull String alarmRuleId, Map headers) throws ApiException { + // verify the required parameter 'alarmRuleId' is set + if (alarmRuleId == null) { + throw new ApiException(400, "Missing the required parameter 'alarmRuleId' when calling getLatestAlarmRuleDebugEvent"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/alarm/rule/{alarmRuleId}/debug" + .replace("{alarmRuleId}", ApiClient.urlEncode(alarmRuleId.toString())); + 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 latest calculated field debug event (getLatestCalculatedFieldDebugEvent) * Gets latest calculated field debug event for specified calculated field id. Referencing non-existing calculated field id will cause an error. Available for users with 'TENANT_ADMIN' authority. @@ -47800,7 +48482,7 @@ private HttpRequest.Builder handleMailOAuth2CallbackRequestBuilder(@Nonnull Stri * Send one-way RPC request (handleOneWayDeviceRPCRequestV1) * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param body (required) + * @param body A JSON object representing the RPC request. (required) * @return String * @throws ApiException if fails to make API call */ @@ -47813,7 +48495,7 @@ public String handleOneWayDeviceRPCRequestV1(@Nonnull String deviceId, @Nonnull * Send one-way RPC request (handleOneWayDeviceRPCRequestV1) * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param body (required) + * @param body A JSON object representing the RPC request. (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call @@ -47866,7 +48548,7 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequestV1RequestBuilder(@Nonnul String localVarPath = "/api/plugins/rpc/oneway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -47884,7 +48566,7 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequestV1RequestBuilder(@Nonnul * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) * 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. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param body (required) + * @param body A JSON object representing the RPC request. (required) * @return String * @throws ApiException if fails to make API call */ @@ -47897,7 +48579,7 @@ public String handleOneWayDeviceRPCRequestV2(@Nonnull String deviceId, @Nonnull * Send one-way RPC request (handleOneWayDeviceRPCRequestV2) * 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. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param body (required) + * @param body A JSON object representing the RPC request. (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call @@ -47950,7 +48632,7 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequestV2RequestBuilder(@Nonnul String localVarPath = "/api/rpc/oneway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -47969,7 +48651,7 @@ private HttpRequest.Builder handleOneWayDeviceRPCRequestV2RequestBuilder(@Nonnul * 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: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'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. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param body (required) + * @param body A JSON object representing the message. (required) * @return String * @throws ApiException if fails to make API call */ @@ -47983,7 +48665,7 @@ public String handleRuleEngineRequestForEntity(@Nonnull String entityType, @Nonn * 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: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'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. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param body (required) + * @param body A JSON object representing the message. (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call @@ -48041,7 +48723,7 @@ private HttpRequest.Builder handleRuleEngineRequestForEntityRequestBuilder(@Nonn .replace("{entityType}", ApiClient.urlEncode(entityType.toString())) .replace("{entityId}", ApiClient.urlEncode(entityId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -48062,7 +48744,7 @@ private HttpRequest.Builder handleRuleEngineRequestForEntityRequestBuilder(@Nonn * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) - * @param body (required) + * @param body A JSON object representing the message. (required) * @return String * @throws ApiException if fails to make API call */ @@ -48078,7 +48760,7 @@ public String handleRuleEngineRequestForEntityWithQueueAndTimeout(@Nonnull Strin * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param queueName Queue name to process the request in the rule engine (required) * @param timeout Timeout to process the request in milliseconds (required) - * @param body (required) + * @param body A JSON object representing the message. (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call @@ -48146,7 +48828,7 @@ private HttpRequest.Builder handleRuleEngineRequestForEntityWithQueueAndTimeoutR .replace("{queueName}", ApiClient.urlEncode(queueName.toString())) .replace("{timeout}", ApiClient.urlEncode(timeout.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -48166,7 +48848,7 @@ private HttpRequest.Builder handleRuleEngineRequestForEntityWithQueueAndTimeoutR * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param timeout Timeout to process the request in milliseconds (required) - * @param body (required) + * @param body A JSON object representing the message. (required) * @return String * @throws ApiException if fails to make API call */ @@ -48181,7 +48863,7 @@ public String handleRuleEngineRequestForEntityWithTimeout(@Nonnull String entity * @param entityType A string value representing the entity type. For example, 'DEVICE' (required) * @param entityId A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) * @param timeout Timeout to process the request in milliseconds (required) - * @param body (required) + * @param body A JSON object representing the message. (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call @@ -48244,7 +48926,7 @@ private HttpRequest.Builder handleRuleEngineRequestForEntityWithTimeoutRequestBu .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) .replace("{timeout}", ApiClient.urlEncode(timeout.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -48261,7 +48943,7 @@ private HttpRequest.Builder handleRuleEngineRequestForEntityWithTimeoutRequestBu /** * Push user message to the rule engine (handleRuleEngineRequestForUser) * 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: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'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. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). - * @param body (required) + * @param body A JSON object representing the message. (required) * @return String * @throws ApiException if fails to make API call */ @@ -48273,7 +48955,7 @@ public String handleRuleEngineRequestForUser(@Nonnull String body) throws ApiExc /** * Push user message to the rule engine (handleRuleEngineRequestForUser) * 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: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'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. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). - * @param body (required) + * @param body A JSON object representing the message. (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call @@ -48321,7 +49003,7 @@ private HttpRequest.Builder handleRuleEngineRequestForUserRequestBuilder(@Nonnul HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = "/api/rule-engine/"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -48339,7 +49021,7 @@ private HttpRequest.Builder handleRuleEngineRequestForUserRequestBuilder(@Nonnul * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param body (required) + * @param body A JSON object representing the RPC request. (required) * @return String * @throws ApiException if fails to make API call */ @@ -48352,7 +49034,7 @@ public String handleTwoWayDeviceRPCRequestV1(@Nonnull String deviceId, @Nonnull * Send two-way RPC request (handleTwoWayDeviceRPCRequestV1) * Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param body (required) + * @param body A JSON object representing the RPC request. (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call @@ -48405,7 +49087,7 @@ private HttpRequest.Builder handleTwoWayDeviceRPCRequestV1RequestBuilder(@Nonnul String localVarPath = "/api/plugins/rpc/twoway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -48423,7 +49105,7 @@ private HttpRequest.Builder handleTwoWayDeviceRPCRequestV1RequestBuilder(@Nonnul * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) * 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. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param body (required) + * @param body A JSON object representing the RPC request. (required) * @return String * @throws ApiException if fails to make API call */ @@ -48436,7 +49118,7 @@ public String handleTwoWayDeviceRPCRequestV2(@Nonnull String deviceId, @Nonnull * Send two-way RPC request (handleTwoWayDeviceRPCRequestV2) * 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. ```json { \"method\": \"setGpio\", \"params\": { \"pin\": 7, \"value\": 1 }, \"persistent\": false, \"timeout\": 5000 } ``` ### Server-side RPC structure The body of server-side RPC request consists of multiple fields: * **method** - mandatory, name of the method to distinct the RPC calls. For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string. * **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed. * **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds). * **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present. * **persistent** - optional, indicates persistent RPC. The default value is \"false\". * **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side. * **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events. ### RPC Result In 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. * @param deviceId A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - * @param body (required) + * @param body A JSON object representing the RPC request. (required) * @param headers Optional headers to include in the request * @return ApiResponse<String> * @throws ApiException if fails to make API call @@ -48489,7 +49171,7 @@ private HttpRequest.Builder handleTwoWayDeviceRPCRequestV2RequestBuilder(@Nonnul String localVarPath = "/api/rpc/twoway/{deviceId}" .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -48875,6 +49557,88 @@ private HttpRequest.Builder importRuleChainsRequestBuilder(@Nonnull RuleChainDat return localVarRequestBuilder; } + /** + * Import Solution (importSolution) + * Imports a solution package into the current tenant. Before importing, the endpoint checks for name conflicts with existing entities in the tenant. If name conflicts are detected, the import is rejected with HTTP 409 (Conflict). The import is transactional — if any entity fails to import, all changes are rolled back (all-or-nothing). Entities are imported in dependency order with a two-pass resolution for circular references (e.g. rule chains referencing each other). Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + * @param solutionData Solution data exported via the export endpoint. (required) + * @return SolutionImportResult + * @throws ApiException if fails to make API call + */ + public SolutionImportResult importSolution(@Nonnull SolutionData solutionData) throws ApiException { + ApiResponse localVarResponse = importSolutionWithHttpInfo(solutionData, null); + return localVarResponse.getData(); + } + + /** + * Import Solution (importSolution) + * Imports a solution package into the current tenant. Before importing, the endpoint checks for name conflicts with existing entities in the tenant. If name conflicts are detected, the import is rejected with HTTP 409 (Conflict). The import is transactional — if any entity fails to import, all changes are rolled back (all-or-nothing). Entities are imported in dependency order with a two-pass resolution for circular references (e.g. rule chains referencing each other). Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + * @param solutionData Solution data exported via the export endpoint. (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<SolutionImportResult> + * @throws ApiException if fails to make API call + */ + public ApiResponse importSolutionWithHttpInfo(@Nonnull SolutionData solutionData, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = importSolutionRequestBuilder(solutionData, 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("importSolution", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + SolutionImportResult 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 importSolutionRequestBuilder(@Nonnull SolutionData solutionData, Map headers) throws ApiException { + // verify the required parameter 'solutionData' is set + if (solutionData == null) { + throw new ApiException(400, "Missing the required parameter 'solutionData' when calling importSolution"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/solution/import"; + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(solutionData); + 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; + } + /** * Install Solution Template (installSolutionTemplate) * Install solution template based on the provided id Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). @@ -53151,6 +53915,88 @@ private HttpRequest.Builder saveAlarmCommentRequestBuilder(@Nonnull String alarm return localVarRequestBuilder; } + /** + * Create Or Update Alarm Rule (saveAlarmRule) + * Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. Available for users with 'TENANT_ADMIN' authority. + * @param alarmRuleDefinition A JSON value representing the alarm rule. (required) + * @return AlarmRuleDefinition + * @throws ApiException if fails to make API call + */ + public AlarmRuleDefinition saveAlarmRule(@Nonnull AlarmRuleDefinition alarmRuleDefinition) throws ApiException { + ApiResponse localVarResponse = saveAlarmRuleWithHttpInfo(alarmRuleDefinition, null); + return localVarResponse.getData(); + } + + /** + * Create Or Update Alarm Rule (saveAlarmRule) + * Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. Available for users with 'TENANT_ADMIN' authority. + * @param alarmRuleDefinition A JSON value representing the alarm rule. (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<AlarmRuleDefinition> + * @throws ApiException if fails to make API call + */ + public ApiResponse saveAlarmRuleWithHttpInfo(@Nonnull AlarmRuleDefinition alarmRuleDefinition, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = saveAlarmRuleRequestBuilder(alarmRuleDefinition, 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("saveAlarmRule", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + AlarmRuleDefinition 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 saveAlarmRuleRequestBuilder(@Nonnull AlarmRuleDefinition alarmRuleDefinition, Map headers) throws ApiException { + // verify the required parameter 'alarmRuleDefinition' is set + if (alarmRuleDefinition == null) { + throw new ApiException(400, "Missing the required parameter 'alarmRuleDefinition' when calling saveAlarmRule"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/alarm/rule"; + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(alarmRuleDefinition); + 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; + } + /** * 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. @@ -54258,7 +55104,7 @@ private HttpRequest.Builder saveDeviceAttributesRequestBuilder(@Nonnull String d .replace("{deviceId}", ApiClient.urlEncode(deviceId.toString())) .replace("{scope}", ApiClient.urlEncode(scope.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -54356,7 +55202,7 @@ private HttpRequest.Builder saveDeviceGroupOtaPackageRequestBuilder(@Nonnull Dev /** * Create Or Update Device Profile (saveDeviceProfile) - * 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. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device 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. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"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}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\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}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means 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: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'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). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key 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: ## Alarm Filter Key Filter 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: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides 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: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter 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. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` 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 device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note 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. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default 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. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. + * 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. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains 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. ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"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}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\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}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration:# Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default 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. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceProfile (required) * @return DeviceProfile * @throws ApiException if fails to make API call @@ -54368,7 +55214,7 @@ public DeviceProfile saveDeviceProfile(@Nonnull DeviceProfile deviceProfile) thr /** * Create Or Update Device Profile (saveDeviceProfile) - * 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. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device 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. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"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}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\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}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means 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: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'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). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key 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: ## Alarm Filter Key Filter 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: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides 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: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter 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. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` 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 device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note 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. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default 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. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. + * 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. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains 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. ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"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}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\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}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration:# Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default 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. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. * @param deviceProfile (required) * @param headers Optional headers to include in the request * @return ApiResponse<DeviceProfile> @@ -54916,7 +55762,7 @@ private HttpRequest.Builder saveEntityAttributesV1RequestBuilder(@Nonnull String .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) .replace("{scope}", ApiClient.urlEncode(scope.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -55014,7 +55860,7 @@ private HttpRequest.Builder saveEntityAttributesV2RequestBuilder(@Nonnull String .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) .replace("{scope}", ApiClient.urlEncode(scope.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -55194,7 +56040,7 @@ private HttpRequest.Builder saveEntityTelemetryRequestBuilder(@Nonnull String en .replace("{entityId}", ApiClient.urlEncode(entityId.toString())) .replace("{scope}", ApiClient.urlEncode(scope.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -55299,7 +56145,7 @@ private HttpRequest.Builder saveEntityTelemetryWithTTLRequestBuilder(@Nonnull St .replace("{scope}", ApiClient.urlEncode(scope.toString())) .replace("{ttl}", ApiClient.urlEncode(ttl.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "text/plain"); localVarRequestBuilder.header("Accept", "application/json"); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofString(body)); if (memberVarReadTimeout != null) { @@ -60740,6 +61586,88 @@ private HttpRequest.Builder termsOfUseAcceptedRequestBuilder(Map return localVarRequestBuilder; } + /** + * Test alarm rule TBEL expression (testAlarmRuleScript) + * Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: ```json { \"expression\": \"return temperature > 50;\", \"arguments\": { \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test alarm rule TBEL condition expression. The expression must return a boolean value. (required) + * @return com.fasterxml.jackson.databind.JsonNode + * @throws ApiException if fails to make API call + */ + public com.fasterxml.jackson.databind.JsonNode testAlarmRuleScript(@Nullable Object body) throws ApiException { + ApiResponse localVarResponse = testAlarmRuleScriptWithHttpInfo(body, null); + return localVarResponse.getData(); + } + + /** + * Test alarm rule TBEL expression (testAlarmRuleScript) + * Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: ```json { \"expression\": \"return temperature > 50;\", \"arguments\": { \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + * @param body Test alarm rule TBEL condition expression. The expression must return a boolean value. (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<com.fasterxml.jackson.databind.JsonNode> + * @throws ApiException if fails to make API call + */ + public ApiResponse testAlarmRuleScriptWithHttpInfo(@Nullable Object body, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testAlarmRuleScriptRequestBuilder(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("testAlarmRuleScript", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + com.fasterxml.jackson.databind.JsonNode 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 testAlarmRuleScriptRequestBuilder(@Nullable Object 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 testAlarmRuleScript"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/alarm/rule/testScript"; + 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("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; + } + /** * Test Script expression * Execute the Script expression and return the result. The format of request: ```json { \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\", \"arguments\": { \"temperature\": { \"type\": \"TS_ROLLING\", \"timeWindow\": { \"startTs\": 1739775630002, \"endTs\": 65432211, \"limit\": 5 }, \"values\": [ { \"ts\": 1739775639851, \"value\": 23 }, { \"ts\": 1739775664561, \"value\": 43 }, { \"ts\": 1739775713079, \"value\": 15 }, { \"ts\": 1739775999522, \"value\": 34 }, { \"ts\": 1739776228452, \"value\": 22 } ] }, \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. @@ -63858,6 +64786,88 @@ private HttpRequest.Builder validateCalculatedFieldReprocessingRequestBuilder(@N return localVarRequestBuilder; } + /** + * Validate Solution (validateSolution) + * Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission. + * @param solutionData Solution data to validate. (required) + * @return SolutionValidationResult + * @throws ApiException if fails to make API call + */ + public SolutionValidationResult validateSolution(@Nonnull SolutionData solutionData) throws ApiException { + ApiResponse localVarResponse = validateSolutionWithHttpInfo(solutionData, null); + return localVarResponse.getData(); + } + + /** + * Validate Solution (validateSolution) + * Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission. + * @param solutionData Solution data to validate. (required) + * @param headers Optional headers to include in the request + * @return ApiResponse<SolutionValidationResult> + * @throws ApiException if fails to make API call + */ + public ApiResponse validateSolutionWithHttpInfo(@Nonnull SolutionData solutionData, Map headers) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = validateSolutionRequestBuilder(solutionData, 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("validateSolution", localVarResponse); + } + localVarResponseBody = ApiClient.getResponseBody(localVarResponse); + if (localVarResponseBody == null) { + return new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null); + } + String responseBody = new String(localVarResponseBody.readAllBytes()); + SolutionValidationResult 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 validateSolutionRequestBuilder(@Nonnull SolutionData solutionData, Map headers) throws ApiException { + // verify the required parameter 'solutionData' is set + if (solutionData == null) { + throw new ApiException(400, "Missing the required parameter 'solutionData' when calling validateSolution"); + } + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + String localVarPath = "/api/solution/validate"; + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(solutionData); + 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; + } + /** * Verify and save 2FA account config (verifyAndSaveTwoFaAccountConfig) * Checks the verification code for submitted config, and if it is correct, saves the provided account config. Returns whole account's 2FA settings object. Will throw an error (Bad Request) if the provider is not configured for usage. Available for any authorized user. diff --git a/pe/src/main/java/org/thingsboard/client/model/AiChatModelConfigObject.java b/pe/src/main/java/org/thingsboard/client/model/AiChatModelConfig.java similarity index 84% rename from pe/src/main/java/org/thingsboard/client/model/AiChatModelConfigObject.java rename to pe/src/main/java/org/thingsboard/client/model/AiChatModelConfig.java index 4a31c02b..f17433f9 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AiChatModelConfigObject.java +++ b/pe/src/main/java/org/thingsboard/client/model/AiChatModelConfig.java @@ -35,26 +35,23 @@ import org.thingsboard.client.ApiClient; /** - * AiChatModelConfigObject + * AiChatModelConfig */ @JsonPropertyOrder({ - AiChatModelConfigObject.JSON_PROPERTY_MODEL_TYPE + AiChatModelConfig.JSON_PROPERTY_MODEL_TYPE }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AiChatModelConfigObject { +public class AiChatModelConfig { public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; @Nullable private AiModelType modelType; - public AiChatModelConfigObject() { + public AiChatModelConfig() { } - @JsonCreator - public AiChatModelConfigObject( - @JsonProperty(JSON_PROPERTY_MODEL_TYPE) AiModelType modelType - ) { - this(); + public AiChatModelConfig modelType(@Nullable AiModelType modelType) { this.modelType = modelType; + return this; } /** @@ -69,10 +66,15 @@ public AiModelType getModelType() { } + @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setModelType(@Nullable AiModelType modelType) { + this.modelType = modelType; + } /** - * Return true if this AiChatModelConfigObject object is equal to o. + * Return true if this AiChatModelConfig object is equal to o. */ @Override public boolean equals(Object o) { @@ -82,8 +84,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AiChatModelConfigObject aiChatModelConfigObject = (AiChatModelConfigObject) o; - return Objects.equals(this.modelType, aiChatModelConfigObject.modelType); + AiChatModelConfig aiChatModelConfig = (AiChatModelConfig) o; + return Objects.equals(this.modelType, aiChatModelConfig.modelType); } @Override @@ -94,7 +96,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AiChatModelConfigObject {\n"); + sb.append("class AiChatModelConfig {\n"); sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmConditionFilter.java b/pe/src/main/java/org/thingsboard/client/model/AlarmConditionFilter.java deleted file mode 100644 index 7fca76b0..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmConditionFilter.java +++ /dev/null @@ -1,288 +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 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 org.openapitools.jackson.nullable.JsonNullable; -import org.thingsboard.client.model.AlarmConditionFilterKey; -import org.thingsboard.client.model.EntityKeyValueType; -import org.thingsboard.client.model.KeyFilterPredicate; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * AlarmConditionFilter - */ -@JsonPropertyOrder({ - AlarmConditionFilter.JSON_PROPERTY_VALUE_TYPE, - AlarmConditionFilter.JSON_PROPERTY_KEY, - AlarmConditionFilter.JSON_PROPERTY_PREDICATE, - AlarmConditionFilter.JSON_PROPERTY_VALUE -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AlarmConditionFilter { - public static final String JSON_PROPERTY_VALUE_TYPE = "valueType"; - @Nullable - private EntityKeyValueType valueType; - - public static final String JSON_PROPERTY_KEY = "key"; - @Nullable - private AlarmConditionFilterKey key; - - public static final String JSON_PROPERTY_PREDICATE = "predicate"; - @Nullable - private KeyFilterPredicate predicate; - - public static final String JSON_PROPERTY_VALUE = "value"; - private JsonNullable value = JsonNullable.of(null); - - public AlarmConditionFilter() { - } - - public AlarmConditionFilter valueType(@Nullable EntityKeyValueType valueType) { - this.valueType = valueType; - return this; - } - - /** - * String representation of the type of the value - * @return valueType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_VALUE_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityKeyValueType getValueType() { - return valueType; - } - - - @JsonProperty(value = JSON_PROPERTY_VALUE_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValueType(@Nullable EntityKeyValueType valueType) { - this.valueType = valueType; - } - - - public AlarmConditionFilter key(@Nullable AlarmConditionFilterKey key) { - this.key = key; - return this; - } - - /** - * JSON object for specifying alarm condition by specific key - * @return key - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_KEY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AlarmConditionFilterKey getKey() { - return key; - } - - - @JsonProperty(value = JSON_PROPERTY_KEY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKey(@Nullable AlarmConditionFilterKey key) { - this.key = key; - } - - - public AlarmConditionFilter predicate(@Nullable KeyFilterPredicate predicate) { - this.predicate = predicate; - return this; - } - - /** - * JSON object representing filter condition - * @return predicate - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PREDICATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public KeyFilterPredicate getPredicate() { - return predicate; - } - - - @JsonProperty(value = JSON_PROPERTY_PREDICATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPredicate(@Nullable KeyFilterPredicate predicate) { - this.predicate = predicate; - } - - - public AlarmConditionFilter value(@Nullable Object value) { - this.value = JsonNullable.of(value); - return this; - } - - /** - * Get value - * @return value - */ - @Nullable - @JsonIgnore - public Object getValue() { - return value.orElse(null); - } - - @JsonProperty(value = JSON_PROPERTY_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getValue_JsonNullable() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - public void setValue_JsonNullable(JsonNullable value) { - this.value = value; - } - - public void setValue(@Nullable Object value) { - this.value = JsonNullable.of(value); - } - - - /** - * Return true if this AlarmConditionFilter object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AlarmConditionFilter alarmConditionFilter = (AlarmConditionFilter) o; - return Objects.equals(this.valueType, alarmConditionFilter.valueType) && - Objects.equals(this.key, alarmConditionFilter.key) && - Objects.equals(this.predicate, alarmConditionFilter.predicate) && - equalsNullable(this.value, alarmConditionFilter.value); - } - - 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(valueType, key, predicate, hashCodeNullable(value)); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AlarmConditionFilter {\n"); - sb.append(" valueType: ").append(toIndentedString(valueType)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" predicate: ").append(toIndentedString(predicate)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).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 `valueType` to the URL query string - if (getValueType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%svalueType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValueType())))); - } - - // add `key` to the URL query string - if (getKey() != null) { - joiner.add(getKey().toUrlQueryString(prefix + "key" + suffix)); - } - - // add `predicate` to the URL query string - if (getPredicate() != null) { - joiner.add(getPredicate().toUrlQueryString(prefix + "predicate" + suffix)); - } - - // add `value` to the URL query string - if (getValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); - } - - return joiner.toString(); - } -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmConditionKeyType.java b/pe/src/main/java/org/thingsboard/client/model/AlarmConditionKeyType.java deleted file mode 100644 index d73758e9..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmConditionKeyType.java +++ /dev/null @@ -1,84 +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.JsonPropertyOrder; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets AlarmConditionKeyType - */ -public enum AlarmConditionKeyType { - - ATTRIBUTE("ATTRIBUTE"), - - TIME_SERIES("TIME_SERIES"), - - ENTITY_FIELD("ENTITY_FIELD"), - - CONSTANT("CONSTANT"); - - private String value; - - AlarmConditionKeyType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static AlarmConditionKeyType fromValue(String value) { - for (AlarmConditionKeyType b : AlarmConditionKeyType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - if (prefix == null) { - prefix = ""; - } - - return String.format(java.util.Locale.ROOT, "%s=%s", prefix, this.toString()); - } - -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmRule.java b/pe/src/main/java/org/thingsboard/client/model/AlarmRule.java deleted file mode 100644 index 284bb26c..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmRule.java +++ /dev/null @@ -1,266 +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 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 org.thingsboard.client.model.AlarmCondition; -import org.thingsboard.client.model.AlarmSchedule; -import org.thingsboard.client.model.DashboardId; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * AlarmRule - */ -@JsonPropertyOrder({ - AlarmRule.JSON_PROPERTY_CONDITION, - AlarmRule.JSON_PROPERTY_ALARM_DETAILS, - AlarmRule.JSON_PROPERTY_DASHBOARD_ID, - AlarmRule.JSON_PROPERTY_SCHEDULE -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AlarmRule { - public static final String JSON_PROPERTY_CONDITION = "condition"; - @Nullable - private AlarmCondition condition; - - public static final String JSON_PROPERTY_ALARM_DETAILS = "alarmDetails"; - @Nullable - private String alarmDetails; - - public static final String JSON_PROPERTY_DASHBOARD_ID = "dashboardId"; - @Nullable - private DashboardId dashboardId; - - public static final String JSON_PROPERTY_SCHEDULE = "schedule"; - @Nullable - private AlarmSchedule schedule; - - public AlarmRule() { - } - - public AlarmRule condition(@Nullable AlarmCondition condition) { - this.condition = condition; - return this; - } - - /** - * JSON object representing the alarm rule condition - * @return condition - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_CONDITION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AlarmCondition getCondition() { - return condition; - } - - - @JsonProperty(value = JSON_PROPERTY_CONDITION, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCondition(@Nullable AlarmCondition condition) { - this.condition = condition; - } - - - public AlarmRule alarmDetails(@Nullable String alarmDetails) { - this.alarmDetails = alarmDetails; - return this; - } - - /** - * String value representing the additional details for an alarm rule - * @return alarmDetails - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_ALARM_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAlarmDetails() { - return alarmDetails; - } - - - @JsonProperty(value = JSON_PROPERTY_ALARM_DETAILS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAlarmDetails(@Nullable String alarmDetails) { - this.alarmDetails = alarmDetails; - } - - - public AlarmRule dashboardId(@Nullable DashboardId dashboardId) { - this.dashboardId = dashboardId; - return this; - } - - /** - * JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application - * @return dashboardId - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DashboardId getDashboardId() { - return dashboardId; - } - - - @JsonProperty(value = JSON_PROPERTY_DASHBOARD_ID, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDashboardId(@Nullable DashboardId dashboardId) { - this.dashboardId = dashboardId; - } - - - public AlarmRule schedule(@Nullable AlarmSchedule schedule) { - this.schedule = schedule; - return this; - } - - /** - * JSON object representing time interval during which the rule is active - * @return schedule - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_SCHEDULE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AlarmSchedule getSchedule() { - return schedule; - } - - - @JsonProperty(value = JSON_PROPERTY_SCHEDULE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSchedule(@Nullable AlarmSchedule schedule) { - this.schedule = schedule; - } - - - /** - * Return true if this AlarmRule object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AlarmRule alarmRule = (AlarmRule) o; - return Objects.equals(this.condition, alarmRule.condition) && - Objects.equals(this.alarmDetails, alarmRule.alarmDetails) && - Objects.equals(this.dashboardId, alarmRule.dashboardId) && - Objects.equals(this.schedule, alarmRule.schedule); - } - - @Override - public int hashCode() { - return Objects.hash(condition, alarmDetails, dashboardId, schedule); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AlarmRule {\n"); - sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); - sb.append(" alarmDetails: ").append(toIndentedString(alarmDetails)).append("\n"); - sb.append(" dashboardId: ").append(toIndentedString(dashboardId)).append("\n"); - sb.append(" schedule: ").append(toIndentedString(schedule)).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 `condition` to the URL query string - if (getCondition() != null) { - joiner.add(getCondition().toUrlQueryString(prefix + "condition" + suffix)); - } - - // add `alarmDetails` to the URL query string - if (getAlarmDetails() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%salarmDetails%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAlarmDetails())))); - } - - // add `dashboardId` to the URL query string - if (getDashboardId() != null) { - joiner.add(getDashboardId().toUrlQueryString(prefix + "dashboardId" + suffix)); - } - - // add `schedule` to the URL query string - if (getSchedule() != null) { - joiner.add(getSchedule().toUrlQueryString(prefix + "schedule" + suffix)); - } - - return joiner.toString(); - } -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmRuleDefinitionInfo.java b/pe/src/main/java/org/thingsboard/client/model/AlarmRuleDefinitionInfo.java new file mode 100644 index 00000000..b969d54d --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/AlarmRuleDefinitionInfo.java @@ -0,0 +1,557 @@ +/** + * 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.Nonnull; +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 org.thingsboard.client.model.AlarmCalculatedFieldConfiguration; +import org.thingsboard.client.model.CalculatedFieldId; +import org.thingsboard.client.model.DebugSettings; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.TenantId; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.ApiClient; +/** + * AlarmRuleDefinitionInfo + */ +@JsonPropertyOrder({ + AlarmRuleDefinitionInfo.JSON_PROPERTY_ID, + AlarmRuleDefinitionInfo.JSON_PROPERTY_CREATED_TIME, + AlarmRuleDefinitionInfo.JSON_PROPERTY_TENANT_ID, + AlarmRuleDefinitionInfo.JSON_PROPERTY_ENTITY_ID, + AlarmRuleDefinitionInfo.JSON_PROPERTY_NAME, + AlarmRuleDefinitionInfo.JSON_PROPERTY_DEBUG_SETTINGS, + AlarmRuleDefinitionInfo.JSON_PROPERTY_CONFIGURATION_VERSION, + AlarmRuleDefinitionInfo.JSON_PROPERTY_CONFIGURATION, + AlarmRuleDefinitionInfo.JSON_PROPERTY_VERSION, + AlarmRuleDefinitionInfo.JSON_PROPERTY_ADDITIONAL_INFO, + AlarmRuleDefinitionInfo.JSON_PROPERTY_ENTITY_NAME, + AlarmRuleDefinitionInfo.JSON_PROPERTY_DEBUG_MODE +}) +@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class AlarmRuleDefinitionInfo { + public static final String JSON_PROPERTY_ID = "id"; + @Nullable + private CalculatedFieldId id; + + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; + @Nullable + private Long createdTime; + + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + @Nullable + private TenantId tenantId; + + public static final String JSON_PROPERTY_ENTITY_ID = "entityId"; + @Nullable + private EntityId entityId; + + public static final String JSON_PROPERTY_NAME = "name"; + @Nullable + private String name; + + public static final String JSON_PROPERTY_DEBUG_SETTINGS = "debugSettings"; + @Nullable + private DebugSettings debugSettings; + + public static final String JSON_PROPERTY_CONFIGURATION_VERSION = "configurationVersion"; + @Nullable + private Integer configurationVersion; + + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + @Nonnull + private AlarmCalculatedFieldConfiguration _configuration; + + public static final String JSON_PROPERTY_VERSION = "version"; + @Nullable + private Long version; + + public static final String JSON_PROPERTY_ADDITIONAL_INFO = "additionalInfo"; + @Nullable + private com.fasterxml.jackson.databind.JsonNode additionalInfo; + + public static final String JSON_PROPERTY_ENTITY_NAME = "entityName"; + @Nullable + private String entityName; + + public static final String JSON_PROPERTY_DEBUG_MODE = "debugMode"; + @Nullable + private Boolean debugMode; + + public AlarmRuleDefinitionInfo() { + } + + @JsonCreator + public AlarmRuleDefinitionInfo( + @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime + ) { + this(); + this.createdTime = createdTime; + } + + public AlarmRuleDefinitionInfo id(@Nullable CalculatedFieldId id) { + this.id = id; + return this; + } + + /** + * JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error. + * @return id + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CalculatedFieldId getId() { + return id; + } + + + @JsonProperty(value = JSON_PROPERTY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@Nullable CalculatedFieldId id) { + this.id = id; + } + + + /** + * Timestamp of the alarm rule creation, in milliseconds + * @return createdTime + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreatedTime() { + return createdTime; + } + + + + + public AlarmRuleDefinitionInfo tenantId(@Nullable TenantId tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get tenantId + * @return tenantId + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TenantId getTenantId() { + return tenantId; + } + + + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTenantId(@Nullable TenantId tenantId) { + this.tenantId = tenantId; + } + + + public AlarmRuleDefinitionInfo entityId(@Nullable EntityId entityId) { + this.entityId = entityId; + return this; + } + + /** + * Get entityId + * @return entityId + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityId getEntityId() { + return entityId; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityId(@Nullable EntityId entityId) { + this.entityId = entityId; + } + + + public AlarmRuleDefinitionInfo name(@Nullable String name) { + this.name = name; + return this; + } + + /** + * User defined name of the alarm rule. + * @return name + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@Nullable String name) { + this.name = name; + } + + + public AlarmRuleDefinitionInfo debugSettings(@Nullable DebugSettings debugSettings) { + this.debugSettings = debugSettings; + return this; + } + + /** + * Debug settings object. + * @return debugSettings + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_DEBUG_SETTINGS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DebugSettings getDebugSettings() { + return debugSettings; + } + + + @JsonProperty(value = JSON_PROPERTY_DEBUG_SETTINGS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDebugSettings(@Nullable DebugSettings debugSettings) { + this.debugSettings = debugSettings; + } + + + public AlarmRuleDefinitionInfo configurationVersion(@Nullable Integer configurationVersion) { + this.configurationVersion = configurationVersion; + return this; + } + + /** + * Version of alarm rule configuration. + * @return configurationVersion + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION_VERSION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getConfigurationVersion() { + return configurationVersion; + } + + + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION_VERSION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfigurationVersion(@Nullable Integer configurationVersion) { + this.configurationVersion = configurationVersion; + } + + + public AlarmRuleDefinitionInfo _configuration(@Nonnull AlarmCalculatedFieldConfiguration _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Get _configuration + * @return _configuration + */ + @Nonnull + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AlarmCalculatedFieldConfiguration getConfiguration() { + return _configuration; + } + + + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfiguration(@Nonnull AlarmCalculatedFieldConfiguration _configuration) { + this._configuration = _configuration; + } + + + public AlarmRuleDefinitionInfo version(@Nullable Long version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @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(@Nullable Long version) { + this.version = version; + } + + + public AlarmRuleDefinitionInfo additionalInfo(@Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + + /** + * Additional parameters of the alarm rule. May include: 'description' (string). + * @return additionalInfo + */ + @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(@Nullable com.fasterxml.jackson.databind.JsonNode additionalInfo) { + this.additionalInfo = additionalInfo; + } + + + public AlarmRuleDefinitionInfo entityName(@Nullable String entityName) { + this.entityName = entityName; + return this; + } + + /** + * Get entityName + * @return entityName + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEntityName() { + return entityName; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityName(@Nullable String entityName) { + this.entityName = entityName; + } + + + public AlarmRuleDefinitionInfo debugMode(@Nullable Boolean debugMode) { + this.debugMode = debugMode; + return this; + } + + /** + * Get debugMode + * @return debugMode + * @deprecated + */ + @Deprecated + @Nullable + @JsonProperty(value = JSON_PROPERTY_DEBUG_MODE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDebugMode() { + return debugMode; + } + + + @JsonProperty(value = JSON_PROPERTY_DEBUG_MODE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDebugMode(@Nullable Boolean debugMode) { + this.debugMode = debugMode; + } + + + /** + * Return true if this AlarmRuleDefinitionInfo object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlarmRuleDefinitionInfo alarmRuleDefinitionInfo = (AlarmRuleDefinitionInfo) o; + return Objects.equals(this.id, alarmRuleDefinitionInfo.id) && + Objects.equals(this.createdTime, alarmRuleDefinitionInfo.createdTime) && + Objects.equals(this.tenantId, alarmRuleDefinitionInfo.tenantId) && + Objects.equals(this.entityId, alarmRuleDefinitionInfo.entityId) && + Objects.equals(this.name, alarmRuleDefinitionInfo.name) && + Objects.equals(this.debugSettings, alarmRuleDefinitionInfo.debugSettings) && + Objects.equals(this.configurationVersion, alarmRuleDefinitionInfo.configurationVersion) && + Objects.equals(this._configuration, alarmRuleDefinitionInfo._configuration) && + Objects.equals(this.version, alarmRuleDefinitionInfo.version) && + Objects.equals(this.additionalInfo, alarmRuleDefinitionInfo.additionalInfo) && + Objects.equals(this.entityName, alarmRuleDefinitionInfo.entityName) && + Objects.equals(this.debugMode, alarmRuleDefinitionInfo.debugMode); + } + + @Override + public int hashCode() { + return Objects.hash(id, createdTime, tenantId, entityId, name, debugSettings, configurationVersion, _configuration, version, additionalInfo, entityName, debugMode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlarmRuleDefinitionInfo {\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(" entityId: ").append(toIndentedString(entityId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" debugSettings: ").append(toIndentedString(debugSettings)).append("\n"); + 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(" debugMode: ").append(toIndentedString(debugMode)).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(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 `entityId` to the URL query string + if (getEntityId() != null) { + joiner.add(getEntityId().toUrlQueryString(prefix + "entityId" + suffix)); + } + + // 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 `debugSettings` to the URL query string + if (getDebugSettings() != null) { + joiner.add(getDebugSettings().toUrlQueryString(prefix + "debugSettings" + suffix)); + } + + // add `configurationVersion` to the URL query string + if (getConfigurationVersion() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sconfigurationVersion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getConfigurationVersion())))); + } + + // add `configuration` to the URL query string + if (getConfiguration() != null) { + joiner.add(getConfiguration().toUrlQueryString(prefix + "configuration" + 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())))); + } + + // 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())))); + } + + // add `debugMode` to the URL query string + if (getDebugMode() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sdebugMode%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDebugMode())))); + } + + return joiner.toString(); + } +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmSchedule.java b/pe/src/main/java/org/thingsboard/client/model/AlarmSchedule.java deleted file mode 100644 index cb692de3..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmSchedule.java +++ /dev/null @@ -1,217 +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 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.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 org.thingsboard.client.model.AlarmScheduleType; -import org.thingsboard.client.model.DynamicValueString; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.JSON; -import org.thingsboard.client.ApiClient; -/** - * Configuration for alarm schedule - */ -@JsonPropertyOrder({ - AlarmSchedule.JSON_PROPERTY_DYNAMIC_VALUE, - AlarmSchedule.JSON_PROPERTY_TYPE -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = AnyTimeSchedule.class, name = "ANY_TIME"), - @JsonSubTypes.Type(value = CustomTimeSchedule.class, name = "CUSTOM"), - @JsonSubTypes.Type(value = SpecificTimeSchedule.class, name = "SPECIFIC_TIME"), -}) - -public class AlarmSchedule { - public static final String JSON_PROPERTY_DYNAMIC_VALUE = "dynamicValue"; - @Nullable - private DynamicValueString dynamicValue; - - public static final String JSON_PROPERTY_TYPE = "type"; - @Nullable - private AlarmScheduleType type; - - public AlarmSchedule() { - } - - public AlarmSchedule dynamicValue(@Nullable DynamicValueString dynamicValue) { - this.dynamicValue = dynamicValue; - return this; - } - - /** - * Get dynamicValue - * @return dynamicValue - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DYNAMIC_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DynamicValueString getDynamicValue() { - return dynamicValue; - } - - - @JsonProperty(value = JSON_PROPERTY_DYNAMIC_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDynamicValue(@Nullable DynamicValueString dynamicValue) { - this.dynamicValue = dynamicValue; - } - - - public AlarmSchedule type(@Nullable AlarmScheduleType type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AlarmScheduleType getType() { - return type; - } - - - @JsonProperty(value = JSON_PROPERTY_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(@Nullable AlarmScheduleType type) { - this.type = type; - } - - - /** - * Return true if this AlarmSchedule object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AlarmSchedule alarmSchedule = (AlarmSchedule) o; - return Objects.equals(this.dynamicValue, alarmSchedule.dynamicValue) && - Objects.equals(this.type, alarmSchedule.type); - } - - @Override - public int hashCode() { - return Objects.hash(dynamicValue, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AlarmSchedule {\n"); - sb.append(" dynamicValue: ").append(toIndentedString(dynamicValue)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).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 `dynamicValue` to the URL query string - if (getDynamicValue() != null) { - joiner.add(getDynamicValue().toUrlQueryString(prefix + "dynamicValue" + suffix)); - } - - // 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())))); - } - - return joiner.toString(); - } -static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap>(); - mappings.put("ANY_TIME", AnyTimeSchedule.class); - mappings.put("CUSTOM", CustomTimeSchedule.class); - mappings.put("SPECIFIC_TIME", SpecificTimeSchedule.class); - mappings.put("AlarmSchedule", AlarmSchedule.class); - JSON.registerDiscriminator(AlarmSchedule.class, "type", mappings); -} -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmScheduleType.java b/pe/src/main/java/org/thingsboard/client/model/AlarmScheduleType.java deleted file mode 100644 index 06e2e5af..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmScheduleType.java +++ /dev/null @@ -1,82 +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.JsonPropertyOrder; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets AlarmScheduleType - */ -public enum AlarmScheduleType { - - ANY_TIME("ANY_TIME"), - - SPECIFIC_TIME("SPECIFIC_TIME"), - - CUSTOM("CUSTOM"); - - private String value; - - AlarmScheduleType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static AlarmScheduleType fromValue(String value) { - for (AlarmScheduleType b : AlarmScheduleType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - if (prefix == null) { - prefix = ""; - } - - return String.format(java.util.Locale.ROOT, "%s=%s", prefix, this.toString()); - } - -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/AmazonBedrockChatModelConfig.java b/pe/src/main/java/org/thingsboard/client/model/AmazonBedrockChatModelConfig.java index a12e348e..c611d87b 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AmazonBedrockChatModelConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/AmazonBedrockChatModelConfig.java @@ -45,14 +45,14 @@ * AmazonBedrockChatModelConfig */ @JsonPropertyOrder({ - AmazonBedrockChatModelConfig.JSON_PROPERTY_MODEL_TYPE, AmazonBedrockChatModelConfig.JSON_PROPERTY_PROVIDER_CONFIG, AmazonBedrockChatModelConfig.JSON_PROPERTY_MODEL_ID, AmazonBedrockChatModelConfig.JSON_PROPERTY_TEMPERATURE, AmazonBedrockChatModelConfig.JSON_PROPERTY_TOP_P, AmazonBedrockChatModelConfig.JSON_PROPERTY_MAX_OUTPUT_TOKENS, AmazonBedrockChatModelConfig.JSON_PROPERTY_TIMEOUT_SECONDS, - AmazonBedrockChatModelConfig.JSON_PROPERTY_MAX_RETRIES + AmazonBedrockChatModelConfig.JSON_PROPERTY_MAX_RETRIES, + AmazonBedrockChatModelConfig.JSON_PROPERTY_MODEL_TYPE }) @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 = "provider", visible = true) public class AmazonBedrockChatModelConfig extends AiModelConfig { - public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; - @Nullable - private AiModelType modelType; - public static final String JSON_PROPERTY_PROVIDER_CONFIG = "providerConfig"; @Nonnull private AmazonBedrockProviderConfig providerConfig; @@ -94,6 +90,10 @@ public class AmazonBedrockChatModelConfig extends AiModelConfig { @Nullable private Integer maxRetries; + public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; + @Nullable + private AiModelType modelType; + public AmazonBedrockChatModelConfig() { } @@ -105,20 +105,6 @@ public AmazonBedrockChatModelConfig( this.modelType = modelType; } - /** - * Get modelType - * @return modelType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AiModelType getModelType() { - return modelType; - } - - - - public AmazonBedrockChatModelConfig providerConfig(@Nonnull AmazonBedrockProviderConfig providerConfig) { this.providerConfig = providerConfig; return this; @@ -288,6 +274,20 @@ public void setMaxRetries(@Nullable Integer maxRetries) { } + /** + * Get modelType + * @return modelType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiModelType getModelType() { + return modelType; + } + + + + /** * Return true if this AmazonBedrockChatModelConfig object is equal to o. */ @@ -300,20 +300,20 @@ public boolean equals(Object o) { return false; } AmazonBedrockChatModelConfig amazonBedrockChatModelConfig = (AmazonBedrockChatModelConfig) o; - return Objects.equals(this.modelType, amazonBedrockChatModelConfig.modelType) && - Objects.equals(this.providerConfig, amazonBedrockChatModelConfig.providerConfig) && + return Objects.equals(this.providerConfig, amazonBedrockChatModelConfig.providerConfig) && Objects.equals(this.modelId, amazonBedrockChatModelConfig.modelId) && Objects.equals(this.temperature, amazonBedrockChatModelConfig.temperature) && Objects.equals(this.topP, amazonBedrockChatModelConfig.topP) && Objects.equals(this.maxOutputTokens, amazonBedrockChatModelConfig.maxOutputTokens) && Objects.equals(this.timeoutSeconds, amazonBedrockChatModelConfig.timeoutSeconds) && Objects.equals(this.maxRetries, amazonBedrockChatModelConfig.maxRetries) && + Objects.equals(this.modelType, amazonBedrockChatModelConfig.modelType) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(modelType, providerConfig, modelId, temperature, topP, maxOutputTokens, timeoutSeconds, maxRetries, super.hashCode()); + return Objects.hash(providerConfig, modelId, temperature, topP, maxOutputTokens, timeoutSeconds, maxRetries, modelType, super.hashCode()); } @Override @@ -321,7 +321,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AmazonBedrockChatModelConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append(" providerConfig: ").append(toIndentedString(providerConfig)).append("\n"); sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); @@ -329,6 +328,7 @@ public String toString() { sb.append(" maxOutputTokens: ").append(toIndentedString(maxOutputTokens)).append("\n"); sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -381,11 +381,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); } - // add `modelType` to the URL query string - if (getModelType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); - } - // add `providerConfig` to the URL query string if (getProviderConfig() != null) { joiner.add(getProviderConfig().toUrlQueryString(prefix + "providerConfig" + suffix)); @@ -421,6 +416,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smaxRetries%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxRetries())))); } + // add `modelType` to the URL query string + if (getModelType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/AnthropicChatModelConfig.java b/pe/src/main/java/org/thingsboard/client/model/AnthropicChatModelConfig.java index 5464ebcc..f648928b 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AnthropicChatModelConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/AnthropicChatModelConfig.java @@ -45,7 +45,6 @@ * AnthropicChatModelConfig */ @JsonPropertyOrder({ - AnthropicChatModelConfig.JSON_PROPERTY_MODEL_TYPE, AnthropicChatModelConfig.JSON_PROPERTY_PROVIDER_CONFIG, AnthropicChatModelConfig.JSON_PROPERTY_MODEL_ID, AnthropicChatModelConfig.JSON_PROPERTY_TEMPERATURE, @@ -53,7 +52,8 @@ AnthropicChatModelConfig.JSON_PROPERTY_TOP_K, AnthropicChatModelConfig.JSON_PROPERTY_MAX_OUTPUT_TOKENS, AnthropicChatModelConfig.JSON_PROPERTY_TIMEOUT_SECONDS, - AnthropicChatModelConfig.JSON_PROPERTY_MAX_RETRIES + AnthropicChatModelConfig.JSON_PROPERTY_MAX_RETRIES, + AnthropicChatModelConfig.JSON_PROPERTY_MODEL_TYPE }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -63,10 +63,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "provider", visible = true) public class AnthropicChatModelConfig extends AiModelConfig { - public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; - @Nullable - private AiModelType modelType; - public static final String JSON_PROPERTY_PROVIDER_CONFIG = "providerConfig"; @Nonnull private AnthropicProviderConfig providerConfig; @@ -99,6 +95,10 @@ public class AnthropicChatModelConfig extends AiModelConfig { @Nullable private Integer maxRetries; + public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; + @Nullable + private AiModelType modelType; + public AnthropicChatModelConfig() { } @@ -110,20 +110,6 @@ public AnthropicChatModelConfig( this.modelType = modelType; } - /** - * Get modelType - * @return modelType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AiModelType getModelType() { - return modelType; - } - - - - public AnthropicChatModelConfig providerConfig(@Nonnull AnthropicProviderConfig providerConfig) { this.providerConfig = providerConfig; return this; @@ -317,6 +303,20 @@ public void setMaxRetries(@Nullable Integer maxRetries) { } + /** + * Get modelType + * @return modelType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiModelType getModelType() { + return modelType; + } + + + + /** * Return true if this AnthropicChatModelConfig object is equal to o. */ @@ -329,8 +329,7 @@ public boolean equals(Object o) { return false; } AnthropicChatModelConfig anthropicChatModelConfig = (AnthropicChatModelConfig) o; - return Objects.equals(this.modelType, anthropicChatModelConfig.modelType) && - Objects.equals(this.providerConfig, anthropicChatModelConfig.providerConfig) && + return Objects.equals(this.providerConfig, anthropicChatModelConfig.providerConfig) && Objects.equals(this.modelId, anthropicChatModelConfig.modelId) && Objects.equals(this.temperature, anthropicChatModelConfig.temperature) && Objects.equals(this.topP, anthropicChatModelConfig.topP) && @@ -338,12 +337,13 @@ public boolean equals(Object o) { Objects.equals(this.maxOutputTokens, anthropicChatModelConfig.maxOutputTokens) && Objects.equals(this.timeoutSeconds, anthropicChatModelConfig.timeoutSeconds) && Objects.equals(this.maxRetries, anthropicChatModelConfig.maxRetries) && + Objects.equals(this.modelType, anthropicChatModelConfig.modelType) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(modelType, providerConfig, modelId, temperature, topP, topK, maxOutputTokens, timeoutSeconds, maxRetries, super.hashCode()); + return Objects.hash(providerConfig, modelId, temperature, topP, topK, maxOutputTokens, timeoutSeconds, maxRetries, modelType, super.hashCode()); } @Override @@ -351,7 +351,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AnthropicChatModelConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append(" providerConfig: ").append(toIndentedString(providerConfig)).append("\n"); sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); @@ -360,6 +359,7 @@ public String toString() { sb.append(" maxOutputTokens: ").append(toIndentedString(maxOutputTokens)).append("\n"); sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -412,11 +412,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); } - // add `modelType` to the URL query string - if (getModelType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); - } - // add `providerConfig` to the URL query string if (getProviderConfig() != null) { joiner.add(getProviderConfig().toUrlQueryString(prefix + "providerConfig" + suffix)); @@ -457,6 +452,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smaxRetries%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxRetries())))); } + // add `modelType` to the URL query string + if (getModelType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/AnyTimeSchedule.java b/pe/src/main/java/org/thingsboard/client/model/AnyTimeSchedule.java deleted file mode 100644 index 21050051..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/AnyTimeSchedule.java +++ /dev/null @@ -1,155 +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 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.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 org.thingsboard.client.model.AlarmSchedule; -import org.thingsboard.client.model.AlarmScheduleType; -import org.thingsboard.client.model.DynamicValueString; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.JSON; -import org.thingsboard.client.ApiClient; -/** - * AnyTimeSchedule - */ -@JsonPropertyOrder({ -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) - -public class AnyTimeSchedule extends AlarmSchedule { - public AnyTimeSchedule() { - } - - @Override - public AnyTimeSchedule dynamicValue(@Nullable DynamicValueString dynamicValue) { - this.setDynamicValue(dynamicValue); - return this; - } - - /** - * Return true if this AnyTimeSchedule 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 AnyTimeSchedule {\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 `dynamicValue` to the URL query string - if (getDynamicValue() != null) { - joiner.add(getDynamicValue().toUrlQueryString(prefix + "dynamicValue" + suffix)); - } - - // 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())))); - } - - return joiner.toString(); - } -static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap>(); - mappings.put("AnyTimeSchedule", AnyTimeSchedule.class); - JSON.registerDiscriminator(AnyTimeSchedule.class, "type", mappings); -} -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/AssetProfileInfo.java b/pe/src/main/java/org/thingsboard/client/model/AssetProfileInfo.java index 2bfc800c..c87418a5 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AssetProfileInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/AssetProfileInfo.java @@ -29,8 +29,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; +import org.thingsboard.client.model.AssetProfileId; import org.thingsboard.client.model.DashboardId; -import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.TenantId; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -50,7 +50,7 @@ public class AssetProfileInfo { public static final String JSON_PROPERTY_ID = "id"; @Nullable - private EntityId id; + private AssetProfileId id; public static final String JSON_PROPERTY_NAME = "name"; @Nullable @@ -71,26 +71,26 @@ public class AssetProfileInfo { public AssetProfileInfo() { } - public AssetProfileInfo id(@Nullable EntityId id) { + public AssetProfileInfo id(@Nullable AssetProfileId id) { this.id = id; return this; } /** - * JSON object with the entity Id. + * JSON object with the Asset Profile Id. * @return id */ @Nullable @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityId getId() { + public AssetProfileId getId() { return id; } @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@Nullable EntityId id) { + public void setId(@Nullable AssetProfileId id) { this.id = id; } diff --git a/pe/src/main/java/org/thingsboard/client/model/AzureOpenAiChatModelConfig.java b/pe/src/main/java/org/thingsboard/client/model/AzureOpenAiChatModelConfig.java index 385ca9e3..85329289 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AzureOpenAiChatModelConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/AzureOpenAiChatModelConfig.java @@ -45,7 +45,6 @@ * AzureOpenAiChatModelConfig */ @JsonPropertyOrder({ - AzureOpenAiChatModelConfig.JSON_PROPERTY_MODEL_TYPE, AzureOpenAiChatModelConfig.JSON_PROPERTY_PROVIDER_CONFIG, AzureOpenAiChatModelConfig.JSON_PROPERTY_MODEL_ID, AzureOpenAiChatModelConfig.JSON_PROPERTY_TEMPERATURE, @@ -54,7 +53,8 @@ AzureOpenAiChatModelConfig.JSON_PROPERTY_PRESENCE_PENALTY, AzureOpenAiChatModelConfig.JSON_PROPERTY_MAX_OUTPUT_TOKENS, AzureOpenAiChatModelConfig.JSON_PROPERTY_TIMEOUT_SECONDS, - AzureOpenAiChatModelConfig.JSON_PROPERTY_MAX_RETRIES + AzureOpenAiChatModelConfig.JSON_PROPERTY_MAX_RETRIES, + AzureOpenAiChatModelConfig.JSON_PROPERTY_MODEL_TYPE }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,10 +64,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "provider", visible = true) public class AzureOpenAiChatModelConfig extends AiModelConfig { - public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; - @Nullable - private AiModelType modelType; - public static final String JSON_PROPERTY_PROVIDER_CONFIG = "providerConfig"; @Nonnull private AzureOpenAiProviderConfig providerConfig; @@ -104,6 +100,10 @@ public class AzureOpenAiChatModelConfig extends AiModelConfig { @Nullable private Integer maxRetries; + public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; + @Nullable + private AiModelType modelType; + public AzureOpenAiChatModelConfig() { } @@ -115,20 +115,6 @@ public AzureOpenAiChatModelConfig( this.modelType = modelType; } - /** - * Get modelType - * @return modelType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AiModelType getModelType() { - return modelType; - } - - - - public AzureOpenAiChatModelConfig providerConfig(@Nonnull AzureOpenAiProviderConfig providerConfig) { this.providerConfig = providerConfig; return this; @@ -346,6 +332,20 @@ public void setMaxRetries(@Nullable Integer maxRetries) { } + /** + * Get modelType + * @return modelType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiModelType getModelType() { + return modelType; + } + + + + /** * Return true if this AzureOpenAiChatModelConfig object is equal to o. */ @@ -358,8 +358,7 @@ public boolean equals(Object o) { return false; } AzureOpenAiChatModelConfig azureOpenAiChatModelConfig = (AzureOpenAiChatModelConfig) o; - return Objects.equals(this.modelType, azureOpenAiChatModelConfig.modelType) && - Objects.equals(this.providerConfig, azureOpenAiChatModelConfig.providerConfig) && + return Objects.equals(this.providerConfig, azureOpenAiChatModelConfig.providerConfig) && Objects.equals(this.modelId, azureOpenAiChatModelConfig.modelId) && Objects.equals(this.temperature, azureOpenAiChatModelConfig.temperature) && Objects.equals(this.topP, azureOpenAiChatModelConfig.topP) && @@ -368,12 +367,13 @@ public boolean equals(Object o) { Objects.equals(this.maxOutputTokens, azureOpenAiChatModelConfig.maxOutputTokens) && Objects.equals(this.timeoutSeconds, azureOpenAiChatModelConfig.timeoutSeconds) && Objects.equals(this.maxRetries, azureOpenAiChatModelConfig.maxRetries) && + Objects.equals(this.modelType, azureOpenAiChatModelConfig.modelType) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(modelType, providerConfig, modelId, temperature, topP, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, super.hashCode()); + return Objects.hash(providerConfig, modelId, temperature, topP, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, modelType, super.hashCode()); } @Override @@ -381,7 +381,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AzureOpenAiChatModelConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append(" providerConfig: ").append(toIndentedString(providerConfig)).append("\n"); sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); @@ -391,6 +390,7 @@ public String toString() { sb.append(" maxOutputTokens: ").append(toIndentedString(maxOutputTokens)).append("\n"); sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -443,11 +443,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); } - // add `modelType` to the URL query string - if (getModelType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); - } - // add `providerConfig` to the URL query string if (getProviderConfig() != null) { joiner.add(getProviderConfig().toUrlQueryString(prefix + "providerConfig" + suffix)); @@ -493,6 +488,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smaxRetries%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxRetries())))); } + // add `modelType` to the URL query string + if (getModelType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/CustomMenuConfig.java b/pe/src/main/java/org/thingsboard/client/model/CustomMenuConfig.java index 55a4e111..c3c3c90b 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CustomMenuConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/CustomMenuConfig.java @@ -37,7 +37,7 @@ import org.thingsboard.client.ApiClient; /** - * A JSON value representing the custom menu configuration + * CustomMenuConfig */ @JsonPropertyOrder({ CustomMenuConfig.JSON_PROPERTY_ITEMS diff --git a/pe/src/main/java/org/thingsboard/client/model/CustomTimeSchedule.java b/pe/src/main/java/org/thingsboard/client/model/CustomTimeSchedule.java deleted file mode 100644 index a6d1c480..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/CustomTimeSchedule.java +++ /dev/null @@ -1,244 +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 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.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; -import java.util.Arrays; -import java.util.List; -import org.thingsboard.client.model.AlarmSchedule; -import org.thingsboard.client.model.AlarmScheduleType; -import org.thingsboard.client.model.CustomTimeScheduleItem; -import org.thingsboard.client.model.DynamicValueString; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.JSON; -import org.thingsboard.client.ApiClient; -/** - * CustomTimeSchedule - */ -@JsonPropertyOrder({ - CustomTimeSchedule.JSON_PROPERTY_TIMEZONE, - CustomTimeSchedule.JSON_PROPERTY_ITEMS -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) - -public class CustomTimeSchedule extends AlarmSchedule { - public static final String JSON_PROPERTY_TIMEZONE = "timezone"; - @Nullable - private String timezone; - - public static final String JSON_PROPERTY_ITEMS = "items"; - @Nullable - private List items = new ArrayList<>(); - - public CustomTimeSchedule() { - } - - public CustomTimeSchedule timezone(@Nullable String timezone) { - this.timezone = timezone; - return this; - } - - /** - * Get timezone - * @return timezone - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_TIMEZONE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - - - @JsonProperty(value = JSON_PROPERTY_TIMEZONE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTimezone(@Nullable String timezone) { - this.timezone = timezone; - } - - - public CustomTimeSchedule items(@Nullable List items) { - this.items = items; - return this; - } - - public CustomTimeSchedule addItemsItem(CustomTimeScheduleItem itemsItem) { - if (this.items == null) { - this.items = new ArrayList<>(); - } - this.items.add(itemsItem); - return this; - } - - /** - * Get items - * @return items - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_ITEMS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getItems() { - return items; - } - - - @JsonProperty(value = JSON_PROPERTY_ITEMS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setItems(@Nullable List items) { - this.items = items; - } - - - @Override - public CustomTimeSchedule dynamicValue(@Nullable DynamicValueString dynamicValue) { - this.setDynamicValue(dynamicValue); - return this; - } - - /** - * Return true if this CustomTimeSchedule object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomTimeSchedule customTimeSchedule = (CustomTimeSchedule) o; - return Objects.equals(this.timezone, customTimeSchedule.timezone) && - Objects.equals(this.items, customTimeSchedule.items) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(timezone, items, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomTimeSchedule {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); - sb.append(" items: ").append(toIndentedString(items)).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 `dynamicValue` to the URL query string - if (getDynamicValue() != null) { - joiner.add(getDynamicValue().toUrlQueryString(prefix + "dynamicValue" + suffix)); - } - - // 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 `timezone` to the URL query string - if (getTimezone() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimezone%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimezone())))); - } - - // add `items` to the URL query string - if (getItems() != null) { - for (int i = 0; i < getItems().size(); i++) { - if (getItems().get(i) != null) { - joiner.add(getItems().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sitems%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - - return joiner.toString(); - } -static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap>(); - mappings.put("CustomTimeSchedule", CustomTimeSchedule.class); - JSON.registerDiscriminator(CustomTimeSchedule.class, "type", mappings); -} -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/CustomTimeScheduleItem.java b/pe/src/main/java/org/thingsboard/client/model/CustomTimeScheduleItem.java deleted file mode 100644 index 6264ab9b..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/CustomTimeScheduleItem.java +++ /dev/null @@ -1,263 +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 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; -/** - * CustomTimeScheduleItem - */ -@JsonPropertyOrder({ - CustomTimeScheduleItem.JSON_PROPERTY_DAY_OF_WEEK, - CustomTimeScheduleItem.JSON_PROPERTY_ENABLED, - CustomTimeScheduleItem.JSON_PROPERTY_ENDS_ON, - CustomTimeScheduleItem.JSON_PROPERTY_STARTS_ON -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class CustomTimeScheduleItem { - public static final String JSON_PROPERTY_DAY_OF_WEEK = "dayOfWeek"; - @Nullable - private Integer dayOfWeek; - - public static final String JSON_PROPERTY_ENABLED = "enabled"; - @Nullable - private Boolean enabled; - - public static final String JSON_PROPERTY_ENDS_ON = "endsOn"; - @Nullable - private Long endsOn; - - public static final String JSON_PROPERTY_STARTS_ON = "startsOn"; - @Nullable - private Long startsOn; - - public CustomTimeScheduleItem() { - } - - public CustomTimeScheduleItem dayOfWeek(@Nullable Integer dayOfWeek) { - this.dayOfWeek = dayOfWeek; - return this; - } - - /** - * Get dayOfWeek - * @return dayOfWeek - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DAY_OF_WEEK, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getDayOfWeek() { - return dayOfWeek; - } - - - @JsonProperty(value = JSON_PROPERTY_DAY_OF_WEEK, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDayOfWeek(@Nullable Integer dayOfWeek) { - this.dayOfWeek = dayOfWeek; - } - - - public CustomTimeScheduleItem enabled(@Nullable Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get enabled - * @return enabled - */ - @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(@Nullable Boolean enabled) { - this.enabled = enabled; - } - - - public CustomTimeScheduleItem endsOn(@Nullable Long endsOn) { - this.endsOn = endsOn; - return this; - } - - /** - * Get endsOn - * @return endsOn - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_ENDS_ON, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEndsOn() { - return endsOn; - } - - - @JsonProperty(value = JSON_PROPERTY_ENDS_ON, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEndsOn(@Nullable Long endsOn) { - this.endsOn = endsOn; - } - - - public CustomTimeScheduleItem startsOn(@Nullable Long startsOn) { - this.startsOn = startsOn; - return this; - } - - /** - * Get startsOn - * @return startsOn - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_STARTS_ON, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStartsOn() { - return startsOn; - } - - - @JsonProperty(value = JSON_PROPERTY_STARTS_ON, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStartsOn(@Nullable Long startsOn) { - this.startsOn = startsOn; - } - - - /** - * Return true if this CustomTimeScheduleItem object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CustomTimeScheduleItem customTimeScheduleItem = (CustomTimeScheduleItem) o; - return Objects.equals(this.dayOfWeek, customTimeScheduleItem.dayOfWeek) && - Objects.equals(this.enabled, customTimeScheduleItem.enabled) && - Objects.equals(this.endsOn, customTimeScheduleItem.endsOn) && - Objects.equals(this.startsOn, customTimeScheduleItem.startsOn); - } - - @Override - public int hashCode() { - return Objects.hash(dayOfWeek, enabled, endsOn, startsOn); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CustomTimeScheduleItem {\n"); - sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" endsOn: ").append(toIndentedString(endsOn)).append("\n"); - sb.append(" startsOn: ").append(toIndentedString(startsOn)).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 `dayOfWeek` to the URL query string - if (getDayOfWeek() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdayOfWeek%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDayOfWeek())))); - } - - // 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 `endsOn` to the URL query string - if (getEndsOn() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sendsOn%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEndsOn())))); - } - - // add `startsOn` to the URL query string - if (getStartsOn() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sstartsOn%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartsOn())))); - } - - return joiner.toString(); - } -} - 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 27d78552..603b5b44 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Customer.java +++ b/pe/src/main/java/org/thingsboard/client/model/Customer.java @@ -105,7 +105,7 @@ public class Customer { private String phone; public static final String JSON_PROPERTY_EMAIL = "email"; - @Nonnull + @Nullable private String email; public static final String JSON_PROPERTY_TITLE = "title"; @@ -387,7 +387,7 @@ public void setPhone(@Nullable String phone) { } - public Customer email(@Nonnull String email) { + public Customer email(@Nullable String email) { this.email = email; return this; } @@ -396,17 +396,17 @@ public Customer email(@Nonnull String email) { * Email * @return email */ - @Nonnull - @JsonProperty(value = JSON_PROPERTY_EMAIL, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @Nullable + @JsonProperty(value = JSON_PROPERTY_EMAIL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getEmail() { return email; } - @JsonProperty(value = JSON_PROPERTY_EMAIL, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmail(@Nonnull String email) { + @JsonProperty(value = JSON_PROPERTY_EMAIL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(@Nullable String email) { this.email = email; } 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 88bc4fcd..bf7afafb 100644 --- a/pe/src/main/java/org/thingsboard/client/model/CustomerInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/CustomerInfo.java @@ -110,7 +110,7 @@ public class CustomerInfo { private String phone; public static final String JSON_PROPERTY_EMAIL = "email"; - @Nonnull + @Nullable private String email; public static final String JSON_PROPERTY_TITLE = "title"; @@ -402,7 +402,7 @@ public void setPhone(@Nullable String phone) { } - public CustomerInfo email(@Nonnull String email) { + public CustomerInfo email(@Nullable String email) { this.email = email; return this; } @@ -411,17 +411,17 @@ public CustomerInfo email(@Nonnull String email) { * Email * @return email */ - @Nonnull - @JsonProperty(value = JSON_PROPERTY_EMAIL, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @Nullable + @JsonProperty(value = JSON_PROPERTY_EMAIL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getEmail() { return email; } - @JsonProperty(value = JSON_PROPERTY_EMAIL, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmail(@Nonnull String email) { + @JsonProperty(value = JSON_PROPERTY_EMAIL, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(@Nullable String email) { this.email = email; } 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 13c2d072..3e7c2fc8 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Device.java +++ b/pe/src/main/java/org/thingsboard/client/model/Device.java @@ -16,7 +16,6 @@ package org.thingsboard.client.model; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; @@ -95,7 +94,7 @@ public class Device { private String label; public static final String JSON_PROPERTY_DEVICE_PROFILE_ID = "deviceProfileId"; - @Nonnull + @Nullable private DeviceProfileId deviceProfileId; public static final String JSON_PROPERTY_DEVICE_DATA = "deviceData"; @@ -297,26 +296,26 @@ public void setLabel(@Nullable String label) { } - public Device deviceProfileId(@Nonnull DeviceProfileId deviceProfileId) { + public Device deviceProfileId(@Nullable DeviceProfileId deviceProfileId) { this.deviceProfileId = deviceProfileId; return this; } /** - * JSON object with Device Profile Id. + * JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. * @return deviceProfileId */ - @Nonnull - @JsonProperty(value = JSON_PROPERTY_DEVICE_PROFILE_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @Nullable + @JsonProperty(value = JSON_PROPERTY_DEVICE_PROFILE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public DeviceProfileId getDeviceProfileId() { return deviceProfileId; } - @JsonProperty(value = JSON_PROPERTY_DEVICE_PROFILE_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDeviceProfileId(@Nonnull DeviceProfileId deviceProfileId) { + @JsonProperty(value = JSON_PROPERTY_DEVICE_PROFILE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceProfileId(@Nullable DeviceProfileId deviceProfileId) { this.deviceProfileId = deviceProfileId; } 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 5a566e86..7e146e01 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceInfo.java @@ -16,7 +16,6 @@ package org.thingsboard.client.model; import javax.annotation.Generated; -import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; @@ -101,7 +100,7 @@ public class DeviceInfo { private String label; public static final String JSON_PROPERTY_DEVICE_PROFILE_ID = "deviceProfileId"; - @Nonnull + @Nullable private DeviceProfileId deviceProfileId; public static final String JSON_PROPERTY_DEVICE_DATA = "deviceData"; @@ -319,26 +318,26 @@ public void setLabel(@Nullable String label) { } - public DeviceInfo deviceProfileId(@Nonnull DeviceProfileId deviceProfileId) { + public DeviceInfo deviceProfileId(@Nullable DeviceProfileId deviceProfileId) { this.deviceProfileId = deviceProfileId; return this; } /** - * JSON object with Device Profile Id. + * JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. * @return deviceProfileId */ - @Nonnull - @JsonProperty(value = JSON_PROPERTY_DEVICE_PROFILE_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @Nullable + @JsonProperty(value = JSON_PROPERTY_DEVICE_PROFILE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public DeviceProfileId getDeviceProfileId() { return deviceProfileId; } - @JsonProperty(value = JSON_PROPERTY_DEVICE_PROFILE_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDeviceProfileId(@Nonnull DeviceProfileId deviceProfileId) { + @JsonProperty(value = JSON_PROPERTY_DEVICE_PROFILE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeviceProfileId(@Nullable DeviceProfileId deviceProfileId) { this.deviceProfileId = deviceProfileId; } diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceProfileAlarm.java b/pe/src/main/java/org/thingsboard/client/model/DeviceProfileAlarm.java deleted file mode 100644 index 478ab9c6..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceProfileAlarm.java +++ /dev/null @@ -1,473 +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 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.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.thingsboard.client.model.AlarmRule; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * DeviceProfileAlarm - */ -@JsonPropertyOrder({ - DeviceProfileAlarm.JSON_PROPERTY_ID, - DeviceProfileAlarm.JSON_PROPERTY_ALARM_TYPE, - DeviceProfileAlarm.JSON_PROPERTY_CREATE_RULES, - DeviceProfileAlarm.JSON_PROPERTY_CLEAR_RULE, - DeviceProfileAlarm.JSON_PROPERTY_PROPAGATE, - DeviceProfileAlarm.JSON_PROPERTY_PROPAGATE_TO_OWNER, - DeviceProfileAlarm.JSON_PROPERTY_PROPAGATE_TO_OWNER_HIERARCHY, - DeviceProfileAlarm.JSON_PROPERTY_PROPAGATE_TO_TENANT, - DeviceProfileAlarm.JSON_PROPERTY_PROPAGATE_RELATION_TYPES -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DeviceProfileAlarm { - public static final String JSON_PROPERTY_ID = "id"; - @Nullable - private String id; - - public static final String JSON_PROPERTY_ALARM_TYPE = "alarmType"; - @Nullable - private String alarmType; - - public static final String JSON_PROPERTY_CREATE_RULES = "createRules"; - @Nullable - private Map createRules = new HashMap<>(); - - public static final String JSON_PROPERTY_CLEAR_RULE = "clearRule"; - @Nullable - private AlarmRule clearRule; - - public static final String JSON_PROPERTY_PROPAGATE = "propagate"; - @Nullable - private Boolean propagate; - - public static final String JSON_PROPERTY_PROPAGATE_TO_OWNER = "propagateToOwner"; - @Nullable - private Boolean propagateToOwner; - - public static final String JSON_PROPERTY_PROPAGATE_TO_OWNER_HIERARCHY = "propagateToOwnerHierarchy"; - @Nullable - private Boolean propagateToOwnerHierarchy; - - public static final String JSON_PROPERTY_PROPAGATE_TO_TENANT = "propagateToTenant"; - @Nullable - private Boolean propagateToTenant; - - public static final String JSON_PROPERTY_PROPAGATE_RELATION_TYPES = "propagateRelationTypes"; - @Nullable - private List propagateRelationTypes = new ArrayList<>(); - - public DeviceProfileAlarm() { - } - - public DeviceProfileAlarm id(@Nullable String id) { - this.id = id; - return this; - } - - /** - * String value representing the alarm rule id - * @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 DeviceProfileAlarm alarmType(@Nullable String alarmType) { - this.alarmType = alarmType; - return this; - } - - /** - * String value representing type of the alarm - * @return alarmType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_ALARM_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAlarmType() { - return alarmType; - } - - - @JsonProperty(value = JSON_PROPERTY_ALARM_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAlarmType(@Nullable String alarmType) { - this.alarmType = alarmType; - } - - - public DeviceProfileAlarm createRules(@Nullable Map createRules) { - this.createRules = createRules; - return this; - } - - public DeviceProfileAlarm putCreateRulesItem(String key, AlarmRule createRulesItem) { - if (this.createRules == null) { - this.createRules = new HashMap<>(); - } - this.createRules.put(key, createRulesItem); - return this; - } - - /** - * Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details - * @return createRules - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_CREATE_RULES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getCreateRules() { - return createRules; - } - - - @JsonProperty(value = JSON_PROPERTY_CREATE_RULES, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreateRules(@Nullable Map createRules) { - this.createRules = createRules; - } - - - public DeviceProfileAlarm clearRule(@Nullable AlarmRule clearRule) { - this.clearRule = clearRule; - return this; - } - - /** - * JSON object representing clear alarm rule - * @return clearRule - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_CLEAR_RULE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AlarmRule getClearRule() { - return clearRule; - } - - - @JsonProperty(value = JSON_PROPERTY_CLEAR_RULE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClearRule(@Nullable AlarmRule clearRule) { - this.clearRule = clearRule; - } - - - public DeviceProfileAlarm propagate(@Nullable Boolean propagate) { - this.propagate = propagate; - return this; - } - - /** - * Propagation flag to specify if alarm should be propagated to parent entities of alarm originator - * @return propagate - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PROPAGATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPropagate() { - return propagate; - } - - - @JsonProperty(value = JSON_PROPERTY_PROPAGATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropagate(@Nullable Boolean propagate) { - this.propagate = propagate; - } - - - public DeviceProfileAlarm propagateToOwner(@Nullable Boolean propagateToOwner) { - this.propagateToOwner = propagateToOwner; - return this; - } - - /** - * Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator - * @return propagateToOwner - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PROPAGATE_TO_OWNER, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPropagateToOwner() { - return propagateToOwner; - } - - - @JsonProperty(value = JSON_PROPERTY_PROPAGATE_TO_OWNER, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropagateToOwner(@Nullable Boolean propagateToOwner) { - this.propagateToOwner = propagateToOwner; - } - - - public DeviceProfileAlarm propagateToOwnerHierarchy(@Nullable Boolean propagateToOwnerHierarchy) { - this.propagateToOwnerHierarchy = propagateToOwnerHierarchy; - return this; - } - - /** - * Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy - * @return propagateToOwnerHierarchy - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PROPAGATE_TO_OWNER_HIERARCHY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPropagateToOwnerHierarchy() { - return propagateToOwnerHierarchy; - } - - - @JsonProperty(value = JSON_PROPERTY_PROPAGATE_TO_OWNER_HIERARCHY, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropagateToOwnerHierarchy(@Nullable Boolean propagateToOwnerHierarchy) { - this.propagateToOwnerHierarchy = propagateToOwnerHierarchy; - } - - - public DeviceProfileAlarm propagateToTenant(@Nullable Boolean propagateToTenant) { - this.propagateToTenant = propagateToTenant; - return this; - } - - /** - * Propagation flag to specify if alarm should be propagated to the tenant entity - * @return propagateToTenant - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PROPAGATE_TO_TENANT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPropagateToTenant() { - return propagateToTenant; - } - - - @JsonProperty(value = JSON_PROPERTY_PROPAGATE_TO_TENANT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropagateToTenant(@Nullable Boolean propagateToTenant) { - this.propagateToTenant = propagateToTenant; - } - - - public DeviceProfileAlarm propagateRelationTypes(@Nullable List propagateRelationTypes) { - this.propagateRelationTypes = propagateRelationTypes; - return this; - } - - public DeviceProfileAlarm addPropagateRelationTypesItem(String propagateRelationTypesItem) { - if (this.propagateRelationTypes == null) { - this.propagateRelationTypes = new ArrayList<>(); - } - this.propagateRelationTypes.add(propagateRelationTypesItem); - return this; - } - - /** - * JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored. - * @return propagateRelationTypes - */ - @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(@Nullable List propagateRelationTypes) { - this.propagateRelationTypes = propagateRelationTypes; - } - - - /** - * Return true if this DeviceProfileAlarm object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceProfileAlarm deviceProfileAlarm = (DeviceProfileAlarm) o; - return Objects.equals(this.id, deviceProfileAlarm.id) && - Objects.equals(this.alarmType, deviceProfileAlarm.alarmType) && - Objects.equals(this.createRules, deviceProfileAlarm.createRules) && - Objects.equals(this.clearRule, deviceProfileAlarm.clearRule) && - Objects.equals(this.propagate, deviceProfileAlarm.propagate) && - Objects.equals(this.propagateToOwner, deviceProfileAlarm.propagateToOwner) && - Objects.equals(this.propagateToOwnerHierarchy, deviceProfileAlarm.propagateToOwnerHierarchy) && - Objects.equals(this.propagateToTenant, deviceProfileAlarm.propagateToTenant) && - Objects.equals(this.propagateRelationTypes, deviceProfileAlarm.propagateRelationTypes); - } - - @Override - public int hashCode() { - return Objects.hash(id, alarmType, createRules, clearRule, propagate, propagateToOwner, propagateToOwnerHierarchy, propagateToTenant, propagateRelationTypes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceProfileAlarm {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" alarmType: ").append(toIndentedString(alarmType)).append("\n"); - sb.append(" createRules: ").append(toIndentedString(createRules)).append("\n"); - sb.append(" clearRule: ").append(toIndentedString(clearRule)).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"); - sb.append(" propagateToTenant: ").append(toIndentedString(propagateToTenant)).append("\n"); - sb.append(" propagateRelationTypes: ").append(toIndentedString(propagateRelationTypes)).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 `alarmType` to the URL query string - if (getAlarmType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%salarmType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getAlarmType())))); - } - - // add `createRules` to the URL query string - if (getCreateRules() != null) { - for (String _key : getCreateRules().keySet()) { - if (getCreateRules().get(_key) != null) { - joiner.add(getCreateRules().get(_key).toUrlQueryString(String.format(java.util.Locale.ROOT, "%screateRules%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix)))); - } - } - } - - // 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 `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())))); - } - - // add `propagateToOwnerHierarchy` to the URL query string - if (getPropagateToOwnerHierarchy() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%spropagateToOwnerHierarchy%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPropagateToOwnerHierarchy())))); - } - - // add `propagateToTenant` to the URL query string - if (getPropagateToTenant() != null) { - 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(); - } -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceProfileData.java b/pe/src/main/java/org/thingsboard/client/model/DeviceProfileData.java index a91bd374..fef89f26 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceProfileData.java +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceProfileData.java @@ -28,10 +28,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; -import org.thingsboard.client.model.DeviceProfileAlarm; import org.thingsboard.client.model.DeviceProfileConfiguration; import org.thingsboard.client.model.DeviceProfileProvisionConfiguration; import org.thingsboard.client.model.DeviceProfileTransportConfiguration; @@ -45,8 +42,7 @@ @JsonPropertyOrder({ DeviceProfileData.JSON_PROPERTY_CONFIGURATION, DeviceProfileData.JSON_PROPERTY_TRANSPORT_CONFIGURATION, - DeviceProfileData.JSON_PROPERTY_PROVISION_CONFIGURATION, - DeviceProfileData.JSON_PROPERTY_ALARMS + DeviceProfileData.JSON_PROPERTY_PROVISION_CONFIGURATION }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class DeviceProfileData { @@ -62,10 +58,6 @@ public class DeviceProfileData { @Nullable private DeviceProfileProvisionConfiguration provisionConfiguration; - public static final String JSON_PROPERTY_ALARMS = "alarms"; - @Nullable - private List alarms = new ArrayList<>(); - public DeviceProfileData() { } @@ -141,38 +133,6 @@ public void setProvisionConfiguration(@Nullable DeviceProfileProvisionConfigurat } - public DeviceProfileData alarms(@Nullable List alarms) { - this.alarms = alarms; - return this; - } - - public DeviceProfileData addAlarmsItem(DeviceProfileAlarm alarmsItem) { - if (this.alarms == null) { - this.alarms = new ArrayList<>(); - } - this.alarms.add(alarmsItem); - return this; - } - - /** - * Get alarms - * @return alarms - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_ALARMS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAlarms() { - return alarms; - } - - - @JsonProperty(value = JSON_PROPERTY_ALARMS, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAlarms(@Nullable List alarms) { - this.alarms = alarms; - } - - /** * Return true if this DeviceProfileData object is equal to o. */ @@ -187,13 +147,12 @@ public boolean equals(Object o) { DeviceProfileData deviceProfileData = (DeviceProfileData) o; return Objects.equals(this._configuration, deviceProfileData._configuration) && Objects.equals(this.transportConfiguration, deviceProfileData.transportConfiguration) && - Objects.equals(this.provisionConfiguration, deviceProfileData.provisionConfiguration) && - Objects.equals(this.alarms, deviceProfileData.alarms); + Objects.equals(this.provisionConfiguration, deviceProfileData.provisionConfiguration); } @Override public int hashCode() { - return Objects.hash(_configuration, transportConfiguration, provisionConfiguration, alarms); + return Objects.hash(_configuration, transportConfiguration, provisionConfiguration); } @Override @@ -203,7 +162,6 @@ public String toString() { sb.append(" _configuration: ").append(toIndentedString(_configuration)).append("\n"); sb.append(" transportConfiguration: ").append(toIndentedString(transportConfiguration)).append("\n"); sb.append(" provisionConfiguration: ").append(toIndentedString(provisionConfiguration)).append("\n"); - sb.append(" alarms: ").append(toIndentedString(alarms)).append("\n"); sb.append("}"); return sb.toString(); } @@ -266,16 +224,6 @@ public String toUrlQueryString(String prefix) { joiner.add(getProvisionConfiguration().toUrlQueryString(prefix + "provisionConfiguration" + suffix)); } - // add `alarms` to the URL query string - if (getAlarms() != null) { - for (int i = 0; i < getAlarms().size(); i++) { - if (getAlarms().get(i) != null) { - joiner.add(getAlarms().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%salarms%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } - } - return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/DeviceProfileInfo.java b/pe/src/main/java/org/thingsboard/client/model/DeviceProfileInfo.java index 10c2e4bb..b01aa9ef 100644 --- a/pe/src/main/java/org/thingsboard/client/model/DeviceProfileInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/DeviceProfileInfo.java @@ -30,9 +30,9 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import org.thingsboard.client.model.DashboardId; +import org.thingsboard.client.model.DeviceProfileId; import org.thingsboard.client.model.DeviceProfileType; import org.thingsboard.client.model.DeviceTransportType; -import org.thingsboard.client.model.EntityId; import org.thingsboard.client.model.TenantId; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -54,7 +54,7 @@ public class DeviceProfileInfo { public static final String JSON_PROPERTY_ID = "id"; @Nullable - private EntityId id; + private DeviceProfileId id; public static final String JSON_PROPERTY_NAME = "name"; @Nullable @@ -83,26 +83,26 @@ public class DeviceProfileInfo { public DeviceProfileInfo() { } - public DeviceProfileInfo id(@Nullable EntityId id) { + public DeviceProfileInfo id(@Nullable DeviceProfileId id) { this.id = id; return this; } /** - * JSON object with the entity Id. + * JSON object with the Device Profile Id. * @return id */ @Nullable @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EntityId getId() { + public DeviceProfileId getId() { return id; } @JsonProperty(value = JSON_PROPERTY_ID, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(@Nullable EntityId id) { + public void setId(@Nullable DeviceProfileId id) { this.id = id; } diff --git a/pe/src/main/java/org/thingsboard/client/model/DurationAlarmConditionSpec.java b/pe/src/main/java/org/thingsboard/client/model/DurationAlarmConditionSpec.java deleted file mode 100644 index b576d914..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/DurationAlarmConditionSpec.java +++ /dev/null @@ -1,217 +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 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.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 org.thingsboard.client.model.AlarmConditionSpec; -import org.thingsboard.client.model.FilterPredicateValueLong; -import org.thingsboard.client.model.TimeUnit; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.JSON; -import org.thingsboard.client.ApiClient; -/** - * Duration Alarm Condition Specification - */ -@JsonPropertyOrder({ - DurationAlarmConditionSpec.JSON_PROPERTY_UNIT, - DurationAlarmConditionSpec.JSON_PROPERTY_PREDICATE -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) - -public class DurationAlarmConditionSpec extends AlarmConditionSpec { - public static final String JSON_PROPERTY_UNIT = "unit"; - @Nullable - private TimeUnit unit; - - public static final String JSON_PROPERTY_PREDICATE = "predicate"; - @Nullable - private FilterPredicateValueLong predicate; - - public DurationAlarmConditionSpec() { - } - - public DurationAlarmConditionSpec unit(@Nullable TimeUnit unit) { - this.unit = unit; - return this; - } - - /** - * Duration time unit - * @return unit - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_UNIT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TimeUnit getUnit() { - return unit; - } - - - @JsonProperty(value = JSON_PROPERTY_UNIT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUnit(@Nullable TimeUnit unit) { - this.unit = unit; - } - - - public DurationAlarmConditionSpec predicate(@Nullable FilterPredicateValueLong predicate) { - this.predicate = predicate; - return this; - } - - /** - * Duration predicate - * @return predicate - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PREDICATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FilterPredicateValueLong getPredicate() { - return predicate; - } - - - @JsonProperty(value = JSON_PROPERTY_PREDICATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPredicate(@Nullable FilterPredicateValueLong predicate) { - this.predicate = predicate; - } - - - /** - * Return true if this DurationAlarmConditionSpec object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DurationAlarmConditionSpec durationAlarmConditionSpec = (DurationAlarmConditionSpec) o; - return Objects.equals(this.unit, durationAlarmConditionSpec.unit) && - Objects.equals(this.predicate, durationAlarmConditionSpec.predicate) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(unit, predicate, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DurationAlarmConditionSpec {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" unit: ").append(toIndentedString(unit)).append("\n"); - sb.append(" predicate: ").append(toIndentedString(predicate)).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 `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 `unit` to the URL query string - if (getUnit() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sunit%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUnit())))); - } - - // add `predicate` to the URL query string - if (getPredicate() != null) { - joiner.add(getPredicate().toUrlQueryString(prefix + "predicate" + suffix)); - } - - return joiner.toString(); - } -static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap>(); - mappings.put("DurationAlarmConditionSpec", DurationAlarmConditionSpec.class); - JSON.registerDiscriminator(DurationAlarmConditionSpec.class, "type", mappings); -} -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/DynamicValueInteger.java b/pe/src/main/java/org/thingsboard/client/model/DynamicValueInteger.java deleted file mode 100644 index 7c6c3875..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/DynamicValueInteger.java +++ /dev/null @@ -1,264 +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 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 org.thingsboard.client.model.DynamicValueSourceType; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * DynamicValueInteger - */ -@JsonPropertyOrder({ - DynamicValueInteger.JSON_PROPERTY_RESOLVED_VALUE, - DynamicValueInteger.JSON_PROPERTY_SOURCE_TYPE, - DynamicValueInteger.JSON_PROPERTY_SOURCE_ATTRIBUTE, - DynamicValueInteger.JSON_PROPERTY_INHERIT -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DynamicValueInteger { - public static final String JSON_PROPERTY_RESOLVED_VALUE = "resolvedValue"; - @Nullable - private Integer resolvedValue; - - public static final String JSON_PROPERTY_SOURCE_TYPE = "sourceType"; - @Nullable - private DynamicValueSourceType sourceType; - - public static final String JSON_PROPERTY_SOURCE_ATTRIBUTE = "sourceAttribute"; - @Nullable - private String sourceAttribute; - - public static final String JSON_PROPERTY_INHERIT = "inherit"; - @Nullable - private Boolean inherit; - - public DynamicValueInteger() { - } - - public DynamicValueInteger resolvedValue(@Nullable Integer resolvedValue) { - this.resolvedValue = resolvedValue; - return this; - } - - /** - * Get resolvedValue - * @return resolvedValue - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_RESOLVED_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getResolvedValue() { - return resolvedValue; - } - - - @JsonProperty(value = JSON_PROPERTY_RESOLVED_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResolvedValue(@Nullable Integer resolvedValue) { - this.resolvedValue = resolvedValue; - } - - - public DynamicValueInteger sourceType(@Nullable DynamicValueSourceType sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Get sourceType - * @return sourceType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_SOURCE_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DynamicValueSourceType getSourceType() { - return sourceType; - } - - - @JsonProperty(value = JSON_PROPERTY_SOURCE_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSourceType(@Nullable DynamicValueSourceType sourceType) { - this.sourceType = sourceType; - } - - - public DynamicValueInteger sourceAttribute(@Nullable String sourceAttribute) { - this.sourceAttribute = sourceAttribute; - return this; - } - - /** - * Get sourceAttribute - * @return sourceAttribute - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_SOURCE_ATTRIBUTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSourceAttribute() { - return sourceAttribute; - } - - - @JsonProperty(value = JSON_PROPERTY_SOURCE_ATTRIBUTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSourceAttribute(@Nullable String sourceAttribute) { - this.sourceAttribute = sourceAttribute; - } - - - public DynamicValueInteger inherit(@Nullable Boolean inherit) { - this.inherit = inherit; - return this; - } - - /** - * Get inherit - * @return inherit - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_INHERIT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getInherit() { - return inherit; - } - - - @JsonProperty(value = JSON_PROPERTY_INHERIT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInherit(@Nullable Boolean inherit) { - this.inherit = inherit; - } - - - /** - * Return true if this DynamicValueInteger object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DynamicValueInteger dynamicValueInteger = (DynamicValueInteger) o; - return Objects.equals(this.resolvedValue, dynamicValueInteger.resolvedValue) && - Objects.equals(this.sourceType, dynamicValueInteger.sourceType) && - Objects.equals(this.sourceAttribute, dynamicValueInteger.sourceAttribute) && - Objects.equals(this.inherit, dynamicValueInteger.inherit); - } - - @Override - public int hashCode() { - return Objects.hash(resolvedValue, sourceType, sourceAttribute, inherit); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DynamicValueInteger {\n"); - sb.append(" resolvedValue: ").append(toIndentedString(resolvedValue)).append("\n"); - sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); - sb.append(" sourceAttribute: ").append(toIndentedString(sourceAttribute)).append("\n"); - sb.append(" inherit: ").append(toIndentedString(inherit)).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 `resolvedValue` to the URL query string - if (getResolvedValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sresolvedValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResolvedValue())))); - } - - // add `sourceType` to the URL query string - if (getSourceType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%ssourceType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); - } - - // add `sourceAttribute` to the URL query string - if (getSourceAttribute() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%ssourceAttribute%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceAttribute())))); - } - - // add `inherit` to the URL query string - if (getInherit() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sinherit%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInherit())))); - } - - return joiner.toString(); - } -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/DynamicValueLong.java b/pe/src/main/java/org/thingsboard/client/model/DynamicValueLong.java deleted file mode 100644 index c22a5956..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/DynamicValueLong.java +++ /dev/null @@ -1,264 +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 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 org.thingsboard.client.model.DynamicValueSourceType; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * DynamicValueLong - */ -@JsonPropertyOrder({ - DynamicValueLong.JSON_PROPERTY_RESOLVED_VALUE, - DynamicValueLong.JSON_PROPERTY_SOURCE_TYPE, - DynamicValueLong.JSON_PROPERTY_SOURCE_ATTRIBUTE, - DynamicValueLong.JSON_PROPERTY_INHERIT -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class DynamicValueLong { - public static final String JSON_PROPERTY_RESOLVED_VALUE = "resolvedValue"; - @Nullable - private Long resolvedValue; - - public static final String JSON_PROPERTY_SOURCE_TYPE = "sourceType"; - @Nullable - private DynamicValueSourceType sourceType; - - public static final String JSON_PROPERTY_SOURCE_ATTRIBUTE = "sourceAttribute"; - @Nullable - private String sourceAttribute; - - public static final String JSON_PROPERTY_INHERIT = "inherit"; - @Nullable - private Boolean inherit; - - public DynamicValueLong() { - } - - public DynamicValueLong resolvedValue(@Nullable Long resolvedValue) { - this.resolvedValue = resolvedValue; - return this; - } - - /** - * Get resolvedValue - * @return resolvedValue - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_RESOLVED_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getResolvedValue() { - return resolvedValue; - } - - - @JsonProperty(value = JSON_PROPERTY_RESOLVED_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResolvedValue(@Nullable Long resolvedValue) { - this.resolvedValue = resolvedValue; - } - - - public DynamicValueLong sourceType(@Nullable DynamicValueSourceType sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Get sourceType - * @return sourceType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_SOURCE_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DynamicValueSourceType getSourceType() { - return sourceType; - } - - - @JsonProperty(value = JSON_PROPERTY_SOURCE_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSourceType(@Nullable DynamicValueSourceType sourceType) { - this.sourceType = sourceType; - } - - - public DynamicValueLong sourceAttribute(@Nullable String sourceAttribute) { - this.sourceAttribute = sourceAttribute; - return this; - } - - /** - * Get sourceAttribute - * @return sourceAttribute - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_SOURCE_ATTRIBUTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSourceAttribute() { - return sourceAttribute; - } - - - @JsonProperty(value = JSON_PROPERTY_SOURCE_ATTRIBUTE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSourceAttribute(@Nullable String sourceAttribute) { - this.sourceAttribute = sourceAttribute; - } - - - public DynamicValueLong inherit(@Nullable Boolean inherit) { - this.inherit = inherit; - return this; - } - - /** - * Get inherit - * @return inherit - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_INHERIT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getInherit() { - return inherit; - } - - - @JsonProperty(value = JSON_PROPERTY_INHERIT, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInherit(@Nullable Boolean inherit) { - this.inherit = inherit; - } - - - /** - * Return true if this DynamicValueLong object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DynamicValueLong dynamicValueLong = (DynamicValueLong) o; - return Objects.equals(this.resolvedValue, dynamicValueLong.resolvedValue) && - Objects.equals(this.sourceType, dynamicValueLong.sourceType) && - Objects.equals(this.sourceAttribute, dynamicValueLong.sourceAttribute) && - Objects.equals(this.inherit, dynamicValueLong.inherit); - } - - @Override - public int hashCode() { - return Objects.hash(resolvedValue, sourceType, sourceAttribute, inherit); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DynamicValueLong {\n"); - sb.append(" resolvedValue: ").append(toIndentedString(resolvedValue)).append("\n"); - sb.append(" sourceType: ").append(toIndentedString(sourceType)).append("\n"); - sb.append(" sourceAttribute: ").append(toIndentedString(sourceAttribute)).append("\n"); - sb.append(" inherit: ").append(toIndentedString(inherit)).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 `resolvedValue` to the URL query string - if (getResolvedValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sresolvedValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getResolvedValue())))); - } - - // add `sourceType` to the URL query string - if (getSourceType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%ssourceType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceType())))); - } - - // add `sourceAttribute` to the URL query string - if (getSourceAttribute() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%ssourceAttribute%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSourceAttribute())))); - } - - // add `inherit` to the URL query string - if (getInherit() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sinherit%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getInherit())))); - } - - return joiner.toString(); - } -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/EntityExportSettings.java b/pe/src/main/java/org/thingsboard/client/model/EntityExportSettings.java new file mode 100644 index 00000000..e1ba8cb8 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/EntityExportSettings.java @@ -0,0 +1,335 @@ +/** + * 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; +/** + * EntityExportSettings + */ +@JsonPropertyOrder({ + EntityExportSettings.JSON_PROPERTY_EXPORT_RELATIONS, + EntityExportSettings.JSON_PROPERTY_EXPORT_ATTRIBUTES, + EntityExportSettings.JSON_PROPERTY_EXPORT_CREDENTIALS, + EntityExportSettings.JSON_PROPERTY_EXPORT_CALCULATED_FIELDS, + EntityExportSettings.JSON_PROPERTY_EXPORT_PERMISSIONS, + EntityExportSettings.JSON_PROPERTY_EXPORT_GROUP_ENTITIES +}) +@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class EntityExportSettings { + public static final String JSON_PROPERTY_EXPORT_RELATIONS = "exportRelations"; + @Nullable + private Boolean exportRelations; + + public static final String JSON_PROPERTY_EXPORT_ATTRIBUTES = "exportAttributes"; + @Nullable + private Boolean exportAttributes; + + public static final String JSON_PROPERTY_EXPORT_CREDENTIALS = "exportCredentials"; + @Nullable + private Boolean exportCredentials; + + public static final String JSON_PROPERTY_EXPORT_CALCULATED_FIELDS = "exportCalculatedFields"; + @Nullable + private Boolean exportCalculatedFields; + + public static final String JSON_PROPERTY_EXPORT_PERMISSIONS = "exportPermissions"; + @Nullable + private Boolean exportPermissions; + + public static final String JSON_PROPERTY_EXPORT_GROUP_ENTITIES = "exportGroupEntities"; + @Nullable + private Boolean exportGroupEntities; + + public EntityExportSettings() { + } + + public EntityExportSettings exportRelations(@Nullable Boolean exportRelations) { + this.exportRelations = exportRelations; + return this; + } + + /** + * Get exportRelations + * @return exportRelations + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_EXPORT_RELATIONS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExportRelations() { + return exportRelations; + } + + + @JsonProperty(value = JSON_PROPERTY_EXPORT_RELATIONS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExportRelations(@Nullable Boolean exportRelations) { + this.exportRelations = exportRelations; + } + + + public EntityExportSettings exportAttributes(@Nullable Boolean exportAttributes) { + this.exportAttributes = exportAttributes; + return this; + } + + /** + * Get exportAttributes + * @return exportAttributes + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_EXPORT_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExportAttributes() { + return exportAttributes; + } + + + @JsonProperty(value = JSON_PROPERTY_EXPORT_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExportAttributes(@Nullable Boolean exportAttributes) { + this.exportAttributes = exportAttributes; + } + + + public EntityExportSettings exportCredentials(@Nullable Boolean exportCredentials) { + this.exportCredentials = exportCredentials; + return this; + } + + /** + * Get exportCredentials + * @return exportCredentials + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_EXPORT_CREDENTIALS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExportCredentials() { + return exportCredentials; + } + + + @JsonProperty(value = JSON_PROPERTY_EXPORT_CREDENTIALS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExportCredentials(@Nullable Boolean exportCredentials) { + this.exportCredentials = exportCredentials; + } + + + public EntityExportSettings exportCalculatedFields(@Nullable Boolean exportCalculatedFields) { + this.exportCalculatedFields = exportCalculatedFields; + return this; + } + + /** + * Get exportCalculatedFields + * @return exportCalculatedFields + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_EXPORT_CALCULATED_FIELDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExportCalculatedFields() { + return exportCalculatedFields; + } + + + @JsonProperty(value = JSON_PROPERTY_EXPORT_CALCULATED_FIELDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExportCalculatedFields(@Nullable Boolean exportCalculatedFields) { + this.exportCalculatedFields = exportCalculatedFields; + } + + + public EntityExportSettings exportPermissions(@Nullable Boolean exportPermissions) { + this.exportPermissions = exportPermissions; + return this; + } + + /** + * Get exportPermissions + * @return exportPermissions + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_EXPORT_PERMISSIONS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExportPermissions() { + return exportPermissions; + } + + + @JsonProperty(value = JSON_PROPERTY_EXPORT_PERMISSIONS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExportPermissions(@Nullable Boolean exportPermissions) { + this.exportPermissions = exportPermissions; + } + + + public EntityExportSettings exportGroupEntities(@Nullable Boolean exportGroupEntities) { + this.exportGroupEntities = exportGroupEntities; + return this; + } + + /** + * Get exportGroupEntities + * @return exportGroupEntities + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_EXPORT_GROUP_ENTITIES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExportGroupEntities() { + return exportGroupEntities; + } + + + @JsonProperty(value = JSON_PROPERTY_EXPORT_GROUP_ENTITIES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExportGroupEntities(@Nullable Boolean exportGroupEntities) { + this.exportGroupEntities = exportGroupEntities; + } + + + /** + * Return true if this EntityExportSettings object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityExportSettings entityExportSettings = (EntityExportSettings) o; + return Objects.equals(this.exportRelations, entityExportSettings.exportRelations) && + Objects.equals(this.exportAttributes, entityExportSettings.exportAttributes) && + Objects.equals(this.exportCredentials, entityExportSettings.exportCredentials) && + Objects.equals(this.exportCalculatedFields, entityExportSettings.exportCalculatedFields) && + Objects.equals(this.exportPermissions, entityExportSettings.exportPermissions) && + Objects.equals(this.exportGroupEntities, entityExportSettings.exportGroupEntities); + } + + @Override + public int hashCode() { + return Objects.hash(exportRelations, exportAttributes, exportCredentials, exportCalculatedFields, exportPermissions, exportGroupEntities); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityExportSettings {\n"); + sb.append(" exportRelations: ").append(toIndentedString(exportRelations)).append("\n"); + sb.append(" exportAttributes: ").append(toIndentedString(exportAttributes)).append("\n"); + sb.append(" exportCredentials: ").append(toIndentedString(exportCredentials)).append("\n"); + sb.append(" exportCalculatedFields: ").append(toIndentedString(exportCalculatedFields)).append("\n"); + sb.append(" exportPermissions: ").append(toIndentedString(exportPermissions)).append("\n"); + sb.append(" exportGroupEntities: ").append(toIndentedString(exportGroupEntities)).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 `exportRelations` to the URL query string + if (getExportRelations() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sexportRelations%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExportRelations())))); + } + + // add `exportAttributes` to the URL query string + if (getExportAttributes() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sexportAttributes%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExportAttributes())))); + } + + // add `exportCredentials` to the URL query string + if (getExportCredentials() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sexportCredentials%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExportCredentials())))); + } + + // add `exportCalculatedFields` to the URL query string + if (getExportCalculatedFields() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sexportCalculatedFields%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExportCalculatedFields())))); + } + + // add `exportPermissions` to the URL query string + if (getExportPermissions() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sexportPermissions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExportPermissions())))); + } + + // add `exportGroupEntities` to the URL query string + if (getExportGroupEntities() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sexportGroupEntities%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExportGroupEntities())))); + } + + return joiner.toString(); + } +} + 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 22f33dbc..c84d7cd4 100644 --- a/pe/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/EntityGroupInfo.java @@ -34,7 +34,6 @@ 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; @@ -217,8 +216,8 @@ public static TypeEnum fromValue(EntityType value) { private Long version; public static final String JSON_PROPERTY_OWNER_IDS = "ownerIds"; - @Nonnull - private Set ownerIds = new LinkedHashSet<>(); + @Nullable + private Set ownerIds = new LinkedHashSet<>(); public static final String JSON_PROPERTY_EDGE_GROUP_ALL = "edgeGroupAll"; @Nullable @@ -427,12 +426,12 @@ public void setVersion(@Nullable Long version) { } - public EntityGroupInfo ownerIds(@Nonnull Set ownerIds) { + public EntityGroupInfo ownerIds(@Nullable Set ownerIds) { this.ownerIds = ownerIds; return this; } - public EntityGroupInfo addOwnerIdsItem(EntityGroupInfoOwnerIdsInner ownerIdsItem) { + public EntityGroupInfo addOwnerIdsItem(EntityId ownerIdsItem) { if (this.ownerIds == null) { this.ownerIds = new LinkedHashSet<>(); } @@ -441,21 +440,21 @@ public EntityGroupInfo addOwnerIdsItem(EntityGroupInfoOwnerIdsInner ownerIdsItem } /** - * List of the entity group owners. + * Get ownerIds * @return ownerIds */ - @Nonnull - @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Set getOwnerIds() { + @Nullable + @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Set getOwnerIds() { return ownerIds; } @JsonDeserialize(as = LinkedHashSet.class) - @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOwnerIds(@Nonnull Set ownerIds) { + @JsonProperty(value = JSON_PROPERTY_OWNER_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwnerIds(@Nullable Set ownerIds) { this.ownerIds = ownerIds; } @@ -659,7 +658,7 @@ public String toUrlQueryString(String prefix) { // add `ownerIds` to the URL query string if (getOwnerIds() != null) { int i = 0; - for (EntityGroupInfoOwnerIdsInner _item : getOwnerIds()) { + for (EntityId _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 deleted file mode 100644 index 5e65041a..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/EntityGroupInfoOwnerIdsInner.java +++ /dev/null @@ -1,2722 +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 javax.annotation.Generated; -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; - -@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/ExportableEntity.java b/pe/src/main/java/org/thingsboard/client/model/ExportableEntity.java index dfdd36b3..07cc4fd6 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ExportableEntity.java +++ b/pe/src/main/java/org/thingsboard/client/model/ExportableEntity.java @@ -30,6 +30,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.util.Arrays; import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.TenantId; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -38,11 +39,17 @@ * ExportableEntity */ @JsonPropertyOrder({ + ExportableEntity.JSON_PROPERTY_CREATED_TIME, ExportableEntity.JSON_PROPERTY_ID, - ExportableEntity.JSON_PROPERTY_NAME + ExportableEntity.JSON_PROPERTY_NAME, + ExportableEntity.JSON_PROPERTY_TENANT_ID }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class ExportableEntity { + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; + @Nullable + private Long createdTime; + public static final String JSON_PROPERTY_ID = "id"; @Nullable private EntityId id; @@ -51,9 +58,37 @@ public class ExportableEntity { @Nullable private String name; + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + @Nullable + private TenantId tenantId; + public ExportableEntity() { } + public ExportableEntity createdTime(@Nullable Long createdTime) { + this.createdTime = createdTime; + return this; + } + + /** + * Get createdTime + * @return createdTime + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getCreatedTime() { + return createdTime; + } + + + @JsonProperty(value = JSON_PROPERTY_CREATED_TIME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedTime(@Nullable Long createdTime) { + this.createdTime = createdTime; + } + + public ExportableEntity id(@Nullable EntityId id) { this.id = id; return this; @@ -102,6 +137,30 @@ public void setName(@Nullable String name) { } + public ExportableEntity tenantId(@Nullable TenantId tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get tenantId + * @return tenantId + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TenantId getTenantId() { + return tenantId; + } + + + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTenantId(@Nullable TenantId tenantId) { + this.tenantId = tenantId; + } + + /** * Return true if this ExportableEntity object is equal to o. */ @@ -114,21 +173,25 @@ public boolean equals(Object o) { return false; } ExportableEntity exportableEntity = (ExportableEntity) o; - return Objects.equals(this.id, exportableEntity.id) && - Objects.equals(this.name, exportableEntity.name); + return Objects.equals(this.createdTime, exportableEntity.createdTime) && + Objects.equals(this.id, exportableEntity.id) && + Objects.equals(this.name, exportableEntity.name) && + Objects.equals(this.tenantId, exportableEntity.tenantId); } @Override public int hashCode() { - return Objects.hash(id, name); + return Objects.hash(createdTime, id, name, tenantId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ExportableEntity {\n"); + sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -176,6 +239,11 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); + // 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)); @@ -186,6 +254,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sname%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getName())))); } + // add `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add(getTenantId().toUrlQueryString(prefix + "tenantId" + suffix)); + } + return joiner.toString(); } } diff --git a/pe/src/main/java/org/thingsboard/client/model/FilterPredicateValueInteger.java b/pe/src/main/java/org/thingsboard/client/model/FilterPredicateValueInteger.java deleted file mode 100644 index a7dc87d8..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/FilterPredicateValueInteger.java +++ /dev/null @@ -1,228 +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 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 org.thingsboard.client.model.DynamicValueInteger; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * FilterPredicateValueInteger - */ -@JsonPropertyOrder({ - FilterPredicateValueInteger.JSON_PROPERTY_DEFAULT_VALUE, - FilterPredicateValueInteger.JSON_PROPERTY_USER_VALUE, - FilterPredicateValueInteger.JSON_PROPERTY_DYNAMIC_VALUE -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class FilterPredicateValueInteger { - public static final String JSON_PROPERTY_DEFAULT_VALUE = "defaultValue"; - @Nullable - private Integer defaultValue; - - public static final String JSON_PROPERTY_USER_VALUE = "userValue"; - @Nullable - private Integer userValue; - - public static final String JSON_PROPERTY_DYNAMIC_VALUE = "dynamicValue"; - @Nullable - private DynamicValueInteger dynamicValue; - - public FilterPredicateValueInteger() { - } - - public FilterPredicateValueInteger defaultValue(@Nullable Integer defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - /** - * Get defaultValue - * @return defaultValue - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DEFAULT_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getDefaultValue() { - return defaultValue; - } - - - @JsonProperty(value = JSON_PROPERTY_DEFAULT_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultValue(@Nullable Integer defaultValue) { - this.defaultValue = defaultValue; - } - - - public FilterPredicateValueInteger userValue(@Nullable Integer userValue) { - this.userValue = userValue; - return this; - } - - /** - * Get userValue - * @return userValue - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_USER_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getUserValue() { - return userValue; - } - - - @JsonProperty(value = JSON_PROPERTY_USER_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUserValue(@Nullable Integer userValue) { - this.userValue = userValue; - } - - - public FilterPredicateValueInteger dynamicValue(@Nullable DynamicValueInteger dynamicValue) { - this.dynamicValue = dynamicValue; - return this; - } - - /** - * Get dynamicValue - * @return dynamicValue - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DYNAMIC_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DynamicValueInteger getDynamicValue() { - return dynamicValue; - } - - - @JsonProperty(value = JSON_PROPERTY_DYNAMIC_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDynamicValue(@Nullable DynamicValueInteger dynamicValue) { - this.dynamicValue = dynamicValue; - } - - - /** - * Return true if this FilterPredicateValueInteger object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FilterPredicateValueInteger filterPredicateValueInteger = (FilterPredicateValueInteger) o; - return Objects.equals(this.defaultValue, filterPredicateValueInteger.defaultValue) && - Objects.equals(this.userValue, filterPredicateValueInteger.userValue) && - Objects.equals(this.dynamicValue, filterPredicateValueInteger.dynamicValue); - } - - @Override - public int hashCode() { - return Objects.hash(defaultValue, userValue, dynamicValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FilterPredicateValueInteger {\n"); - sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).append("\n"); - sb.append(" userValue: ").append(toIndentedString(userValue)).append("\n"); - sb.append(" dynamicValue: ").append(toIndentedString(dynamicValue)).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 `defaultValue` to the URL query string - if (getDefaultValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdefaultValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDefaultValue())))); - } - - // add `userValue` to the URL query string - if (getUserValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%suserValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserValue())))); - } - - // add `dynamicValue` to the URL query string - if (getDynamicValue() != null) { - joiner.add(getDynamicValue().toUrlQueryString(prefix + "dynamicValue" + suffix)); - } - - return joiner.toString(); - } -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/FilterPredicateValueLong.java b/pe/src/main/java/org/thingsboard/client/model/FilterPredicateValueLong.java deleted file mode 100644 index 3bda2f66..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/FilterPredicateValueLong.java +++ /dev/null @@ -1,228 +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 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 org.thingsboard.client.model.DynamicValueLong; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.ApiClient; -/** - * FilterPredicateValueLong - */ -@JsonPropertyOrder({ - FilterPredicateValueLong.JSON_PROPERTY_DEFAULT_VALUE, - FilterPredicateValueLong.JSON_PROPERTY_USER_VALUE, - FilterPredicateValueLong.JSON_PROPERTY_DYNAMIC_VALUE -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class FilterPredicateValueLong { - public static final String JSON_PROPERTY_DEFAULT_VALUE = "defaultValue"; - @Nullable - private Long defaultValue; - - public static final String JSON_PROPERTY_USER_VALUE = "userValue"; - @Nullable - private Long userValue; - - public static final String JSON_PROPERTY_DYNAMIC_VALUE = "dynamicValue"; - @Nullable - private DynamicValueLong dynamicValue; - - public FilterPredicateValueLong() { - } - - public FilterPredicateValueLong defaultValue(@Nullable Long defaultValue) { - this.defaultValue = defaultValue; - return this; - } - - /** - * Get defaultValue - * @return defaultValue - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DEFAULT_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getDefaultValue() { - return defaultValue; - } - - - @JsonProperty(value = JSON_PROPERTY_DEFAULT_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDefaultValue(@Nullable Long defaultValue) { - this.defaultValue = defaultValue; - } - - - public FilterPredicateValueLong userValue(@Nullable Long userValue) { - this.userValue = userValue; - return this; - } - - /** - * Get userValue - * @return userValue - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_USER_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getUserValue() { - return userValue; - } - - - @JsonProperty(value = JSON_PROPERTY_USER_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUserValue(@Nullable Long userValue) { - this.userValue = userValue; - } - - - public FilterPredicateValueLong dynamicValue(@Nullable DynamicValueLong dynamicValue) { - this.dynamicValue = dynamicValue; - return this; - } - - /** - * Get dynamicValue - * @return dynamicValue - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DYNAMIC_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DynamicValueLong getDynamicValue() { - return dynamicValue; - } - - - @JsonProperty(value = JSON_PROPERTY_DYNAMIC_VALUE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDynamicValue(@Nullable DynamicValueLong dynamicValue) { - this.dynamicValue = dynamicValue; - } - - - /** - * Return true if this FilterPredicateValueLong object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FilterPredicateValueLong filterPredicateValueLong = (FilterPredicateValueLong) o; - return Objects.equals(this.defaultValue, filterPredicateValueLong.defaultValue) && - Objects.equals(this.userValue, filterPredicateValueLong.userValue) && - Objects.equals(this.dynamicValue, filterPredicateValueLong.dynamicValue); - } - - @Override - public int hashCode() { - return Objects.hash(defaultValue, userValue, dynamicValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FilterPredicateValueLong {\n"); - sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).append("\n"); - sb.append(" userValue: ").append(toIndentedString(userValue)).append("\n"); - sb.append(" dynamicValue: ").append(toIndentedString(dynamicValue)).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 `defaultValue` to the URL query string - if (getDefaultValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdefaultValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getDefaultValue())))); - } - - // add `userValue` to the URL query string - if (getUserValue() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%suserValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getUserValue())))); - } - - // add `dynamicValue` to the URL query string - if (getDynamicValue() != null) { - joiner.add(getDynamicValue().toUrlQueryString(prefix + "dynamicValue" + suffix)); - } - - return joiner.toString(); - } -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/GitHubModelsChatModelConfig.java b/pe/src/main/java/org/thingsboard/client/model/GitHubModelsChatModelConfig.java index d4e472e8..70b80e63 100644 --- a/pe/src/main/java/org/thingsboard/client/model/GitHubModelsChatModelConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/GitHubModelsChatModelConfig.java @@ -45,7 +45,6 @@ * GitHubModelsChatModelConfig */ @JsonPropertyOrder({ - GitHubModelsChatModelConfig.JSON_PROPERTY_MODEL_TYPE, GitHubModelsChatModelConfig.JSON_PROPERTY_PROVIDER_CONFIG, GitHubModelsChatModelConfig.JSON_PROPERTY_MODEL_ID, GitHubModelsChatModelConfig.JSON_PROPERTY_TEMPERATURE, @@ -54,7 +53,8 @@ GitHubModelsChatModelConfig.JSON_PROPERTY_PRESENCE_PENALTY, GitHubModelsChatModelConfig.JSON_PROPERTY_MAX_OUTPUT_TOKENS, GitHubModelsChatModelConfig.JSON_PROPERTY_TIMEOUT_SECONDS, - GitHubModelsChatModelConfig.JSON_PROPERTY_MAX_RETRIES + GitHubModelsChatModelConfig.JSON_PROPERTY_MAX_RETRIES, + GitHubModelsChatModelConfig.JSON_PROPERTY_MODEL_TYPE }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,10 +64,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "provider", visible = true) public class GitHubModelsChatModelConfig extends AiModelConfig { - public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; - @Nullable - private AiModelType modelType; - public static final String JSON_PROPERTY_PROVIDER_CONFIG = "providerConfig"; @Nonnull private GitHubModelsProviderConfig providerConfig; @@ -104,6 +100,10 @@ public class GitHubModelsChatModelConfig extends AiModelConfig { @Nullable private Integer maxRetries; + public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; + @Nullable + private AiModelType modelType; + public GitHubModelsChatModelConfig() { } @@ -115,20 +115,6 @@ public GitHubModelsChatModelConfig( this.modelType = modelType; } - /** - * Get modelType - * @return modelType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AiModelType getModelType() { - return modelType; - } - - - - public GitHubModelsChatModelConfig providerConfig(@Nonnull GitHubModelsProviderConfig providerConfig) { this.providerConfig = providerConfig; return this; @@ -346,6 +332,20 @@ public void setMaxRetries(@Nullable Integer maxRetries) { } + /** + * Get modelType + * @return modelType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiModelType getModelType() { + return modelType; + } + + + + /** * Return true if this GitHubModelsChatModelConfig object is equal to o. */ @@ -358,8 +358,7 @@ public boolean equals(Object o) { return false; } GitHubModelsChatModelConfig gitHubModelsChatModelConfig = (GitHubModelsChatModelConfig) o; - return Objects.equals(this.modelType, gitHubModelsChatModelConfig.modelType) && - Objects.equals(this.providerConfig, gitHubModelsChatModelConfig.providerConfig) && + return Objects.equals(this.providerConfig, gitHubModelsChatModelConfig.providerConfig) && Objects.equals(this.modelId, gitHubModelsChatModelConfig.modelId) && Objects.equals(this.temperature, gitHubModelsChatModelConfig.temperature) && Objects.equals(this.topP, gitHubModelsChatModelConfig.topP) && @@ -368,12 +367,13 @@ public boolean equals(Object o) { Objects.equals(this.maxOutputTokens, gitHubModelsChatModelConfig.maxOutputTokens) && Objects.equals(this.timeoutSeconds, gitHubModelsChatModelConfig.timeoutSeconds) && Objects.equals(this.maxRetries, gitHubModelsChatModelConfig.maxRetries) && + Objects.equals(this.modelType, gitHubModelsChatModelConfig.modelType) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(modelType, providerConfig, modelId, temperature, topP, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, super.hashCode()); + return Objects.hash(providerConfig, modelId, temperature, topP, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, modelType, super.hashCode()); } @Override @@ -381,7 +381,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GitHubModelsChatModelConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append(" providerConfig: ").append(toIndentedString(providerConfig)).append("\n"); sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); @@ -391,6 +390,7 @@ public String toString() { sb.append(" maxOutputTokens: ").append(toIndentedString(maxOutputTokens)).append("\n"); sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -443,11 +443,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); } - // add `modelType` to the URL query string - if (getModelType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); - } - // add `providerConfig` to the URL query string if (getProviderConfig() != null) { joiner.add(getProviderConfig().toUrlQueryString(prefix + "providerConfig" + suffix)); @@ -493,6 +488,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smaxRetries%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxRetries())))); } + // add `modelType` to the URL query string + if (getModelType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/GoogleAiGeminiChatModelConfig.java b/pe/src/main/java/org/thingsboard/client/model/GoogleAiGeminiChatModelConfig.java index d2c0e3dd..63662c4e 100644 --- a/pe/src/main/java/org/thingsboard/client/model/GoogleAiGeminiChatModelConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/GoogleAiGeminiChatModelConfig.java @@ -45,7 +45,6 @@ * GoogleAiGeminiChatModelConfig */ @JsonPropertyOrder({ - GoogleAiGeminiChatModelConfig.JSON_PROPERTY_MODEL_TYPE, GoogleAiGeminiChatModelConfig.JSON_PROPERTY_PROVIDER_CONFIG, GoogleAiGeminiChatModelConfig.JSON_PROPERTY_MODEL_ID, GoogleAiGeminiChatModelConfig.JSON_PROPERTY_TEMPERATURE, @@ -55,7 +54,8 @@ GoogleAiGeminiChatModelConfig.JSON_PROPERTY_PRESENCE_PENALTY, GoogleAiGeminiChatModelConfig.JSON_PROPERTY_MAX_OUTPUT_TOKENS, GoogleAiGeminiChatModelConfig.JSON_PROPERTY_TIMEOUT_SECONDS, - GoogleAiGeminiChatModelConfig.JSON_PROPERTY_MAX_RETRIES + GoogleAiGeminiChatModelConfig.JSON_PROPERTY_MAX_RETRIES, + GoogleAiGeminiChatModelConfig.JSON_PROPERTY_MODEL_TYPE }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -65,10 +65,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "provider", visible = true) public class GoogleAiGeminiChatModelConfig extends AiModelConfig { - public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; - @Nullable - private AiModelType modelType; - public static final String JSON_PROPERTY_PROVIDER_CONFIG = "providerConfig"; @Nonnull private GoogleAiGeminiProviderConfig providerConfig; @@ -109,6 +105,10 @@ public class GoogleAiGeminiChatModelConfig extends AiModelConfig { @Nullable private Integer maxRetries; + public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; + @Nullable + private AiModelType modelType; + public GoogleAiGeminiChatModelConfig() { } @@ -120,20 +120,6 @@ public GoogleAiGeminiChatModelConfig( this.modelType = modelType; } - /** - * Get modelType - * @return modelType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AiModelType getModelType() { - return modelType; - } - - - - public GoogleAiGeminiChatModelConfig providerConfig(@Nonnull GoogleAiGeminiProviderConfig providerConfig) { this.providerConfig = providerConfig; return this; @@ -375,6 +361,20 @@ public void setMaxRetries(@Nullable Integer maxRetries) { } + /** + * Get modelType + * @return modelType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiModelType getModelType() { + return modelType; + } + + + + /** * Return true if this GoogleAiGeminiChatModelConfig object is equal to o. */ @@ -387,8 +387,7 @@ public boolean equals(Object o) { return false; } GoogleAiGeminiChatModelConfig googleAiGeminiChatModelConfig = (GoogleAiGeminiChatModelConfig) o; - return Objects.equals(this.modelType, googleAiGeminiChatModelConfig.modelType) && - Objects.equals(this.providerConfig, googleAiGeminiChatModelConfig.providerConfig) && + return Objects.equals(this.providerConfig, googleAiGeminiChatModelConfig.providerConfig) && Objects.equals(this.modelId, googleAiGeminiChatModelConfig.modelId) && Objects.equals(this.temperature, googleAiGeminiChatModelConfig.temperature) && Objects.equals(this.topP, googleAiGeminiChatModelConfig.topP) && @@ -398,12 +397,13 @@ public boolean equals(Object o) { Objects.equals(this.maxOutputTokens, googleAiGeminiChatModelConfig.maxOutputTokens) && Objects.equals(this.timeoutSeconds, googleAiGeminiChatModelConfig.timeoutSeconds) && Objects.equals(this.maxRetries, googleAiGeminiChatModelConfig.maxRetries) && + Objects.equals(this.modelType, googleAiGeminiChatModelConfig.modelType) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(modelType, providerConfig, modelId, temperature, topP, topK, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, super.hashCode()); + return Objects.hash(providerConfig, modelId, temperature, topP, topK, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, modelType, super.hashCode()); } @Override @@ -411,7 +411,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GoogleAiGeminiChatModelConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append(" providerConfig: ").append(toIndentedString(providerConfig)).append("\n"); sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); @@ -422,6 +421,7 @@ public String toString() { sb.append(" maxOutputTokens: ").append(toIndentedString(maxOutputTokens)).append("\n"); sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -474,11 +474,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); } - // add `modelType` to the URL query string - if (getModelType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); - } - // add `providerConfig` to the URL query string if (getProviderConfig() != null) { joiner.add(getProviderConfig().toUrlQueryString(prefix + "providerConfig" + suffix)); @@ -529,6 +524,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smaxRetries%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxRetries())))); } + // add `modelType` to the URL query string + if (getModelType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/GoogleVertexAiGeminiChatModelConfig.java b/pe/src/main/java/org/thingsboard/client/model/GoogleVertexAiGeminiChatModelConfig.java index 21309867..85d77a60 100644 --- a/pe/src/main/java/org/thingsboard/client/model/GoogleVertexAiGeminiChatModelConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/GoogleVertexAiGeminiChatModelConfig.java @@ -45,7 +45,6 @@ * GoogleVertexAiGeminiChatModelConfig */ @JsonPropertyOrder({ - GoogleVertexAiGeminiChatModelConfig.JSON_PROPERTY_MODEL_TYPE, GoogleVertexAiGeminiChatModelConfig.JSON_PROPERTY_PROVIDER_CONFIG, GoogleVertexAiGeminiChatModelConfig.JSON_PROPERTY_MODEL_ID, GoogleVertexAiGeminiChatModelConfig.JSON_PROPERTY_TEMPERATURE, @@ -55,7 +54,8 @@ GoogleVertexAiGeminiChatModelConfig.JSON_PROPERTY_PRESENCE_PENALTY, GoogleVertexAiGeminiChatModelConfig.JSON_PROPERTY_MAX_OUTPUT_TOKENS, GoogleVertexAiGeminiChatModelConfig.JSON_PROPERTY_TIMEOUT_SECONDS, - GoogleVertexAiGeminiChatModelConfig.JSON_PROPERTY_MAX_RETRIES + GoogleVertexAiGeminiChatModelConfig.JSON_PROPERTY_MAX_RETRIES, + GoogleVertexAiGeminiChatModelConfig.JSON_PROPERTY_MODEL_TYPE }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -65,10 +65,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "provider", visible = true) public class GoogleVertexAiGeminiChatModelConfig extends AiModelConfig { - public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; - @Nullable - private AiModelType modelType; - public static final String JSON_PROPERTY_PROVIDER_CONFIG = "providerConfig"; @Nonnull private GoogleVertexAiGeminiProviderConfig providerConfig; @@ -109,6 +105,10 @@ public class GoogleVertexAiGeminiChatModelConfig extends AiModelConfig { @Nullable private Integer maxRetries; + public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; + @Nullable + private AiModelType modelType; + public GoogleVertexAiGeminiChatModelConfig() { } @@ -120,20 +120,6 @@ public GoogleVertexAiGeminiChatModelConfig( this.modelType = modelType; } - /** - * Get modelType - * @return modelType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AiModelType getModelType() { - return modelType; - } - - - - public GoogleVertexAiGeminiChatModelConfig providerConfig(@Nonnull GoogleVertexAiGeminiProviderConfig providerConfig) { this.providerConfig = providerConfig; return this; @@ -375,6 +361,20 @@ public void setMaxRetries(@Nullable Integer maxRetries) { } + /** + * Get modelType + * @return modelType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiModelType getModelType() { + return modelType; + } + + + + /** * Return true if this GoogleVertexAiGeminiChatModelConfig object is equal to o. */ @@ -387,8 +387,7 @@ public boolean equals(Object o) { return false; } GoogleVertexAiGeminiChatModelConfig googleVertexAiGeminiChatModelConfig = (GoogleVertexAiGeminiChatModelConfig) o; - return Objects.equals(this.modelType, googleVertexAiGeminiChatModelConfig.modelType) && - Objects.equals(this.providerConfig, googleVertexAiGeminiChatModelConfig.providerConfig) && + return Objects.equals(this.providerConfig, googleVertexAiGeminiChatModelConfig.providerConfig) && Objects.equals(this.modelId, googleVertexAiGeminiChatModelConfig.modelId) && Objects.equals(this.temperature, googleVertexAiGeminiChatModelConfig.temperature) && Objects.equals(this.topP, googleVertexAiGeminiChatModelConfig.topP) && @@ -398,12 +397,13 @@ public boolean equals(Object o) { Objects.equals(this.maxOutputTokens, googleVertexAiGeminiChatModelConfig.maxOutputTokens) && Objects.equals(this.timeoutSeconds, googleVertexAiGeminiChatModelConfig.timeoutSeconds) && Objects.equals(this.maxRetries, googleVertexAiGeminiChatModelConfig.maxRetries) && + Objects.equals(this.modelType, googleVertexAiGeminiChatModelConfig.modelType) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(modelType, providerConfig, modelId, temperature, topP, topK, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, super.hashCode()); + return Objects.hash(providerConfig, modelId, temperature, topP, topK, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, modelType, super.hashCode()); } @Override @@ -411,7 +411,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GoogleVertexAiGeminiChatModelConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append(" providerConfig: ").append(toIndentedString(providerConfig)).append("\n"); sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); @@ -422,6 +421,7 @@ public String toString() { sb.append(" maxOutputTokens: ").append(toIndentedString(maxOutputTokens)).append("\n"); sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -474,11 +474,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); } - // add `modelType` to the URL query string - if (getModelType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); - } - // add `providerConfig` to the URL query string if (getProviderConfig() != null) { joiner.add(getProviderConfig().toUrlQueryString(prefix + "providerConfig" + suffix)); @@ -529,6 +524,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smaxRetries%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxRetries())))); } + // add `modelType` to the URL query string + if (getModelType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/HomeDashboard.java b/pe/src/main/java/org/thingsboard/client/model/HomeDashboard.java new file mode 100644 index 00000000..93a53ee1 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/HomeDashboard.java @@ -0,0 +1,649 @@ +/** + * 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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.thingsboard.client.model.CustomerId; +import org.thingsboard.client.model.DashboardId; +import org.thingsboard.client.model.EntityId; +import org.thingsboard.client.model.ResourceExportData; +import org.thingsboard.client.model.ShortCustomerInfo; +import org.thingsboard.client.model.TenantId; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.ApiClient; +/** + * HomeDashboard + */ +@JsonPropertyOrder({ + HomeDashboard.JSON_PROPERTY_ID, + HomeDashboard.JSON_PROPERTY_CREATED_TIME, + HomeDashboard.JSON_PROPERTY_TENANT_ID, + HomeDashboard.JSON_PROPERTY_CUSTOMER_ID, + HomeDashboard.JSON_PROPERTY_OWNER_ID, + HomeDashboard.JSON_PROPERTY_TITLE, + HomeDashboard.JSON_PROPERTY_NAME, + HomeDashboard.JSON_PROPERTY_IMAGE, + HomeDashboard.JSON_PROPERTY_ASSIGNED_CUSTOMERS, + HomeDashboard.JSON_PROPERTY_MOBILE_HIDE, + HomeDashboard.JSON_PROPERTY_MOBILE_ORDER, + HomeDashboard.JSON_PROPERTY_CONFIGURATION, + HomeDashboard.JSON_PROPERTY_RESOURCES, + HomeDashboard.JSON_PROPERTY_VERSION, + HomeDashboard.JSON_PROPERTY_HIDE_DASHBOARD_TOOLBAR +}) +@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class HomeDashboard { + public static final String JSON_PROPERTY_ID = "id"; + @Nullable + private DashboardId id; + + public static final String JSON_PROPERTY_CREATED_TIME = "createdTime"; + @Nullable + private Long createdTime; + + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + @Nullable + private TenantId tenantId; + + public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; + @Nullable + private CustomerId customerId; + + public static final String JSON_PROPERTY_OWNER_ID = "ownerId"; + @Nullable + private EntityId ownerId; + + public static final String JSON_PROPERTY_TITLE = "title"; + @Nullable + private String title; + + public static final String JSON_PROPERTY_NAME = "name"; + @Nullable + private String name; + + public static final String JSON_PROPERTY_IMAGE = "image"; + @Nullable + private String image; + + public static final String JSON_PROPERTY_ASSIGNED_CUSTOMERS = "assignedCustomers"; + @Nullable + private Set assignedCustomers = new LinkedHashSet<>(); + + public static final String JSON_PROPERTY_MOBILE_HIDE = "mobileHide"; + @Nullable + private Boolean mobileHide; + + public static final String JSON_PROPERTY_MOBILE_ORDER = "mobileOrder"; + @Nullable + private Integer mobileOrder; + + public static final String JSON_PROPERTY_CONFIGURATION = "configuration"; + @Nullable + private com.fasterxml.jackson.databind.JsonNode _configuration = null; + + public static final String JSON_PROPERTY_RESOURCES = "resources"; + @Nullable + private List resources = new ArrayList<>(); + + public static final String JSON_PROPERTY_VERSION = "version"; + @Nullable + private Long version; + + public static final String JSON_PROPERTY_HIDE_DASHBOARD_TOOLBAR = "hideDashboardToolbar"; + @Nullable + private Boolean hideDashboardToolbar; + + public HomeDashboard() { + } + + @JsonCreator + public HomeDashboard( + @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 + ) { + this(); + this.createdTime = createdTime; + this.tenantId = tenantId; + this.ownerId = ownerId; + this.name = name; + this.image = image; + this.mobileHide = mobileHide; + this.mobileOrder = mobileOrder; + } + + public HomeDashboard id(@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 + */ + @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(@Nullable DashboardId id) { + this.id = id; + } + + + /** + * Timestamp of the dashboard creation, in milliseconds + * @return createdTime + */ + @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 + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TenantId getTenantId() { + return tenantId; + } + + + + + public HomeDashboard customerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + return this; + } + + /** + * JSON object with Customer Id. + * @return customerId + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CustomerId getCustomerId() { + return customerId; + } + + + @JsonProperty(value = JSON_PROPERTY_CUSTOMER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerId(@Nullable CustomerId customerId) { + this.customerId = customerId; + } + + + /** + * JSON object with Customer or Tenant Id + * @return ownerId + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_OWNER_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityId getOwnerId() { + return ownerId; + } + + + + + public HomeDashboard title(@Nullable String title) { + this.title = title; + return this; + } + + /** + * Title of the dashboard. + * @return title + */ + @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(@Nullable String title) { + this.title = title; + } + + + /** + * Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. + * @return name + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_NAME, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + + + + /** + * Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. + * @return image + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_IMAGE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getImage() { + return image; + } + + + + + public HomeDashboard assignedCustomers(@Nullable Set assignedCustomers) { + this.assignedCustomers = assignedCustomers; + return this; + } + + public HomeDashboard 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 + */ + @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(@Nullable Set assignedCustomers) { + this.assignedCustomers = assignedCustomers; + } + + + /** + * Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. + * @return mobileHide + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MOBILE_HIDE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMobileHide() { + return mobileHide; + } + + + + + /** + * Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications + * @return mobileOrder + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MOBILE_ORDER, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMobileOrder() { + return mobileOrder; + } + + + + + public HomeDashboard _configuration(@Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; + return this; + } + + /** + * Get _configuration + * @return _configuration + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public com.fasterxml.jackson.databind.JsonNode getConfiguration() { + return _configuration; + } + + + @JsonProperty(value = JSON_PROPERTY_CONFIGURATION, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConfiguration(@Nullable com.fasterxml.jackson.databind.JsonNode _configuration) { + this._configuration = _configuration; + } + + + public HomeDashboard resources(@Nullable List resources) { + this.resources = resources; + return this; + } + + public HomeDashboard addResourcesItem(ResourceExportData resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add(resourcesItem); + return this; + } + + /** + * Get resources + * @return resources + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResources() { + return resources; + } + + + @JsonProperty(value = JSON_PROPERTY_RESOURCES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResources(@Nullable List resources) { + this.resources = resources; + } + + + public HomeDashboard version(@Nullable Long version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + @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(@Nullable Long version) { + this.version = version; + } + + + public HomeDashboard hideDashboardToolbar(@Nullable Boolean hideDashboardToolbar) { + this.hideDashboardToolbar = hideDashboardToolbar; + return this; + } + + /** + * Hide dashboard toolbar flag. Useful for rendering dashboards on mobile. + * @return hideDashboardToolbar + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_HIDE_DASHBOARD_TOOLBAR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHideDashboardToolbar() { + return hideDashboardToolbar; + } + + + @JsonProperty(value = JSON_PROPERTY_HIDE_DASHBOARD_TOOLBAR, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHideDashboardToolbar(@Nullable Boolean hideDashboardToolbar) { + this.hideDashboardToolbar = hideDashboardToolbar; + } + + + /** + * Return true if this HomeDashboard object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HomeDashboard homeDashboard = (HomeDashboard) o; + return Objects.equals(this.id, homeDashboard.id) && + Objects.equals(this.createdTime, homeDashboard.createdTime) && + Objects.equals(this.tenantId, homeDashboard.tenantId) && + Objects.equals(this.customerId, homeDashboard.customerId) && + Objects.equals(this.ownerId, homeDashboard.ownerId) && + Objects.equals(this.title, homeDashboard.title) && + Objects.equals(this.name, homeDashboard.name) && + Objects.equals(this.image, homeDashboard.image) && + Objects.equals(this.assignedCustomers, homeDashboard.assignedCustomers) && + Objects.equals(this.mobileHide, homeDashboard.mobileHide) && + Objects.equals(this.mobileOrder, homeDashboard.mobileOrder) && + Objects.equals(this._configuration, homeDashboard._configuration) && + Objects.equals(this.resources, homeDashboard.resources) && + Objects.equals(this.version, homeDashboard.version) && + Objects.equals(this.hideDashboardToolbar, homeDashboard.hideDashboardToolbar); + } + + @Override + public int hashCode() { + return Objects.hash(id, createdTime, tenantId, customerId, ownerId, title, name, image, assignedCustomers, mobileHide, mobileOrder, _configuration, resources, version, hideDashboardToolbar); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HomeDashboard {\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(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" hideDashboardToolbar: ").append(toIndentedString(hideDashboardToolbar)).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(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())))); + } + + // 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 `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 `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 + if (getVersion() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sversion%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getVersion())))); + } + + // add `hideDashboardToolbar` to the URL query string + if (getHideDashboardToolbar() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%shideDashboardToolbar%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHideDashboardToolbar())))); + } + + return joiner.toString(); + } +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/MistralAiChatModelConfig.java b/pe/src/main/java/org/thingsboard/client/model/MistralAiChatModelConfig.java index 0172ea4f..4d4284b8 100644 --- a/pe/src/main/java/org/thingsboard/client/model/MistralAiChatModelConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/MistralAiChatModelConfig.java @@ -45,7 +45,6 @@ * MistralAiChatModelConfig */ @JsonPropertyOrder({ - MistralAiChatModelConfig.JSON_PROPERTY_MODEL_TYPE, MistralAiChatModelConfig.JSON_PROPERTY_PROVIDER_CONFIG, MistralAiChatModelConfig.JSON_PROPERTY_MODEL_ID, MistralAiChatModelConfig.JSON_PROPERTY_TEMPERATURE, @@ -54,7 +53,8 @@ MistralAiChatModelConfig.JSON_PROPERTY_PRESENCE_PENALTY, MistralAiChatModelConfig.JSON_PROPERTY_MAX_OUTPUT_TOKENS, MistralAiChatModelConfig.JSON_PROPERTY_TIMEOUT_SECONDS, - MistralAiChatModelConfig.JSON_PROPERTY_MAX_RETRIES + MistralAiChatModelConfig.JSON_PROPERTY_MAX_RETRIES, + MistralAiChatModelConfig.JSON_PROPERTY_MODEL_TYPE }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,10 +64,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "provider", visible = true) public class MistralAiChatModelConfig extends AiModelConfig { - public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; - @Nullable - private AiModelType modelType; - public static final String JSON_PROPERTY_PROVIDER_CONFIG = "providerConfig"; @Nonnull private MistralAiProviderConfig providerConfig; @@ -104,6 +100,10 @@ public class MistralAiChatModelConfig extends AiModelConfig { @Nullable private Integer maxRetries; + public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; + @Nullable + private AiModelType modelType; + public MistralAiChatModelConfig() { } @@ -115,20 +115,6 @@ public MistralAiChatModelConfig( this.modelType = modelType; } - /** - * Get modelType - * @return modelType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AiModelType getModelType() { - return modelType; - } - - - - public MistralAiChatModelConfig providerConfig(@Nonnull MistralAiProviderConfig providerConfig) { this.providerConfig = providerConfig; return this; @@ -346,6 +332,20 @@ public void setMaxRetries(@Nullable Integer maxRetries) { } + /** + * Get modelType + * @return modelType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiModelType getModelType() { + return modelType; + } + + + + /** * Return true if this MistralAiChatModelConfig object is equal to o. */ @@ -358,8 +358,7 @@ public boolean equals(Object o) { return false; } MistralAiChatModelConfig mistralAiChatModelConfig = (MistralAiChatModelConfig) o; - return Objects.equals(this.modelType, mistralAiChatModelConfig.modelType) && - Objects.equals(this.providerConfig, mistralAiChatModelConfig.providerConfig) && + return Objects.equals(this.providerConfig, mistralAiChatModelConfig.providerConfig) && Objects.equals(this.modelId, mistralAiChatModelConfig.modelId) && Objects.equals(this.temperature, mistralAiChatModelConfig.temperature) && Objects.equals(this.topP, mistralAiChatModelConfig.topP) && @@ -368,12 +367,13 @@ public boolean equals(Object o) { Objects.equals(this.maxOutputTokens, mistralAiChatModelConfig.maxOutputTokens) && Objects.equals(this.timeoutSeconds, mistralAiChatModelConfig.timeoutSeconds) && Objects.equals(this.maxRetries, mistralAiChatModelConfig.maxRetries) && + Objects.equals(this.modelType, mistralAiChatModelConfig.modelType) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(modelType, providerConfig, modelId, temperature, topP, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, super.hashCode()); + return Objects.hash(providerConfig, modelId, temperature, topP, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, modelType, super.hashCode()); } @Override @@ -381,7 +381,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MistralAiChatModelConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append(" providerConfig: ").append(toIndentedString(providerConfig)).append("\n"); sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); @@ -391,6 +390,7 @@ public String toString() { sb.append(" maxOutputTokens: ").append(toIndentedString(maxOutputTokens)).append("\n"); sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -443,11 +443,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); } - // add `modelType` to the URL query string - if (getModelType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); - } - // add `providerConfig` to the URL query string if (getProviderConfig() != null) { joiner.add(getProviderConfig().toUrlQueryString(prefix + "providerConfig" + suffix)); @@ -493,6 +488,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smaxRetries%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxRetries())))); } + // add `modelType` to the URL query string + if (getModelType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/OllamaChatModelConfig.java b/pe/src/main/java/org/thingsboard/client/model/OllamaChatModelConfig.java index bbd5708a..51ab5b4b 100644 --- a/pe/src/main/java/org/thingsboard/client/model/OllamaChatModelConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/OllamaChatModelConfig.java @@ -45,7 +45,6 @@ * OllamaChatModelConfig */ @JsonPropertyOrder({ - OllamaChatModelConfig.JSON_PROPERTY_MODEL_TYPE, OllamaChatModelConfig.JSON_PROPERTY_PROVIDER_CONFIG, OllamaChatModelConfig.JSON_PROPERTY_MODEL_ID, OllamaChatModelConfig.JSON_PROPERTY_TEMPERATURE, @@ -54,7 +53,8 @@ OllamaChatModelConfig.JSON_PROPERTY_CONTEXT_LENGTH, OllamaChatModelConfig.JSON_PROPERTY_MAX_OUTPUT_TOKENS, OllamaChatModelConfig.JSON_PROPERTY_TIMEOUT_SECONDS, - OllamaChatModelConfig.JSON_PROPERTY_MAX_RETRIES + OllamaChatModelConfig.JSON_PROPERTY_MAX_RETRIES, + OllamaChatModelConfig.JSON_PROPERTY_MODEL_TYPE }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,10 +64,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "provider", visible = true) public class OllamaChatModelConfig extends AiModelConfig { - public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; - @Nullable - private AiModelType modelType; - public static final String JSON_PROPERTY_PROVIDER_CONFIG = "providerConfig"; @Nonnull private OllamaProviderConfig providerConfig; @@ -104,6 +100,10 @@ public class OllamaChatModelConfig extends AiModelConfig { @Nullable private Integer maxRetries; + public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; + @Nullable + private AiModelType modelType; + public OllamaChatModelConfig() { } @@ -115,20 +115,6 @@ public OllamaChatModelConfig( this.modelType = modelType; } - /** - * Get modelType - * @return modelType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AiModelType getModelType() { - return modelType; - } - - - - public OllamaChatModelConfig providerConfig(@Nonnull OllamaProviderConfig providerConfig) { this.providerConfig = providerConfig; return this; @@ -346,6 +332,20 @@ public void setMaxRetries(@Nullable Integer maxRetries) { } + /** + * Get modelType + * @return modelType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiModelType getModelType() { + return modelType; + } + + + + /** * Return true if this OllamaChatModelConfig object is equal to o. */ @@ -358,8 +358,7 @@ public boolean equals(Object o) { return false; } OllamaChatModelConfig ollamaChatModelConfig = (OllamaChatModelConfig) o; - return Objects.equals(this.modelType, ollamaChatModelConfig.modelType) && - Objects.equals(this.providerConfig, ollamaChatModelConfig.providerConfig) && + return Objects.equals(this.providerConfig, ollamaChatModelConfig.providerConfig) && Objects.equals(this.modelId, ollamaChatModelConfig.modelId) && Objects.equals(this.temperature, ollamaChatModelConfig.temperature) && Objects.equals(this.topP, ollamaChatModelConfig.topP) && @@ -368,12 +367,13 @@ public boolean equals(Object o) { Objects.equals(this.maxOutputTokens, ollamaChatModelConfig.maxOutputTokens) && Objects.equals(this.timeoutSeconds, ollamaChatModelConfig.timeoutSeconds) && Objects.equals(this.maxRetries, ollamaChatModelConfig.maxRetries) && + Objects.equals(this.modelType, ollamaChatModelConfig.modelType) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(modelType, providerConfig, modelId, temperature, topP, topK, contextLength, maxOutputTokens, timeoutSeconds, maxRetries, super.hashCode()); + return Objects.hash(providerConfig, modelId, temperature, topP, topK, contextLength, maxOutputTokens, timeoutSeconds, maxRetries, modelType, super.hashCode()); } @Override @@ -381,7 +381,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OllamaChatModelConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append(" providerConfig: ").append(toIndentedString(providerConfig)).append("\n"); sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); @@ -391,6 +390,7 @@ public String toString() { sb.append(" maxOutputTokens: ").append(toIndentedString(maxOutputTokens)).append("\n"); sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -443,11 +443,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); } - // add `modelType` to the URL query string - if (getModelType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); - } - // add `providerConfig` to the URL query string if (getProviderConfig() != null) { joiner.add(getProviderConfig().toUrlQueryString(prefix + "providerConfig" + suffix)); @@ -493,6 +488,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smaxRetries%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxRetries())))); } + // add `modelType` to the URL query string + if (getModelType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/OpenAiChatModelConfig.java b/pe/src/main/java/org/thingsboard/client/model/OpenAiChatModelConfig.java index d24da389..20eefbf3 100644 --- a/pe/src/main/java/org/thingsboard/client/model/OpenAiChatModelConfig.java +++ b/pe/src/main/java/org/thingsboard/client/model/OpenAiChatModelConfig.java @@ -45,7 +45,6 @@ * OpenAiChatModelConfig */ @JsonPropertyOrder({ - OpenAiChatModelConfig.JSON_PROPERTY_MODEL_TYPE, OpenAiChatModelConfig.JSON_PROPERTY_PROVIDER_CONFIG, OpenAiChatModelConfig.JSON_PROPERTY_MODEL_ID, OpenAiChatModelConfig.JSON_PROPERTY_TEMPERATURE, @@ -54,7 +53,8 @@ OpenAiChatModelConfig.JSON_PROPERTY_PRESENCE_PENALTY, OpenAiChatModelConfig.JSON_PROPERTY_MAX_OUTPUT_TOKENS, OpenAiChatModelConfig.JSON_PROPERTY_TIMEOUT_SECONDS, - OpenAiChatModelConfig.JSON_PROPERTY_MAX_RETRIES + OpenAiChatModelConfig.JSON_PROPERTY_MAX_RETRIES, + OpenAiChatModelConfig.JSON_PROPERTY_MODEL_TYPE }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") @JsonIgnoreProperties( @@ -64,10 +64,6 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "provider", visible = true) public class OpenAiChatModelConfig extends AiModelConfig { - public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; - @Nullable - private AiModelType modelType; - public static final String JSON_PROPERTY_PROVIDER_CONFIG = "providerConfig"; @Nonnull private OpenAiProviderConfig providerConfig; @@ -104,6 +100,10 @@ public class OpenAiChatModelConfig extends AiModelConfig { @Nullable private Integer maxRetries; + public static final String JSON_PROPERTY_MODEL_TYPE = "modelType"; + @Nullable + private AiModelType modelType; + public OpenAiChatModelConfig() { } @@ -115,20 +115,6 @@ public OpenAiChatModelConfig( this.modelType = modelType; } - /** - * Get modelType - * @return modelType - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AiModelType getModelType() { - return modelType; - } - - - - public OpenAiChatModelConfig providerConfig(@Nonnull OpenAiProviderConfig providerConfig) { this.providerConfig = providerConfig; return this; @@ -346,6 +332,20 @@ public void setMaxRetries(@Nullable Integer maxRetries) { } + /** + * Get modelType + * @return modelType + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_MODEL_TYPE, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AiModelType getModelType() { + return modelType; + } + + + + /** * Return true if this OpenAiChatModelConfig object is equal to o. */ @@ -358,8 +358,7 @@ public boolean equals(Object o) { return false; } OpenAiChatModelConfig openAiChatModelConfig = (OpenAiChatModelConfig) o; - return Objects.equals(this.modelType, openAiChatModelConfig.modelType) && - Objects.equals(this.providerConfig, openAiChatModelConfig.providerConfig) && + return Objects.equals(this.providerConfig, openAiChatModelConfig.providerConfig) && Objects.equals(this.modelId, openAiChatModelConfig.modelId) && Objects.equals(this.temperature, openAiChatModelConfig.temperature) && Objects.equals(this.topP, openAiChatModelConfig.topP) && @@ -368,12 +367,13 @@ public boolean equals(Object o) { Objects.equals(this.maxOutputTokens, openAiChatModelConfig.maxOutputTokens) && Objects.equals(this.timeoutSeconds, openAiChatModelConfig.timeoutSeconds) && Objects.equals(this.maxRetries, openAiChatModelConfig.maxRetries) && + Objects.equals(this.modelType, openAiChatModelConfig.modelType) && super.equals(o); } @Override public int hashCode() { - return Objects.hash(modelType, providerConfig, modelId, temperature, topP, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, super.hashCode()); + return Objects.hash(providerConfig, modelId, temperature, topP, frequencyPenalty, presencePenalty, maxOutputTokens, timeoutSeconds, maxRetries, modelType, super.hashCode()); } @Override @@ -381,7 +381,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OpenAiChatModelConfig {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append(" providerConfig: ").append(toIndentedString(providerConfig)).append("\n"); sb.append(" modelId: ").append(toIndentedString(modelId)).append("\n"); sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n"); @@ -391,6 +390,7 @@ public String toString() { sb.append(" maxOutputTokens: ").append(toIndentedString(maxOutputTokens)).append("\n"); sb.append(" timeoutSeconds: ").append(toIndentedString(timeoutSeconds)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); + sb.append(" modelType: ").append(toIndentedString(modelType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -443,11 +443,6 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%sprovider%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getProvider())))); } - // add `modelType` to the URL query string - if (getModelType() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); - } - // add `providerConfig` to the URL query string if (getProviderConfig() != null) { joiner.add(getProviderConfig().toUrlQueryString(prefix + "providerConfig" + suffix)); @@ -493,6 +488,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%smaxRetries%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMaxRetries())))); } + // add `modelType` to the URL query string + if (getModelType() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smodelType%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getModelType())))); + } + return joiner.toString(); } static { diff --git a/pe/src/main/java/org/thingsboard/client/model/PageDataAlarmRuleDefinition.java b/pe/src/main/java/org/thingsboard/client/model/PageDataAlarmRuleDefinition.java new file mode 100644 index 00000000..48235de3 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/PageDataAlarmRuleDefinition.java @@ -0,0 +1,261 @@ +/** + * 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.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.thingsboard.client.model.AlarmRuleDefinition; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.ApiClient; +/** + * PageDataAlarmRuleDefinition + */ +@JsonPropertyOrder({ + PageDataAlarmRuleDefinition.JSON_PROPERTY_DATA, + PageDataAlarmRuleDefinition.JSON_PROPERTY_TOTAL_PAGES, + PageDataAlarmRuleDefinition.JSON_PROPERTY_TOTAL_ELEMENTS, + PageDataAlarmRuleDefinition.JSON_PROPERTY_HAS_NEXT +}) +@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class PageDataAlarmRuleDefinition { + public static final String JSON_PROPERTY_DATA = "data"; + @Nullable + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_PAGES = "totalPages"; + @Nullable + private Integer totalPages; + + public static final String JSON_PROPERTY_TOTAL_ELEMENTS = "totalElements"; + @Nullable + private Long totalElements; + + public static final String JSON_PROPERTY_HAS_NEXT = "hasNext"; + @Nullable + private Boolean hasNext; + + public PageDataAlarmRuleDefinition() { + } + + @JsonCreator + public PageDataAlarmRuleDefinition( + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) Integer totalPages, + @JsonProperty(JSON_PROPERTY_TOTAL_ELEMENTS) Long totalElements, + @JsonProperty(JSON_PROPERTY_HAS_NEXT) Boolean hasNext + ) { + this(); + this.totalPages = totalPages; + this.totalElements = totalElements; + this.hasNext = hasNext; + } + + public PageDataAlarmRuleDefinition data(@Nullable List data) { + this.data = data; + return this; + } + + public PageDataAlarmRuleDefinition addDataItem(AlarmRuleDefinition dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Array of the entities + * @return data + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + + @JsonProperty(value = JSON_PROPERTY_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(@Nullable List data) { + this.data = data; + } + + + /** + * Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria + * @return totalPages + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_TOTAL_PAGES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalPages() { + return totalPages; + } + + + + + /** + * Total number of elements in all available pages + * @return totalElements + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_TOTAL_ELEMENTS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalElements() { + return totalElements; + } + + + + + /** + * 'false' value indicates the end of the result set + * @return hasNext + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_HAS_NEXT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasNext() { + return hasNext; + } + + + + + /** + * Return true if this PageDataAlarmRuleDefinition object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageDataAlarmRuleDefinition pageDataAlarmRuleDefinition = (PageDataAlarmRuleDefinition) o; + return Objects.equals(this.data, pageDataAlarmRuleDefinition.data) && + Objects.equals(this.totalPages, pageDataAlarmRuleDefinition.totalPages) && + Objects.equals(this.totalElements, pageDataAlarmRuleDefinition.totalElements) && + Objects.equals(this.hasNext, pageDataAlarmRuleDefinition.hasNext); + } + + @Override + public int hashCode() { + return Objects.hash(data, totalPages, totalElements, hasNext); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageDataAlarmRuleDefinition {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" totalElements: ").append(toIndentedString(totalElements)).append("\n"); + sb.append(" hasNext: ").append(toIndentedString(hasNext)).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 `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `totalPages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stotalPages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `totalElements` to the URL query string + if (getTotalElements() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stotalElements%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalElements())))); + } + + // add `hasNext` to the URL query string + if (getHasNext() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%shasNext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHasNext())))); + } + + return joiner.toString(); + } +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/PageDataAlarmRuleDefinitionInfo.java b/pe/src/main/java/org/thingsboard/client/model/PageDataAlarmRuleDefinitionInfo.java new file mode 100644 index 00000000..53ae9de9 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/PageDataAlarmRuleDefinitionInfo.java @@ -0,0 +1,261 @@ +/** + * 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.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.thingsboard.client.model.AlarmRuleDefinitionInfo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.ApiClient; +/** + * PageDataAlarmRuleDefinitionInfo + */ +@JsonPropertyOrder({ + PageDataAlarmRuleDefinitionInfo.JSON_PROPERTY_DATA, + PageDataAlarmRuleDefinitionInfo.JSON_PROPERTY_TOTAL_PAGES, + PageDataAlarmRuleDefinitionInfo.JSON_PROPERTY_TOTAL_ELEMENTS, + PageDataAlarmRuleDefinitionInfo.JSON_PROPERTY_HAS_NEXT +}) +@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class PageDataAlarmRuleDefinitionInfo { + public static final String JSON_PROPERTY_DATA = "data"; + @Nullable + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL_PAGES = "totalPages"; + @Nullable + private Integer totalPages; + + public static final String JSON_PROPERTY_TOTAL_ELEMENTS = "totalElements"; + @Nullable + private Long totalElements; + + public static final String JSON_PROPERTY_HAS_NEXT = "hasNext"; + @Nullable + private Boolean hasNext; + + public PageDataAlarmRuleDefinitionInfo() { + } + + @JsonCreator + public PageDataAlarmRuleDefinitionInfo( + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) Integer totalPages, + @JsonProperty(JSON_PROPERTY_TOTAL_ELEMENTS) Long totalElements, + @JsonProperty(JSON_PROPERTY_HAS_NEXT) Boolean hasNext + ) { + this(); + this.totalPages = totalPages; + this.totalElements = totalElements; + this.hasNext = hasNext; + } + + public PageDataAlarmRuleDefinitionInfo data(@Nullable List data) { + this.data = data; + return this; + } + + public PageDataAlarmRuleDefinitionInfo addDataItem(AlarmRuleDefinitionInfo dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Array of the entities + * @return data + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + + @JsonProperty(value = JSON_PROPERTY_DATA, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(@Nullable List data) { + this.data = data; + } + + + /** + * Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria + * @return totalPages + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_TOTAL_PAGES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotalPages() { + return totalPages; + } + + + + + /** + * Total number of elements in all available pages + * @return totalElements + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_TOTAL_ELEMENTS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalElements() { + return totalElements; + } + + + + + /** + * 'false' value indicates the end of the result set + * @return hasNext + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_HAS_NEXT, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHasNext() { + return hasNext; + } + + + + + /** + * Return true if this PageDataAlarmRuleDefinitionInfo object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageDataAlarmRuleDefinitionInfo pageDataAlarmRuleDefinitionInfo = (PageDataAlarmRuleDefinitionInfo) o; + return Objects.equals(this.data, pageDataAlarmRuleDefinitionInfo.data) && + Objects.equals(this.totalPages, pageDataAlarmRuleDefinitionInfo.totalPages) && + Objects.equals(this.totalElements, pageDataAlarmRuleDefinitionInfo.totalElements) && + Objects.equals(this.hasNext, pageDataAlarmRuleDefinitionInfo.hasNext); + } + + @Override + public int hashCode() { + return Objects.hash(data, totalPages, totalElements, hasNext); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageDataAlarmRuleDefinitionInfo {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" totalElements: ").append(toIndentedString(totalElements)).append("\n"); + sb.append(" hasNext: ").append(toIndentedString(hasNext)).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 `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add(getData().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sdata%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `totalPages` to the URL query string + if (getTotalPages() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stotalPages%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalPages())))); + } + + // add `totalElements` to the URL query string + if (getTotalElements() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%stotalElements%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTotalElements())))); + } + + // add `hasNext` to the URL query string + if (getHasNext() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%shasNext%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHasNext())))); + } + + return joiner.toString(); + } +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/RepeatingAlarmConditionSpec.java b/pe/src/main/java/org/thingsboard/client/model/RepeatingAlarmConditionSpec.java deleted file mode 100644 index 5b85d41f..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/RepeatingAlarmConditionSpec.java +++ /dev/null @@ -1,180 +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 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.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 org.thingsboard.client.model.AlarmConditionSpec; -import org.thingsboard.client.model.FilterPredicateValueInteger; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.JSON; -import org.thingsboard.client.ApiClient; -/** - * RepeatingAlarmConditionSpec - */ -@JsonPropertyOrder({ - RepeatingAlarmConditionSpec.JSON_PROPERTY_PREDICATE -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) - -public class RepeatingAlarmConditionSpec extends AlarmConditionSpec { - public static final String JSON_PROPERTY_PREDICATE = "predicate"; - @Nullable - private FilterPredicateValueInteger predicate; - - public RepeatingAlarmConditionSpec() { - } - - public RepeatingAlarmConditionSpec predicate(@Nullable FilterPredicateValueInteger predicate) { - this.predicate = predicate; - return this; - } - - /** - * Repeating predicate - * @return predicate - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_PREDICATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FilterPredicateValueInteger getPredicate() { - return predicate; - } - - - @JsonProperty(value = JSON_PROPERTY_PREDICATE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPredicate(@Nullable FilterPredicateValueInteger predicate) { - this.predicate = predicate; - } - - - /** - * Return true if this RepeatingAlarmConditionSpec object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RepeatingAlarmConditionSpec repeatingAlarmConditionSpec = (RepeatingAlarmConditionSpec) o; - return Objects.equals(this.predicate, repeatingAlarmConditionSpec.predicate) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(predicate, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RepeatingAlarmConditionSpec {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" predicate: ").append(toIndentedString(predicate)).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 `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 `predicate` to the URL query string - if (getPredicate() != null) { - joiner.add(getPredicate().toUrlQueryString(prefix + "predicate" + suffix)); - } - - return joiner.toString(); - } -static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap>(); - mappings.put("RepeatingAlarmConditionSpec", RepeatingAlarmConditionSpec.class); - JSON.registerDiscriminator(RepeatingAlarmConditionSpec.class, "type", mappings); -} -} - 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 085ab96b..bc30c4a9 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Role.java +++ b/pe/src/main/java/org/thingsboard/client/model/Role.java @@ -51,6 +51,7 @@ Role.JSON_PROPERTY_NAME, Role.JSON_PROPERTY_TYPE, Role.JSON_PROPERTY_PERMISSIONS, + Role.JSON_PROPERTY_EXCLUDED_PERMISSIONS, Role.JSON_PROPERTY_VERSION, Role.JSON_PROPERTY_OWNER_ID }) @@ -69,7 +70,7 @@ public class Role { private com.fasterxml.jackson.databind.JsonNode additionalInfo; public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; - @Nonnull + @Nullable private TenantId tenantId; public static final String JSON_PROPERTY_CUSTOMER_ID = "customerId"; @@ -86,7 +87,11 @@ public class Role { public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; @Nullable - private com.fasterxml.jackson.databind.JsonNode permissions = null; + private com.fasterxml.jackson.databind.JsonNode permissions; + + public static final String JSON_PROPERTY_EXCLUDED_PERMISSIONS = "excludedPermissions"; + @Nullable + private com.fasterxml.jackson.databind.JsonNode excludedPermissions; public static final String JSON_PROPERTY_VERSION = "version"; @Nullable @@ -104,12 +109,16 @@ public Role( @JsonProperty(JSON_PROPERTY_CREATED_TIME) Long createdTime, @JsonProperty(JSON_PROPERTY_TENANT_ID) TenantId tenantId, @JsonProperty(JSON_PROPERTY_CUSTOMER_ID) CustomerId customerId, + @JsonProperty(JSON_PROPERTY_PERMISSIONS) com.fasterxml.jackson.databind.JsonNode permissions, + @JsonProperty(JSON_PROPERTY_EXCLUDED_PERMISSIONS) com.fasterxml.jackson.databind.JsonNode excludedPermissions, @JsonProperty(JSON_PROPERTY_OWNER_ID) EntityId ownerId ) { this(); this.createdTime = createdTime; this.tenantId = tenantId; this.customerId = customerId; + this.permissions = permissions; + this.excludedPermissions = excludedPermissions; this.ownerId = ownerId; } @@ -179,9 +188,9 @@ public void setAdditionalInfo(@Nullable com.fasterxml.jackson.databind.JsonNode * JSON object with Tenant Id. * @return tenantId */ - @Nonnull - @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = true) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @Nullable + @JsonProperty(value = JSON_PROPERTY_TENANT_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public TenantId getTenantId() { return tenantId; } @@ -251,13 +260,8 @@ public void setType(@Nonnull RoleType type) { } - public Role permissions(@Nullable com.fasterxml.jackson.databind.JsonNode permissions) { - this.permissions = permissions; - return this; - } - /** - * Get permissions + * JSON object with the set of permissions. Structure is specific for role type * @return permissions */ @Nullable @@ -268,13 +272,22 @@ public com.fasterxml.jackson.databind.JsonNode getPermissions() { } - @JsonProperty(value = JSON_PROPERTY_PERMISSIONS, required = false) + + + /** + * JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions + * @return excludedPermissions + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_EXCLUDED_PERMISSIONS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPermissions(@Nullable com.fasterxml.jackson.databind.JsonNode permissions) { - this.permissions = permissions; + public com.fasterxml.jackson.databind.JsonNode getExcludedPermissions() { + return excludedPermissions; } + + public Role version(@Nullable Long version) { this.version = version; return this; @@ -333,13 +346,14 @@ public boolean equals(Object o) { Objects.equals(this.name, role.name) && Objects.equals(this.type, role.type) && Objects.equals(this.permissions, role.permissions) && + Objects.equals(this.excludedPermissions, role.excludedPermissions) && Objects.equals(this.version, role.version) && Objects.equals(this.ownerId, role.ownerId); } @Override public int hashCode() { - return Objects.hash(id, createdTime, additionalInfo, tenantId, customerId, name, type, permissions, version, ownerId); + return Objects.hash(id, createdTime, additionalInfo, tenantId, customerId, name, type, permissions, excludedPermissions, version, ownerId); } @Override @@ -354,6 +368,7 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" excludedPermissions: ").append(toIndentedString(excludedPermissions)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append("}"); @@ -443,6 +458,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spermissions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPermissions())))); } + // add `excludedPermissions` to the URL query string + if (getExcludedPermissions() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sexcludedPermissions%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getExcludedPermissions())))); + } + // 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/RuleChainMetaData.java b/pe/src/main/java/org/thingsboard/client/model/RuleChainMetaData.java index 5356f0f7..17ba1d11 100644 --- a/pe/src/main/java/org/thingsboard/client/model/RuleChainMetaData.java +++ b/pe/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/pe/src/main/java/org/thingsboard/client/model/RuleChainNote.java b/pe/src/main/java/org/thingsboard/client/model/RuleChainNote.java new file mode 100644 index 00000000..13dd34b3 --- /dev/null +++ b/pe/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(); + } +} + 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 f0063304..c7e32212 100644 --- a/pe/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java +++ b/pe/src/main/java/org/thingsboard/client/model/ShortCustomerInfo.java @@ -40,7 +40,7 @@ @JsonPropertyOrder({ ShortCustomerInfo.JSON_PROPERTY_CUSTOMER_ID, ShortCustomerInfo.JSON_PROPERTY_TITLE, - ShortCustomerInfo.JSON_PROPERTY_IS_PUBLIC + ShortCustomerInfo.JSON_PROPERTY_PUBLIC }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") public class ShortCustomerInfo { @@ -52,9 +52,9 @@ public class ShortCustomerInfo { @Nullable private String title; - public static final String JSON_PROPERTY_IS_PUBLIC = "isPublic"; + public static final String JSON_PROPERTY_PUBLIC = "public"; @Nullable - private Boolean isPublic; + private Boolean _public; public ShortCustomerInfo() { } @@ -107,27 +107,27 @@ public void setTitle(@Nullable String title) { } - public ShortCustomerInfo isPublic(@Nullable Boolean isPublic) { - this.isPublic = isPublic; + public ShortCustomerInfo _public(@Nullable Boolean _public) { + this._public = _public; return this; } /** * Indicates special 'Public' customer used to embed dashboards on public websites. - * @return isPublic + * @return _public */ @Nullable - @JsonProperty(value = JSON_PROPERTY_IS_PUBLIC, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsPublic() { - return isPublic; + public Boolean getPublic() { + return _public; } - @JsonProperty(value = JSON_PROPERTY_IS_PUBLIC, required = false) + @JsonProperty(value = JSON_PROPERTY_PUBLIC, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPublic(@Nullable Boolean isPublic) { - this.isPublic = isPublic; + public void setPublic(@Nullable Boolean _public) { + this._public = _public; } @@ -145,12 +145,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); } @Override public int hashCode() { - return Objects.hash(customerId, title, isPublic); + return Objects.hash(customerId, title, _public); } @Override @@ -159,7 +159,7 @@ public String toString() { sb.append("class ShortCustomerInfo {\n"); 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(); } @@ -217,9 +217,9 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%stitle%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); } - // add `isPublic` to the URL query string - if (getIsPublic() != null) { - 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/SimpleAlarmConditionSpec.java b/pe/src/main/java/org/thingsboard/client/model/SimpleAlarmConditionSpec.java deleted file mode 100644 index e20fa7d5..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/SimpleAlarmConditionSpec.java +++ /dev/null @@ -1,141 +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 javax.annotation.Generated; -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 org.thingsboard.client.model.AlarmConditionSpec; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.JSON; -import org.thingsboard.client.ApiClient; -/** - * SimpleAlarmConditionSpec - */ -@JsonPropertyOrder({ -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) - -public class SimpleAlarmConditionSpec extends AlarmConditionSpec { - public SimpleAlarmConditionSpec() { - } - - /** - * Return true if this SimpleAlarmConditionSpec 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 SimpleAlarmConditionSpec {\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 `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())))); - } - - return joiner.toString(); - } -static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap>(); - mappings.put("SimpleAlarmConditionSpec", SimpleAlarmConditionSpec.class); - JSON.registerDiscriminator(SimpleAlarmConditionSpec.class, "type", mappings); -} -} - diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmConditionSpec.java b/pe/src/main/java/org/thingsboard/client/model/SolutionData.java similarity index 56% rename from pe/src/main/java/org/thingsboard/client/model/AlarmConditionSpec.java rename to pe/src/main/java/org/thingsboard/client/model/SolutionData.java index 3b97c290..76e32afa 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmConditionSpec.java +++ b/pe/src/main/java/org/thingsboard/client/model/SolutionData.java @@ -23,72 +23,69 @@ 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.HashMap; +import java.util.List; +import java.util.Map; +import org.thingsboard.client.model.EntityExportData; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.thingsboard.client.JSON; import org.thingsboard.client.ApiClient; /** - * Specification for alarm conditions + * Portable solution package containing exported entities grouped by type. Represents a self-contained snapshot that can be imported into another tenant. */ @JsonPropertyOrder({ - AlarmConditionSpec.JSON_PROPERTY_TYPE + SolutionData.JSON_PROPERTY_ENTITIES }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = DurationAlarmConditionSpec.class, name = "DURATION"), - @JsonSubTypes.Type(value = RepeatingAlarmConditionSpec.class, name = "REPEATING"), - @JsonSubTypes.Type(value = SimpleAlarmConditionSpec.class, name = "SIMPLE"), -}) - -public class AlarmConditionSpec { - public static final String JSON_PROPERTY_TYPE = "type"; +public class SolutionData { + public static final String JSON_PROPERTY_ENTITIES = "entities"; @Nonnull - private String type; + private Map> entities = new HashMap<>(); - public AlarmConditionSpec() { + public SolutionData() { } - public AlarmConditionSpec type(@Nonnull String type) { - this.type = type; + public SolutionData entities(@Nonnull Map> entities) { + this.entities = entities; + return this; + } + + public SolutionData putEntitiesItem(String key, List entitiesItem) { + if (this.entities == null) { + this.entities = new HashMap<>(); + } + this.entities.put(key, entitiesItem); return this; } /** - * Get type - * @return type + * Exported entities grouped by entity type. Each key is an entity type (e.g. DEVICE_PROFILE, RULE_CHAIN) and the value is a list of entity export data objects. + * @return entities */ @Nonnull - @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) + @JsonProperty(value = JSON_PROPERTY_ENTITIES, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; + public Map> getEntities() { + return entities; } - @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) + @JsonProperty(value = JSON_PROPERTY_ENTITIES, required = true) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(@Nonnull String type) { - this.type = type; + public void setEntities(@Nonnull Map> entities) { + this.entities = entities; } /** - * Return true if this AlarmConditionSpec object is equal to o. + * Return true if this SolutionData object is equal to o. */ @Override public boolean equals(Object o) { @@ -98,20 +95,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AlarmConditionSpec alarmConditionSpec = (AlarmConditionSpec) o; - return Objects.equals(this.type, alarmConditionSpec.type); + SolutionData solutionData = (SolutionData) o; + return Objects.equals(this.entities, solutionData.entities); } @Override public int hashCode() { - return Objects.hash(type); + return Objects.hash(entities); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AlarmConditionSpec {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("class SolutionData {\n"); + sb.append(" entities: ").append(toIndentedString(entities)).append("\n"); sb.append("}"); return sb.toString(); } @@ -159,21 +156,16 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // 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 `entities` to the URL query string + if (getEntities() != null) { + for (String _key : getEntities().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentities%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getEntities().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEntities().get(_key))))); + } } return joiner.toString(); } -static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap>(); - mappings.put("DURATION", DurationAlarmConditionSpec.class); - mappings.put("REPEATING", RepeatingAlarmConditionSpec.class); - mappings.put("SIMPLE", SimpleAlarmConditionSpec.class); - mappings.put("AlarmConditionSpec", AlarmConditionSpec.class); - JSON.registerDiscriminator(AlarmConditionSpec.class, "type", mappings); -} } diff --git a/pe/src/main/java/org/thingsboard/client/model/SolutionExportRequest.java b/pe/src/main/java/org/thingsboard/client/model/SolutionExportRequest.java new file mode 100644 index 00000000..0fdf1cf7 --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/SolutionExportRequest.java @@ -0,0 +1,212 @@ +/** + * 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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.Arrays; +import java.util.LinkedHashSet; +import java.util.Set; +import org.thingsboard.client.model.EntityExportSettings; +import org.thingsboard.client.model.EntityId; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.ApiClient; +/** + * Solution export request specifying which entities to include and export settings. + */ +@JsonPropertyOrder({ + SolutionExportRequest.JSON_PROPERTY_ENTITY_IDS, + SolutionExportRequest.JSON_PROPERTY_SETTINGS +}) +@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class SolutionExportRequest { + public static final String JSON_PROPERTY_ENTITY_IDS = "entityIds"; + @Nullable + private Set entityIds = new LinkedHashSet<>(); + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + @Nullable + private EntityExportSettings settings; + + public SolutionExportRequest() { + } + + public SolutionExportRequest entityIds(@Nullable Set entityIds) { + this.entityIds = entityIds; + return this; + } + + public SolutionExportRequest addEntityIdsItem(EntityId entityIdsItem) { + if (this.entityIds == null) { + this.entityIds = new LinkedHashSet<>(); + } + this.entityIds.add(entityIdsItem); + return this; + } + + /** + * Get entityIds + * @return entityIds + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Set getEntityIds() { + return entityIds; + } + + + @JsonDeserialize(as = LinkedHashSet.class) + @JsonProperty(value = JSON_PROPERTY_ENTITY_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntityIds(@Nullable Set entityIds) { + this.entityIds = entityIds; + } + + + public SolutionExportRequest settings(@Nullable EntityExportSettings settings) { + this.settings = settings; + return this; + } + + /** + * Optional export settings controlling what additional data is included (relations, attributes, credentials, etc.). If not specified, default settings will be used that include all available data. + * @return settings + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_SETTINGS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityExportSettings getSettings() { + return settings; + } + + + @JsonProperty(value = JSON_PROPERTY_SETTINGS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSettings(@Nullable EntityExportSettings settings) { + this.settings = settings; + } + + + /** + * Return true if this SolutionExportRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SolutionExportRequest solutionExportRequest = (SolutionExportRequest) o; + return Objects.equals(this.entityIds, solutionExportRequest.entityIds) && + Objects.equals(this.settings, solutionExportRequest.settings); + } + + @Override + public int hashCode() { + return Objects.hash(entityIds, settings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SolutionExportRequest {\n"); + sb.append(" entityIds: ").append(toIndentedString(entityIds)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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 `entityIds` to the URL query string + if (getEntityIds() != null) { + int i = 0; + for (EntityId _item : getEntityIds()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format(java.util.Locale.ROOT, "%sentityIds%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + + // add `settings` to the URL query string + if (getSettings() != null) { + joiner.add(getSettings().toUrlQueryString(prefix + "settings" + suffix)); + } + + return joiner.toString(); + } +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmConditionFilterKey.java b/pe/src/main/java/org/thingsboard/client/model/SolutionExportResponse.java similarity index 51% rename from pe/src/main/java/org/thingsboard/client/model/AlarmConditionFilterKey.java rename to pe/src/main/java/org/thingsboard/client/model/SolutionExportResponse.java index e3fc6887..67dbcd50 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmConditionFilterKey.java +++ b/pe/src/main/java/org/thingsboard/client/model/SolutionExportResponse.java @@ -28,82 +28,92 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; import java.util.Arrays; -import org.thingsboard.client.model.AlarmConditionKeyType; +import java.util.List; +import org.thingsboard.client.model.SolutionData; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import org.thingsboard.client.ApiClient; /** - * AlarmConditionFilterKey + * Solution export response containing the exported solution data and any dependency warnings. */ @JsonPropertyOrder({ - AlarmConditionFilterKey.JSON_PROPERTY_TYPE, - AlarmConditionFilterKey.JSON_PROPERTY_KEY + SolutionExportResponse.JSON_PROPERTY_SOLUTION, + SolutionExportResponse.JSON_PROPERTY_WARNINGS }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AlarmConditionFilterKey { - public static final String JSON_PROPERTY_TYPE = "type"; +public class SolutionExportResponse { + public static final String JSON_PROPERTY_SOLUTION = "solution"; @Nullable - private AlarmConditionKeyType type; + private SolutionData solution; - public static final String JSON_PROPERTY_KEY = "key"; + public static final String JSON_PROPERTY_WARNINGS = "warnings"; @Nullable - private String key; + private List warnings = new ArrayList<>(); - public AlarmConditionFilterKey() { + public SolutionExportResponse() { } - public AlarmConditionFilterKey type(@Nullable AlarmConditionKeyType type) { - this.type = type; + public SolutionExportResponse solution(@Nullable SolutionData solution) { + this.solution = solution; return this; } /** - * The key type - * @return type + * The exported solution data containing all requested entities grouped by type. + * @return solution */ @Nullable - @JsonProperty(value = JSON_PROPERTY_TYPE, required = false) + @JsonProperty(value = JSON_PROPERTY_SOLUTION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AlarmConditionKeyType getType() { - return type; + public SolutionData getSolution() { + return solution; } - @JsonProperty(value = JSON_PROPERTY_TYPE, required = false) + @JsonProperty(value = JSON_PROPERTY_SOLUTION, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(@Nullable AlarmConditionKeyType type) { - this.type = type; + public void setSolution(@Nullable SolutionData solution) { + this.solution = solution; } - public AlarmConditionFilterKey key(@Nullable String key) { - this.key = key; + public SolutionExportResponse warnings(@Nullable List warnings) { + this.warnings = warnings; + return this; + } + + public SolutionExportResponse addWarningsItem(String warningsItem) { + if (this.warnings == null) { + this.warnings = new ArrayList<>(); + } + this.warnings.add(warningsItem); return this; } /** - * String value representing the key - * @return key + * List of dependency warnings. Generated when exported entities reference other entities that are not included in the export (e.g. a device profile references a rule chain that was not selected for export). + * @return warnings */ @Nullable - @JsonProperty(value = JSON_PROPERTY_KEY, required = false) + @JsonProperty(value = JSON_PROPERTY_WARNINGS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getKey() { - return key; + public List getWarnings() { + return warnings; } - @JsonProperty(value = JSON_PROPERTY_KEY, required = false) + @JsonProperty(value = JSON_PROPERTY_WARNINGS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKey(@Nullable String key) { - this.key = key; + public void setWarnings(@Nullable List warnings) { + this.warnings = warnings; } /** - * Return true if this AlarmConditionFilterKey object is equal to o. + * Return true if this SolutionExportResponse object is equal to o. */ @Override public boolean equals(Object o) { @@ -113,22 +123,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AlarmConditionFilterKey alarmConditionFilterKey = (AlarmConditionFilterKey) o; - return Objects.equals(this.type, alarmConditionFilterKey.type) && - Objects.equals(this.key, alarmConditionFilterKey.key); + SolutionExportResponse solutionExportResponse = (SolutionExportResponse) o; + return Objects.equals(this.solution, solutionExportResponse.solution) && + Objects.equals(this.warnings, solutionExportResponse.warnings); } @Override public int hashCode() { - return Objects.hash(type, key); + return Objects.hash(solution, warnings); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AlarmConditionFilterKey {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append("class SolutionExportResponse {\n"); + sb.append(" solution: ").append(toIndentedString(solution)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); sb.append("}"); return sb.toString(); } @@ -176,14 +186,18 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // 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 `solution` to the URL query string + if (getSolution() != null) { + joiner.add(getSolution().toUrlQueryString(prefix + "solution" + suffix)); } - // add `key` to the URL query string - if (getKey() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%skey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getKey())))); + // add `warnings` to the URL query string + if (getWarnings() != null) { + for (int i = 0; i < getWarnings().size(); i++) { + joiner.add(String.format(java.util.Locale.ROOT, "%swarnings%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getWarnings().get(i))))); + } } return joiner.toString(); diff --git a/pe/src/main/java/org/thingsboard/client/model/AlarmCondition.java b/pe/src/main/java/org/thingsboard/client/model/SolutionImportResult.java similarity index 53% rename from pe/src/main/java/org/thingsboard/client/model/AlarmCondition.java rename to pe/src/main/java/org/thingsboard/client/model/SolutionImportResult.java index 1252f57a..c93e258d 100644 --- a/pe/src/main/java/org/thingsboard/client/model/AlarmCondition.java +++ b/pe/src/main/java/org/thingsboard/client/model/SolutionImportResult.java @@ -28,93 +28,91 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; -import org.thingsboard.client.model.AlarmConditionFilter; -import org.thingsboard.client.model.AlarmConditionSpec; +import java.util.HashMap; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import org.thingsboard.client.ApiClient; /** - * AlarmCondition + * Result of a solution import operation. */ @JsonPropertyOrder({ - AlarmCondition.JSON_PROPERTY_CONDITION, - AlarmCondition.JSON_PROPERTY_SPEC + SolutionImportResult.JSON_PROPERTY_SUCCESS, + SolutionImportResult.JSON_PROPERTY_CREATED }) @Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -public class AlarmCondition { - public static final String JSON_PROPERTY_CONDITION = "condition"; +public class SolutionImportResult { + public static final String JSON_PROPERTY_SUCCESS = "success"; @Nullable - private List condition = new ArrayList<>(); + private Boolean success; - public static final String JSON_PROPERTY_SPEC = "spec"; + public static final String JSON_PROPERTY_CREATED = "created"; @Nullable - private AlarmConditionSpec spec; - - public AlarmCondition() { - } + private Map created = new HashMap<>(); - public AlarmCondition condition(@Nullable List condition) { - this.condition = condition; - return this; + public SolutionImportResult() { } - public AlarmCondition addConditionItem(AlarmConditionFilter conditionItem) { - if (this.condition == null) { - this.condition = new ArrayList<>(); - } - this.condition.add(conditionItem); + public SolutionImportResult success(@Nullable Boolean success) { + this.success = success; return this; } /** - * Get condition - * @return condition + * 'true' if all entities were imported successfully. + * @return success */ @Nullable - @JsonProperty(value = JSON_PROPERTY_CONDITION, required = false) + @JsonProperty(value = JSON_PROPERTY_SUCCESS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCondition() { - return condition; + public Boolean getSuccess() { + return success; } - @JsonProperty(value = JSON_PROPERTY_CONDITION, required = false) + @JsonProperty(value = JSON_PROPERTY_SUCCESS, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCondition(@Nullable List condition) { - this.condition = condition; + public void setSuccess(@Nullable Boolean success) { + this.success = success; } - public AlarmCondition spec(@Nullable AlarmConditionSpec spec) { - this.spec = spec; + public SolutionImportResult created(@Nullable Map created) { + this.created = created; + return this; + } + + public SolutionImportResult putCreatedItem(String key, Integer createdItem) { + if (this.created == null) { + this.created = new HashMap<>(); + } + this.created.put(key, createdItem); return this; } /** - * JSON object representing alarm condition type - * @return spec + * Number of newly created entities per entity type. Entity types with zero created entities are omitted. + * @return created */ @Nullable - @JsonProperty(value = JSON_PROPERTY_SPEC, required = false) + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AlarmConditionSpec getSpec() { - return spec; + public Map getCreated() { + return created; } - @JsonProperty(value = JSON_PROPERTY_SPEC, required = false) + @JsonProperty(value = JSON_PROPERTY_CREATED, required = false) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSpec(@Nullable AlarmConditionSpec spec) { - this.spec = spec; + public void setCreated(@Nullable Map created) { + this.created = created; } /** - * Return true if this AlarmCondition object is equal to o. + * Return true if this SolutionImportResult object is equal to o. */ @Override public boolean equals(Object o) { @@ -124,22 +122,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AlarmCondition alarmCondition = (AlarmCondition) o; - return Objects.equals(this.condition, alarmCondition.condition) && - Objects.equals(this.spec, alarmCondition.spec); + SolutionImportResult solutionImportResult = (SolutionImportResult) o; + return Objects.equals(this.success, solutionImportResult.success) && + Objects.equals(this.created, solutionImportResult.created); } @Override public int hashCode() { - return Objects.hash(condition, spec); + return Objects.hash(success, created); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AlarmCondition {\n"); - sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); - sb.append(" spec: ").append(toIndentedString(spec)).append("\n"); + sb.append("class SolutionImportResult {\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); sb.append("}"); return sb.toString(); } @@ -187,19 +185,18 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `condition` to the URL query string - if (getCondition() != null) { - for (int i = 0; i < getCondition().size(); i++) { - if (getCondition().get(i) != null) { - joiner.add(getCondition().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scondition%s%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); - } - } + // add `success` to the URL query string + if (getSuccess() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%ssuccess%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSuccess())))); } - // add `spec` to the URL query string - if (getSpec() != null) { - joiner.add(getSpec().toUrlQueryString(prefix + "spec" + suffix)); + // add `created` to the URL query string + if (getCreated() != null) { + for (String _key : getCreated().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%screated%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getCreated().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getCreated().get(_key))))); + } } return joiner.toString(); diff --git a/pe/src/main/java/org/thingsboard/client/model/SolutionValidationResult.java b/pe/src/main/java/org/thingsboard/client/model/SolutionValidationResult.java new file mode 100644 index 00000000..013859ff --- /dev/null +++ b/pe/src/main/java/org/thingsboard/client/model/SolutionValidationResult.java @@ -0,0 +1,303 @@ +/** + * 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.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import org.thingsboard.client.ApiClient; +/** + * Result of a solution validation (dry-run). Checks structural validity and dependency references without modifying any data. + */ +@JsonPropertyOrder({ + SolutionValidationResult.JSON_PROPERTY_VALID, + SolutionValidationResult.JSON_PROPERTY_ENTITY_SUMMARY, + SolutionValidationResult.JSON_PROPERTY_CONFLICTS, + SolutionValidationResult.JSON_PROPERTY_WARNINGS +}) +@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") +public class SolutionValidationResult { + public static final String JSON_PROPERTY_VALID = "valid"; + @Nullable + private Boolean valid; + + public static final String JSON_PROPERTY_ENTITY_SUMMARY = "entitySummary"; + @Nullable + private Map entitySummary = new HashMap<>(); + + public static final String JSON_PROPERTY_CONFLICTS = "conflicts"; + @Nullable + private List conflicts = new ArrayList<>(); + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + @Nullable + private List warnings = new ArrayList<>(); + + public SolutionValidationResult() { + } + + public SolutionValidationResult valid(@Nullable Boolean valid) { + this.valid = valid; + return this; + } + + /** + * 'true' if the solution can be imported without errors. 'false' if there are structural issues (empty entities, unsupported types, malformed data). + * @return valid + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_VALID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getValid() { + return valid; + } + + + @JsonProperty(value = JSON_PROPERTY_VALID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValid(@Nullable Boolean valid) { + this.valid = valid; + } + + + public SolutionValidationResult entitySummary(@Nullable Map entitySummary) { + this.entitySummary = entitySummary; + return this; + } + + public SolutionValidationResult putEntitySummaryItem(String key, Integer entitySummaryItem) { + if (this.entitySummary == null) { + this.entitySummary = new HashMap<>(); + } + this.entitySummary.put(key, entitySummaryItem); + return this; + } + + /** + * Number of entities per type found in the solution file. + * @return entitySummary + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_ENTITY_SUMMARY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getEntitySummary() { + return entitySummary; + } + + + @JsonProperty(value = JSON_PROPERTY_ENTITY_SUMMARY, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEntitySummary(@Nullable Map entitySummary) { + this.entitySummary = entitySummary; + } + + + public SolutionValidationResult conflicts(@Nullable List conflicts) { + this.conflicts = conflicts; + return this; + } + + public SolutionValidationResult addConflictsItem(String conflictsItem) { + if (this.conflicts == null) { + this.conflicts = new ArrayList<>(); + } + this.conflicts.add(conflictsItem); + return this; + } + + /** + * List of blocking issues that would prevent import (e.g. unsupported entity types, missing or malformed entity data). + * @return conflicts + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_CONFLICTS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConflicts() { + return conflicts; + } + + + @JsonProperty(value = JSON_PROPERTY_CONFLICTS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConflicts(@Nullable List conflicts) { + this.conflicts = conflicts; + } + + + public SolutionValidationResult warnings(@Nullable List warnings) { + this.warnings = warnings; + return this; + } + + public SolutionValidationResult addWarningsItem(String warningsItem) { + if (this.warnings == null) { + this.warnings = new ArrayList<>(); + } + this.warnings.add(warningsItem); + return this; + } + + /** + * List of non-blocking warnings (e.g. missing dependency references). + * @return warnings + */ + @Nullable + @JsonProperty(value = JSON_PROPERTY_WARNINGS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getWarnings() { + return warnings; + } + + + @JsonProperty(value = JSON_PROPERTY_WARNINGS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWarnings(@Nullable List warnings) { + this.warnings = warnings; + } + + + /** + * Return true if this SolutionValidationResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SolutionValidationResult solutionValidationResult = (SolutionValidationResult) o; + return Objects.equals(this.valid, solutionValidationResult.valid) && + Objects.equals(this.entitySummary, solutionValidationResult.entitySummary) && + Objects.equals(this.conflicts, solutionValidationResult.conflicts) && + Objects.equals(this.warnings, solutionValidationResult.warnings); + } + + @Override + public int hashCode() { + return Objects.hash(valid, entitySummary, conflicts, warnings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SolutionValidationResult {\n"); + sb.append(" valid: ").append(toIndentedString(valid)).append("\n"); + sb.append(" entitySummary: ").append(toIndentedString(entitySummary)).append("\n"); + sb.append(" conflicts: ").append(toIndentedString(conflicts)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).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 `valid` to the URL query string + if (getValid() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%svalid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValid())))); + } + + // add `entitySummary` to the URL query string + if (getEntitySummary() != null) { + for (String _key : getEntitySummary().keySet()) { + joiner.add(String.format(java.util.Locale.ROOT, "%sentitySummary%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, _key, containerSuffix), + getEntitySummary().get(_key), ApiClient.urlEncode(ApiClient.valueToString(getEntitySummary().get(_key))))); + } + } + + // add `conflicts` to the URL query string + if (getConflicts() != null) { + for (int i = 0; i < getConflicts().size(); i++) { + joiner.add(String.format(java.util.Locale.ROOT, "%sconflicts%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getConflicts().get(i))))); + } + } + + // add `warnings` to the URL query string + if (getWarnings() != null) { + for (int i = 0; i < getWarnings().size(); i++) { + joiner.add(String.format(java.util.Locale.ROOT, "%swarnings%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getWarnings().get(i))))); + } + } + + return joiner.toString(); + } +} + diff --git a/pe/src/main/java/org/thingsboard/client/model/SpecificTimeSchedule.java b/pe/src/main/java/org/thingsboard/client/model/SpecificTimeSchedule.java deleted file mode 100644 index 52357af7..00000000 --- a/pe/src/main/java/org/thingsboard/client/model/SpecificTimeSchedule.java +++ /dev/null @@ -1,318 +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 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.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 com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.Set; -import org.thingsboard.client.model.AlarmSchedule; -import org.thingsboard.client.model.AlarmScheduleType; -import org.thingsboard.client.model.DynamicValueString; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -import org.thingsboard.client.JSON; -import org.thingsboard.client.ApiClient; -/** - * SpecificTimeSchedule - */ -@JsonPropertyOrder({ - SpecificTimeSchedule.JSON_PROPERTY_DAYS_OF_WEEK, - SpecificTimeSchedule.JSON_PROPERTY_ENDS_ON, - SpecificTimeSchedule.JSON_PROPERTY_STARTS_ON, - SpecificTimeSchedule.JSON_PROPERTY_TIMEZONE -}) -@Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.20.0") -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) - -public class SpecificTimeSchedule extends AlarmSchedule { - public static final String JSON_PROPERTY_DAYS_OF_WEEK = "daysOfWeek"; - @Nullable - private Set daysOfWeek = new LinkedHashSet<>(); - - public static final String JSON_PROPERTY_ENDS_ON = "endsOn"; - @Nullable - private Long endsOn; - - public static final String JSON_PROPERTY_STARTS_ON = "startsOn"; - @Nullable - private Long startsOn; - - public static final String JSON_PROPERTY_TIMEZONE = "timezone"; - @Nullable - private String timezone; - - public SpecificTimeSchedule() { - } - - public SpecificTimeSchedule daysOfWeek(@Nullable Set daysOfWeek) { - this.daysOfWeek = daysOfWeek; - return this; - } - - public SpecificTimeSchedule addDaysOfWeekItem(Integer daysOfWeekItem) { - if (this.daysOfWeek == null) { - this.daysOfWeek = new LinkedHashSet<>(); - } - this.daysOfWeek.add(daysOfWeekItem); - return this; - } - - /** - * Get daysOfWeek - * @return daysOfWeek - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_DAYS_OF_WEEK, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Set getDaysOfWeek() { - return daysOfWeek; - } - - - @JsonDeserialize(as = LinkedHashSet.class) - @JsonProperty(value = JSON_PROPERTY_DAYS_OF_WEEK, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDaysOfWeek(@Nullable Set daysOfWeek) { - this.daysOfWeek = daysOfWeek; - } - - - public SpecificTimeSchedule endsOn(@Nullable Long endsOn) { - this.endsOn = endsOn; - return this; - } - - /** - * Get endsOn - * @return endsOn - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_ENDS_ON, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getEndsOn() { - return endsOn; - } - - - @JsonProperty(value = JSON_PROPERTY_ENDS_ON, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEndsOn(@Nullable Long endsOn) { - this.endsOn = endsOn; - } - - - public SpecificTimeSchedule startsOn(@Nullable Long startsOn) { - this.startsOn = startsOn; - return this; - } - - /** - * Get startsOn - * @return startsOn - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_STARTS_ON, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStartsOn() { - return startsOn; - } - - - @JsonProperty(value = JSON_PROPERTY_STARTS_ON, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStartsOn(@Nullable Long startsOn) { - this.startsOn = startsOn; - } - - - public SpecificTimeSchedule timezone(@Nullable String timezone) { - this.timezone = timezone; - return this; - } - - /** - * Get timezone - * @return timezone - */ - @Nullable - @JsonProperty(value = JSON_PROPERTY_TIMEZONE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimezone() { - return timezone; - } - - - @JsonProperty(value = JSON_PROPERTY_TIMEZONE, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTimezone(@Nullable String timezone) { - this.timezone = timezone; - } - - - @Override - public SpecificTimeSchedule dynamicValue(@Nullable DynamicValueString dynamicValue) { - this.setDynamicValue(dynamicValue); - return this; - } - - /** - * Return true if this SpecificTimeSchedule object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecificTimeSchedule specificTimeSchedule = (SpecificTimeSchedule) o; - return Objects.equals(this.daysOfWeek, specificTimeSchedule.daysOfWeek) && - Objects.equals(this.endsOn, specificTimeSchedule.endsOn) && - Objects.equals(this.startsOn, specificTimeSchedule.startsOn) && - Objects.equals(this.timezone, specificTimeSchedule.timezone) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(daysOfWeek, endsOn, startsOn, timezone, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecificTimeSchedule {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" daysOfWeek: ").append(toIndentedString(daysOfWeek)).append("\n"); - sb.append(" endsOn: ").append(toIndentedString(endsOn)).append("\n"); - sb.append(" startsOn: ").append(toIndentedString(startsOn)).append("\n"); - sb.append(" timezone: ").append(toIndentedString(timezone)).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 `dynamicValue` to the URL query string - if (getDynamicValue() != null) { - joiner.add(getDynamicValue().toUrlQueryString(prefix + "dynamicValue" + suffix)); - } - - // 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 `daysOfWeek` to the URL query string - if (getDaysOfWeek() != null) { - int i = 0; - for (Integer _item : getDaysOfWeek()) { - joiner.add(String.format(java.util.Locale.ROOT, "%sdaysOfWeek%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), - ApiClient.urlEncode(ApiClient.valueToString(_item)))); - } - i++; - } - - // add `endsOn` to the URL query string - if (getEndsOn() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sendsOn%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEndsOn())))); - } - - // add `startsOn` to the URL query string - if (getStartsOn() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%sstartsOn%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getStartsOn())))); - } - - // add `timezone` to the URL query string - if (getTimezone() != null) { - joiner.add(String.format(java.util.Locale.ROOT, "%stimezone%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getTimezone())))); - } - - return joiner.toString(); - } -static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap>(); - mappings.put("SpecificTimeSchedule", SpecificTimeSchedule.class); - JSON.registerDiscriminator(SpecificTimeSchedule.class, "type", mappings); -} -} -