@ -155,251 +157,6 @@ public abstract class BaseController {
/*Swagger UI description*/
protectedstaticfinalStringNEW_LINE="\n\n";
publicstaticfinalStringCUSTOMER_ID="customerId";
publicstaticfinalStringTENANT_ID="tenantId";
publicstaticfinalStringDEVICE_ID="deviceId";
publicstaticfinalStringRPC_ID="rpcId";
publicstaticfinalStringENTITY_ID="entityId";
publicstaticfinalStringENTITY_TYPE="entityType";
publicstaticfinalStringPAGE_DATA_PARAMETERS="You can specify parameters to filter the results. "+
"The result is wrapped with PageData object that allows you to iterate over result set using pagination. "+
"See the 'Model' tab of the Response Class for more details. ";
publicstaticfinalStringDASHBOARD_ID_PARAM_DESCRIPTION="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringRPC_ID_PARAM_DESCRIPTION="A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringDEVICE_ID_PARAM_DESCRIPTION="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringDEVICE_PROFILE_ID_PARAM_DESCRIPTION="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringTENANT_PROFILE_ID_PARAM_DESCRIPTION="A string value representing the tenant profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringTENANT_ID_PARAM_DESCRIPTION="A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringEDGE_ID_PARAM_DESCRIPTION="A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringCUSTOMER_ID_PARAM_DESCRIPTION="A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringUSER_ID_PARAM_DESCRIPTION="A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringASSET_ID_PARAM_DESCRIPTION="A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringALARM_ID_PARAM_DESCRIPTION="A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringENTITY_ID_PARAM_DESCRIPTION="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringOTA_PACKAGE_ID_PARAM_DESCRIPTION="A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringENTITY_TYPE_PARAM_DESCRIPTION="A string value representing the entity type. For example, 'DEVICE'";
publicstaticfinalStringRULE_CHAIN_ID_PARAM_DESCRIPTION="A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringWIDGET_BUNDLE_ID_PARAM_DESCRIPTION="A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringWIDGET_TYPE_ID_PARAM_DESCRIPTION="A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
publicstaticfinalStringRESOURCE_ID_PARAM_DESCRIPTION="A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringSYSTEM_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'SYS_ADMIN' authority.";
protectedstaticfinalStringSYSTEM_OR_TENANT_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.";
protectedstaticfinalStringTENANT_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'TENANT_ADMIN' authority.";
protectedstaticfinalStringTENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.";
protectedstaticfinalStringCUSTOMER_AUTHORITY_PARAGRAPH="\n\nAvailable for users with 'CUSTOMER_USER' authority.";
protectedstaticfinalStringAVAILABLE_FOR_ANY_AUTHORIZED_USER="\n\nAvailable for any authorized user. ";
protectedstaticfinalStringPAGE_SIZE_DESCRIPTION="Maximum amount of entities in a one page";
protectedstaticfinalStringPAGE_NUMBER_DESCRIPTION="Sequence number of page starting from 0";
protectedstaticfinalStringDEVICE_TYPE_DESCRIPTION="Device type as the name of the device profile";
protectedstaticfinalStringDEVICE_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the device name.";
protectedstaticfinalStringUSER_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the user email.";
protectedstaticfinalStringTENANT_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the tenant name.";
protectedstaticfinalStringTENANT_PROFILE_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the tenant profile name.";
protectedstaticfinalStringRULE_CHAIN_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the rule chain name.";
protectedstaticfinalStringDEVICE_PROFILE_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the device profile name.";
protectedstaticfinalStringCUSTOMER_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the customer title.";
protectedstaticfinalStringEDGE_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the edge name.";
protectedstaticfinalStringEVENT_TEXT_SEARCH_DESCRIPTION="The value is not used in searching.";
protectedstaticfinalStringAUDIT_LOG_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.";
protectedstaticfinalStringSORT_PROPERTY_DESCRIPTION="Property of entity to sort by";
protectedstaticfinalStringDEVICE_INFO_DESCRIPTION="Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name. ";
protectedstaticfinalStringASSET_INFO_DESCRIPTION="Asset Info is an extension of the default Asset object that contains information about the assigned customer name. ";
protectedstaticfinalStringALARM_INFO_DESCRIPTION="Alarm Info is an extension of the default Alarm object that also contains name of the alarm originator.";
protectedstaticfinalStringRELATION_INFO_DESCRIPTION="Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ";
protectedstaticfinalStringEDGE_INFO_DESCRIPTION="Edge Info is an extension of the default Edge object that contains information about the assigned customer name. ";
protectedstaticfinalStringDEVICE_PROFILE_INFO_DESCRIPTION="Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. ";
protectedstaticfinalStringQUEUE_SERVICE_TYPE_DESCRIPTION="Service type (implemented only for the TB-RULE-ENGINE)";
protectedstaticfinalStringOTA_PACKAGE_INFO_DESCRIPTION="OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. ";
protectedstaticfinalStringOTA_PACKAGE_DESCRIPTION="OTA Package is a heavyweight object that includes main information about the OTA Package and also data. ";
protectedstaticfinalStringRESOURCE_INFO_DESCRIPTION="Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. ";
protectedstaticfinalStringRESOURCE_DESCRIPTION="Resource is a heavyweight object that includes main information about the Resource and also data. ";
protectedstaticfinalStringRESOURCE_TEXT_SEARCH_DESCRIPTION="The case insensitive 'startsWith' filter based on the resource title.";
protectedstaticfinalStringLWM2M_OBJECT_DESCRIPTION="LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. ";
protectedstaticfinalStringDEVICE_NAME_DESCRIPTION="A string value representing the Device name.";
protectedstaticfinalStringASSET_NAME_DESCRIPTION="A string value representing the Asset name.";
protectedstaticfinalStringEVENT_START_TIME_DESCRIPTION="Timestamp. Events with creation time before it won't be queried.";
protectedstaticfinalStringEVENT_END_TIME_DESCRIPTION="Timestamp. Events with creation time after it won't be queried.";
protectedstaticfinalStringEDGE_UNASSIGN_ASYNC_FIRST_STEP_DESCRIPTION="Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. ";
protectedstaticfinalStringEDGE_UNASSIGN_RECEIVE_STEP_DESCRIPTION="(Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform)";
protectedstaticfinalStringEDGE_ASSIGN_ASYNC_FIRST_STEP_DESCRIPTION="Assignment works in async way - first, notification event pushed to edge service queue on platform. ";
protectedstaticfinalStringEDGE_ASSIGN_RECEIVE_STEP_DESCRIPTION="(Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform)";
protectedstaticfinalStringFILTER_VALUE_TYPE=NEW_LINE+"## Value Type and Operations"+NEW_LINE+
"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: "+NEW_LINE+
" * '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";
protectedstaticfinalStringRELATION_TYPE_PARAM_DESCRIPTION="A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.";
protectedstaticfinalStringRELATION_TYPE_GROUP_PARAM_DESCRIPTION="A string value representing relation type group. For example, 'COMMON'";
"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:\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."+NEW_LINE+"Let's review the example:"+NEW_LINE+
"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."+NEW_LINE+
"Simple predicate example to check 'value < 100': "+NEW_LINE+
MARKDOWN_CODE_BLOCK_START+
"{\n"+
" \"operation\": \"LESS\",\n"+
" \"value\": {\n"+
" \"userValue\": null,\n"+
" \"defaultValue\": 100,\n"+
" \"dynamicValue\": null\n"+
" },\n"+
" \"type\": \"NUMERIC\"\n"+
"}"+
MARKDOWN_CODE_BLOCK_END+NEW_LINE+
"Complex predicate example, to check 'value < 10 or value > 20': "+NEW_LINE+
MARKDOWN_CODE_BLOCK_START+
"{\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"+
"}"+
MARKDOWN_CODE_BLOCK_END+NEW_LINE+
"More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': "+NEW_LINE+
MARKDOWN_CODE_BLOCK_START+
"{\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"+
"}"+
MARKDOWN_CODE_BLOCK_END+NEW_LINE+
"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. "+
"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.";
privatestaticfinalStringDEVICE_PROFILE_DATA_DEFINITION=NEW_LINE+"# Device profile data definition"+NEW_LINE+
"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. "+
"Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, "+
NEW_LINE+DEVICE_PROFILE_ALARM_SCHEDULE_ALWAYS_EXAMPLE+NEW_LINE+"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:"+NEW_LINE+
privatestaticfinalStringALARM_CONDITION_TYPE="# Alarm condition type (**'spec'**)"+NEW_LINE+
"Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes."+NEW_LINE+
"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).\n"+
"\n**'sourceType'** of the **'sourceAttribute'** can be: \n"+
" * 'CURRENT_DEVICE';\n"+
" * 'CURRENT_CUSTOMER';\n"+
" * 'CURRENT_TENANT'."+NEW_LINE+
"**'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER)."+NEW_LINE+
privatestaticfinalStringMAX_LEVEL_DESCRIPTION="Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. ";
privatestaticfinalStringFETCH_LAST_LEVEL_ONLY_DESCRIPTION="Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. ";
"Allows to filter entities that are related to the provided root entity. "+
MAX_LEVEL_DESCRIPTION+
FETCH_LAST_LEVEL_ONLY_DESCRIPTION+
"The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. "+
"The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\n"+
"For example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n"+
"Allows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. "+
MAX_LEVEL_DESCRIPTION+
FETCH_LAST_LEVEL_ONLY_DESCRIPTION+
"The 'relationType' defines the type of the relation to search for. "+
"The 'assetTypes' defines the type of the asset to search for. "+
"The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\n"+
"For example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n"+
"Allows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. "+
MAX_LEVEL_DESCRIPTION+
FETCH_LAST_LEVEL_ONLY_DESCRIPTION+
"The 'relationType' defines the type of the relation to search for. "+
"The 'deviceTypes' defines the type of the device to search for. "+
"The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\n"+
"For example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n"+
"Allows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. "+
MAX_LEVEL_DESCRIPTION+
FETCH_LAST_LEVEL_ONLY_DESCRIPTION+
"The 'relationType' defines the type of the relation to search for. "+
"The 'entityViewTypes' defines the type of the entity view to search for. "+
"The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\n"+
"For example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n"+
"Allows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. "+
MAX_LEVEL_DESCRIPTION+
FETCH_LAST_LEVEL_ONLY_DESCRIPTION+
"The 'relationType' defines the type of the relation to search for. "+
"The 'deviceTypes' defines the type of the device to search for. "+
"The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\n"+
"For example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n"+
privatestaticfinalStringEMPTY="\n\n## Entity Type Filter\n\n"+
"Allows to filter multiple entities of the same type using the **'starts with'** expression over entity name. "+
"For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n"+
MARKDOWN_CODE_BLOCK_START+
""+
MARKDOWN_CODE_BLOCK_END+
"";
privatestaticfinalStringENTITY_FILTERS=
"\n\n # Entity Filters"+
"\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases."+
"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."+
"\n\nSimple predicate example to check 'value < 100': \n\n"+
MARKDOWN_CODE_BLOCK_START+
"{\n"+
" \"operation\": \"LESS\",\n"+
" \"value\": {\n"+
" \"defaultValue\": 100,\n"+
" \"dynamicValue\": null\n"+
" },\n"+
" \"type\": \"NUMERIC\"\n"+
"}"+
MARKDOWN_CODE_BLOCK_END+
"\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n"+
MARKDOWN_CODE_BLOCK_START+
"{\n"+
" \"type\": \"COMPLEX\",\n"+
" \"operation\": \"OR\",\n"+
" \"predicates\": [\n"+
" {\n"+
" \"operation\": \"LESS\",\n"+
" \"value\": {\n"+
" \"defaultValue\": 10,\n"+
" \"dynamicValue\": null\n"+
" },\n"+
" \"type\": \"NUMERIC\"\n"+
" },\n"+
" {\n"+
" \"operation\": \"GREATER\",\n"+
" \"value\": {\n"+
" \"defaultValue\": 20,\n"+
" \"dynamicValue\": null\n"+
" },\n"+
" \"type\": \"NUMERIC\"\n"+
" }\n"+
" ]\n"+
"}"+
MARKDOWN_CODE_BLOCK_END+
"\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n"+
MARKDOWN_CODE_BLOCK_START+
"{\n"+
" \"type\": \"COMPLEX\",\n"+
" \"operation\": \"OR\",\n"+
" \"predicates\": [\n"+
" {\n"+
" \"operation\": \"LESS\",\n"+
" \"value\": {\n"+
" \"defaultValue\": 10,\n"+
" \"dynamicValue\": null\n"+
" },\n"+
" \"type\": \"NUMERIC\"\n"+
" },\n"+
" {\n"+
" \"type\": \"COMPLEX\",\n"+
" \"operation\": \"AND\",\n"+
" \"predicates\": [\n"+
" {\n"+
" \"operation\": \"GREATER\",\n"+
" \"value\": {\n"+
" \"defaultValue\": 50,\n"+
" \"dynamicValue\": null\n"+
" },\n"+
" \"type\": \"NUMERIC\"\n"+
" },\n"+
" {\n"+
" \"operation\": \"LESS\",\n"+
" \"value\": {\n"+
" \"defaultValue\": 60,\n"+
" \"dynamicValue\": null\n"+
" },\n"+
" \"type\": \"NUMERIC\"\n"+
" }\n"+
" ]\n"+
" }\n"+
" ]\n"+
"}"+
MARKDOWN_CODE_BLOCK_END+
"\n\n You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic "+
"expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). "+
"It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. "+
"\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.";
privatestaticfinalStringKEY_FILTERS=
"\n\n # Key Filters"+
"\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time-series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. "+
"Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. "+
"The example below checks that temperature of the entity is above 20 degrees:"+
"\n\n"+MARKDOWN_CODE_BLOCK_START+
"{\n"+
" \"key\": {\n"+
" \"type\": \"TIME_SERIES\",\n"+
" \"key\": \"temperature\"\n"+
" },\n"+
" \"valueType\": \"NUMERIC\",\n"+
" \"predicate\": {\n"+
" \"operation\": \"GREATER\",\n"+
" \"value\": {\n"+
" \"defaultValue\": 20,\n"+
" \"dynamicValue\": null\n"+
" },\n"+
" \"type\": \"NUMERIC\"\n"+
" }\n"+
"}"+
MARKDOWN_CODE_BLOCK_END+
"\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail."
"For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and timeseries field 'batteryLevel' > 40\"."+
"\n\nLet's review the example:"+
"\n\n"+MARKDOWN_CODE_BLOCK_START+
"{\n"+
" \"entityFilter\": {\n"+
" \"type\": \"entityType\",\n"+
" \"entityType\": \"DEVICE\"\n"+
" },\n"+
" \"keyFilters\": [\n"+
" {\n"+
" \"key\": {\n"+
" \"type\": \"ATTRIBUTE\",\n"+
" \"key\": \"active\"\n"+
" },\n"+
" \"valueType\": \"BOOLEAN\",\n"+
" \"predicate\": {\n"+
" \"operation\": \"EQUAL\",\n"+
" \"value\": {\n"+
" \"defaultValue\": true,\n"+
" \"dynamicValue\": null\n"+
" },\n"+
" \"type\": \"BOOLEAN\"\n"+
" }\n"+
" }\n"+
" ]\n"+
"}"+
MARKDOWN_CODE_BLOCK_END+
"\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:"+
"For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and timeseries field 'batteryLevel' > 40\"."+
"\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity."+
"\n\nThe **page link** contains information about the page to fetch and the sort ordering."+
"\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:"+
ENTITY_FILTERS+
KEY_FILTERS+
TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH;
privatestaticfinalStringALARM_DATA_QUERY_DESCRIPTION="This method description defines how Alarm Data Query extends the Entity Data Query. "+
"See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'."+
"\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. "+
"Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time-series fields to return the result. "+
"\n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature > 0. "+
"The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: "+