.content(getErrorContent(ThingsboardErrorResponse.of("You don't have permission to perform this operation!",ThingsboardErrorCode.PERMISSION_DENIED,HttpStatus.FORBIDDEN))));
apiResponses.addApiResponse("429",newApiResponse().description("Too Many Requests")
.content(getErrorContent(ThingsboardErrorResponse.of("Too many requests for current tenant!",ThingsboardErrorCode.TOO_MANY_REQUESTS,HttpStatus.TOO_MANY_REQUESTS))));
AdminSettingsadminSettings=checkNotNull(adminSettingsService.findAdminSettingsByKey(TenantId.SYS_TENANT_ID,key),"No Administration settings found for key: "+key);
@ -114,7 +116,7 @@ public class AdminController extends BaseController {
notes="Updates the JWT Settings object that contains JWT token policy, etc. The tokenSigningKey field is a Base64 encoded string."+SYSTEM_AUTHORITY_PARAGRAPH,
@ -69,12 +70,12 @@ public class AlarmCommentController extends BaseController {
"\n\n To create new Alarm comment entity it is enough to specify 'comment' json element with 'text' node, for example: {\"comment\": { \"text\": \"my comment\"}}. "+
"\n\n If comment type is not specified the default value 'OTHER' will be saved. If 'alarmId' or 'userId' specified in body it will be ignored."+
@PathVariable(ALARM_ID)StringstrAlarmId,@ApiParam(value="A JSON value representing the comment.")@RequestBodyAlarmCommentalarmComment)throwsThingsboardException{
@PathVariable(ALARM_ID)StringstrAlarmId,@Parameter(description="A JSON value representing the comment.")@RequestBodyAlarmCommentalarmComment)throwsThingsboardException{
checkParameter(ALARM_ID,strAlarmId);
AlarmIdalarmId=newAlarmId(toUUID(strAlarmId));
Alarmalarm=checkAlarmId(alarmId,Operation.WRITE);
@ -83,11 +84,11 @@ public class AlarmCommentController extends BaseController {
notes="Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
notes="Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
@ -104,11 +105,11 @@ public class AlarmController extends BaseController {
"filled in the AlarmInfo object field: 'originatorName' or will returns as null.";
@ApiOperation(value="Get Alarm (getAlarmById)",
notes="Fetch the Alarm object based on the provided Alarm Id. "+ALARM_SECURITY_CHECK,produces=MediaType.APPLICATION_JSON_VALUE)
notes="Fetch the Alarm object based on the provided Alarm Id. "+ALARM_SECURITY_CHECK,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
publicAlarmsaveAlarm(@ApiParam(value="A JSON value representing the alarm.")@RequestBodyAlarmalarm)throwsThingsboardException{
publicAlarmsaveAlarm(@Parameter(description="A JSON value representing the alarm.")@RequestBodyAlarmalarm)throwsThingsboardException{
alarm.setTenantId(getTenantId());
checkNotNull(alarm.getOriginator());
checkEntity(alarm.getId(),alarm,Resource.ALARM);
@ -155,11 +156,11 @@ public class AlarmController extends BaseController {
}
@ApiOperation(value="Delete Alarm (deleteAlarm)",
notes="Deletes the Alarm. Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
notes="Deletes the Alarm. Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
"Once acknowledged, the 'ack_ts' field will be set to current timestamp and special rule chain event 'ALARM_ACK' will be generated. "+
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
@ -184,11 +185,11 @@ public class AlarmController extends BaseController {
@ApiOperation(value="Clear Alarm (clearAlarm)",
notes="Clear the Alarm. "+
"Once cleared, the 'clear_ts' field will be set to current timestamp and special rule chain event 'ALARM_CLEAR' will be generated. "+
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
@ -200,13 +201,13 @@ public class AlarmController extends BaseController {
notes="Assign the Alarm. "+
"Once assigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_ASSIGNED' "+
"(or ALARM_REASSIGNED in case of assigning already assigned alarm) will be generated. "+
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
"Once unassigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_UNASSIGNED' will be generated. "+
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
@ -236,36 +237,36 @@ public class AlarmController extends BaseController {
@ApiOperation(value="Get Alarms (getAlarms)",
notes="Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. "+
notes="Search the alarms by originator ('entityType' and entityId') and optional 'status' or 'searchStatus' filters and returns the highest AlarmSeverity(CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE). "+
"Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH
@ -102,11 +103,11 @@ public class AssetController extends BaseController {
notes="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."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH
@ -157,12 +158,12 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Assign asset to customer (assignAssetToCustomer)",
notes="Creates assignment of the asset to customer. Customer will be able to query asset afterwards."+TENANT_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
notes="Creates assignment of the asset to customer. Customer will be able to query asset afterwards."+TENANT_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
@ -173,11 +174,11 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Unassign asset from customer (unassignAssetFromCustomer)",
notes="Clears assignment of the asset to customer. Customer will not be able to query asset afterwards."+TENANT_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
notes="Clears assignment of the asset to customer. Customer will not be able to query asset afterwards."+TENANT_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
@ -191,11 +192,11 @@ public class AssetController extends BaseController {
@ApiOperation(value="Make asset publicly available (assignAssetToPublicCustomer)",
notes="Asset will be available for non-authorized (not logged-in) users. "+
"This is useful to create dashboards that you plan to share/embed on a publicly available website. "+
"However, users that are logged-in and belong to different tenant will not be able to access the asset."+TENANT_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
"However, users that are logged-in and belong to different tenant will not be able to access the asset."+TENANT_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
notes="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."+TENANT_AUTHORITY_PARAGRAPH,produces=MediaType.APPLICATION_JSON_VALUE)
"Asset name is an unique property of asset. So it can be used to identify the asset."+TENANT_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
@ -348,12 +349,12 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Get Assets By Ids (getAssetsByIds)",
notes="Requested assets must be owned by tenant or assigned to customer which user is performing the request. ",produces=MediaType.APPLICATION_JSON_VALUE)
notes="Requested assets must be owned by tenant or assigned to customer which user is performing the request. ",responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
notes="Returns a set of unique asset types based on assets that are either owned by the tenant or assigned to the customer which user is performing the request.",produces=MediaType.APPLICATION_JSON_VALUE)
notes="Returns a set of unique asset types based on assets that are either owned by the tenant or assigned to the customer which user is performing the request.",responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
@ -507,7 +508,7 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Import the bulk of assets (processAssetsBulkImport)",
notes="There's an ability to import the bulk of assets using the only .csv file.",produces=MediaType.APPLICATION_JSON_VALUE)
notes="There's an ability to import the bulk of assets using the only .csv file.",responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
@ -89,33 +89,8 @@ public class ControllerConstants {
protectedstaticfinalStringEVENT_TEXT_SEARCH_DESCRIPTION="The value is not used in searching.";
protectedstaticfinalStringAUDIT_LOG_TEXT_SEARCH_DESCRIPTION="The case insensitive 'substring' 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.";
@ -125,23 +100,17 @@ public class ControllerConstants {
protectedstaticfinalStringASSET_PROFILE_INFO_DESCRIPTION="Asset Profile Info is a lightweight object that includes main information about Asset Profile. ";
protectedstaticfinalStringQUEUE_SERVICE_TYPE_DESCRIPTION="Service type (implemented only for the TB-RULE-ENGINE)";
protectedstaticfinalStringQUEUE_ID_PARAM_DESCRIPTION="A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringQUEUE_NAME_PARAM_DESCRIPTION="A string value representing the queue id. For example, 'Main'";
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 'substring' 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.";
@ -1439,8 +1408,6 @@ public class ControllerConstants {
protectedstaticfinalStringATTRIBUTES_SCOPE_DESCRIPTION="A string value representing the attributes scope. For example, 'SERVER_SCOPE'.";
protectedstaticfinalStringATTRIBUTES_KEYS_DESCRIPTION="A string value representing the comma-separated list of attributes keys. For example, 'active,inactivityAlarmTime'.";
protectedstaticfinalStringATTRIBUTES_JSON_REQUEST_DESCRIPTION="A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.";
protectedstaticfinalStringTELEMETRY_KEYS_BASE_DESCRIPTION="A string value representing the comma-separated list of telemetry keys.";
@ -240,16 +238,15 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Update the Dashboard Customers (updateDashboardCustomers)",
notes="Updates the list of Customers that this Dashboard is assigned to. Removes previous assignments to customers that are not in the provided list. "+
"Returns the Dashboard object. "+TENANT_AUTHORITY_PARAGRAPH,
@ -261,15 +258,14 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Adds the Dashboard Customers (addDashboardCustomers)",
notes="Adds the list of Customers to the existing list of assignments for the Dashboard. Keeps previous assignments to customers that are not in the provided list. "+
"Returns the Dashboard object."+TENANT_AUTHORITY_PARAGRAPH,
@ -281,15 +277,14 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Remove the Dashboard Customers (removeDashboardCustomers)",
notes="Removes the list of Customers from the existing list of assignments for the Dashboard. Keeps other assignments to customers that are not in the provided list. "+
"Returns the Dashboard object."+TENANT_AUTHORITY_PARAGRAPH,
@ -321,12 +316,12 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Unassign the Dashboard from Public Customer (unassignDashboardFromPublicCustomer)",
notes="Unassigns the dashboard from a special, auto-generated 'Public' Customer. Once unassigned, unauthenticated users may no longer browse the dashboard. "+
"Returns the Dashboard object."+TENANT_AUTHORITY_PARAGRAPH,
@ -428,7 +423,7 @@ public class DashboardController extends BaseController {
"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. "
@ -461,7 +456,7 @@ public class DashboardController extends BaseController {
"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. "+
@ -492,7 +487,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo)",
notes="Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding tenant. "+
@ -123,12 +124,12 @@ public class DeviceProfileController extends BaseController {
"The call is used for auto-complete in the UI forms. "+
"The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. "+
@ -147,12 +148,12 @@ public class DeviceProfileController extends BaseController {
"The call is used for auto-complete in the UI forms. "+
"The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. "+
@ -144,11 +145,11 @@ public class EdgeController extends BaseController {
"\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes."+
"Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. "+
notes="Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request."
@ApiParam(value="A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.")
@Parameter(description="A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.")
@ -294,11 +296,11 @@ public class EntityRelationController extends BaseController {
@ApiOperation(value="Find related entity infos (findInfoByQuery)",
notes="Returns all entity infos that are related to the specific entity. "+
"The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. "+
"See 'Model' tab of the Parameters for more info. "+RELATION_INFO_DESCRIPTION,produces=MediaType.APPLICATION_JSON_VALUE)
"See 'Model' tab of the Parameters for more info. "+RELATION_INFO_DESCRIPTION,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
notes="Get the Lwm2m Bootstrap SecurityInfo object (of the current server) based on the provided isBootstrapServer parameter. If isBootstrapServer == true, get the parameters of the current Bootstrap Server. If isBootstrapServer == false, get the parameters of the current Lwm2m Server. Used for client settings when starting the client in Bootstrap mode. "+
publicList<NotificationTarget>getNotificationTargetsByIds(@ApiParam(value="Comma-separated list of uuids representing targets ids",required=true)
publicList<NotificationTarget>getNotificationTargetsByIds(@Parameter(description="Comma-separated list of uuids representing targets ids",required=true)
@RequestParam("ids")UUID[]ids,
@AuthenticationPrincipalSecurityUseruser){
// generic permission
@ -170,15 +170,15 @@ public class NotificationTargetController extends BaseController {
publicvoiddeleteClientRegistrationTemplate(@ApiParam(value="String representation of client registration template id to delete",example="139b1f81-2f5d-11ec-9dbe-9b627e1a88f4")
publicvoiddeleteClientRegistrationTemplate(@Parameter(description="String representation of client registration template id to delete",example="139b1f81-2f5d-11ec-9dbe-9b627e1a88f4")
@ApiResponse(code=200,message="Persistent RPC request was saved to the database or lightweight RPC request was sent to the device."),
@ApiResponse(code=400,message="Invalid structure of the request."),
@ApiResponse(code=401,message="User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(code=504,message="Timeout to process the RPC call. Most likely, device is offline."),
@ApiResponse(responseCode="200",description="Persistent RPC request was saved to the database or lightweight RPC request was sent to the device."),
@ApiResponse(responseCode="400",description="Invalid structure of the request."),
@ApiResponse(responseCode="401",description="User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(responseCode="504",description="Timeout to process the RPC call. Most likely, device is offline."),
@ApiResponse(code=200,message="Persistent RPC request was saved to the database or lightweight RPC response received."),
@ApiResponse(code=400,message="Invalid structure of the request."),
@ApiResponse(code=401,message="User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(code=504,message="Timeout to process the RPC call. Most likely, device is offline."),
@ApiResponse(responseCode="200",description="Persistent RPC request was saved to the database or lightweight RPC response received."),
@ApiResponse(responseCode="400",description="Invalid structure of the request."),
@ApiResponse(responseCode="401",description="User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(responseCode="504",description="Timeout to process the RPC call. Most likely, device is offline."),
@ApiResponse(code=401,message="User is not authorized to save device attributes for selected device. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(code=500,message="The exception was thrown during processing the request. "+
@ApiResponse(responseCode="401",description="User is not authorized to save device attributes for selected device. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(responseCode="500",description="The exception was thrown during processing the request. "+
"Platform creates an audit log event about device attributes updates with action type 'ATTRIBUTES_UPDATED' that includes an error stacktrace."),
@ApiResponse(code=200,message="Timeseries for the selected keys in the request was removed. "+
@ApiResponse(responseCode="200",description="Timeseries for the selected keys in the request was removed. "+
"Platform creates an audit log event about entity timeseries removal with action type 'TIMESERIES_DELETED'."),
@ApiResponse(code=400,message="Platform returns a bad request in case if keys list is empty or start and end timestamp values is empty when deleteAllDataForKeys is set to false."),
@ApiResponse(code=401,message="User is not authorized to delete entity timeseries for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(code=500,message="The exception was thrown during processing the request. "+
@ApiResponse(responseCode="400",description="Platform returns a bad request in case if keys list is empty or start and end timestamp values is empty when deleteAllDataForKeys is set to false."),
@ApiResponse(responseCode="401",description="User is not authorized to delete entity timeseries for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(responseCode="500",description="The exception was thrown during processing the request. "+
"Platform creates an audit log event about entity timeseries removal with action type 'TIMESERIES_DELETED' that includes an error stacktrace."),
@ApiParam(value="If the parameter is set to true, the latest telemetry will be rewritten in case that current latest value was removed, otherwise, in case that parameter is set to false the new latest value will not set.")
@Parameter(description="If the parameter is set to true, the latest telemetry will be rewritten in case that current latest value was removed, otherwise, in case that parameter is set to false the new latest value will not set.")
@ApiResponse(code=200,message="Device attributes was removed for the selected keys in the request. "+
@ApiResponse(responseCode="200",description="Device attributes was removed for the selected keys in the request. "+
"Platform creates an audit log event about device attributes removal with action type 'ATTRIBUTES_DELETED'."),
@ApiResponse(code=400,message="Platform returns a bad request in case if keys or scope are not specified."),
@ApiResponse(code=401,message="User is not authorized to delete device attributes for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(code=500,message="The exception was thrown during processing the request. "+
@ApiResponse(responseCode="400",description="Platform returns a bad request in case if keys or scope are not specified."),
@ApiResponse(responseCode="401",description="User is not authorized to delete device attributes for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(responseCode="500",description="The exception was thrown during processing the request. "+
"Platform creates an audit log event about device attributes removal with action type 'ATTRIBUTES_DELETED' that includes an error stacktrace."),
@ApiResponse(code=200,message="Entity attributes was removed for the selected keys in the request. "+
@ApiResponse(responseCode="200",description="Entity attributes was removed for the selected keys in the request. "+
"Platform creates an audit log event about entity attributes removal with action type 'ATTRIBUTES_DELETED'."),
@ApiResponse(code=400,message="Platform returns a bad request in case if keys or scope are not specified."),
@ApiResponse(code=401,message="User is not authorized to delete entity attributes for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(code=500,message="The exception was thrown during processing the request. "+
@ApiResponse(responseCode="400",description="Platform returns a bad request in case if keys or scope are not specified."),
@ApiResponse(responseCode="401",description="User is not authorized to delete entity attributes for selected entity. Most likely, User belongs to different Customer or Tenant."),
@ApiResponse(responseCode="500",description="The exception was thrown during processing the request. "+
"Platform creates an audit log event about entity attributes removal with action type 'ATTRIBUTES_DELETED' that includes an error stacktrace."),
publicTwoFaAccountConfiggenerateTwoFaAccountConfig(@ApiParam(value="2FA provider type to generate new account config for",defaultValue="TOTP",required=true)
publicTwoFaAccountConfiggenerateTwoFaAccountConfig(@Parameter(description="2FA provider type to generate new account config for",schema=@Schema(defaultValue="TOTP",required=true))
publicvoidputUserSettings(@ApiParam(value="Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\".")
publicvoidputUserSettings(@Parameter(description="Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\".")
publicJsonNodegetUserSettings(@ApiParam(value="Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\".")
publicJsonNodegetUserSettings(@Parameter(description="Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\".")
@ -32,17 +31,17 @@ public class AttributeData implements Comparable<AttributeData>{
this.value=value;
}
@ApiModelProperty(position=1,value="Timestamp last updated attribute, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp last updated attribute, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@ -30,12 +29,12 @@ public class TsData implements Comparable<TsData>{
this.value=value;
}
@ApiModelProperty(position=1,value="Timestamp last updated timeseries, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp last updated timeseries, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
publiclonggetTs(){
returnts;
}
@ApiModelProperty(position=2,value="Object representing value of timeseries key",example="20",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Object representing value of timeseries key",example="20",accessMode=Schema.AccessMode.READ_ONLY)
@ -50,19 +49,19 @@ public class AdminSettings extends BaseData<AdminSettingsId> implements HasTenan
this.jsonValue=adminSettings.getJsonValue();
}
@ApiModelProperty(position=1,value="The Id of the Administration Settings, auto-generated, UUID")
@Schema(description="The Id of the Administration Settings, auto-generated, UUID")
@Override
publicAdminSettingsIdgetId(){
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the settings creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the settings creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publiclonggetCreatedTime(){
returnsuper.getCreatedTime();
}
@ApiModelProperty(position=3,value="JSON object with Tenant Id.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with Tenant Id.",accessMode=Schema.AccessMode.READ_ONLY)
publicTenantIdgetTenantId(){
returntenantId;
}
@ -71,7 +70,7 @@ public class AdminSettings extends BaseData<AdminSettingsId> implements HasTenan
this.tenantId=tenantId;
}
@ApiModelProperty(position=4,value="The Administration Settings key, (e.g. 'general' or 'mail')",example="mail")
@Schema(description="The Administration Settings key, (e.g. 'general' or 'mail')",example="mail")
publicStringgetKey(){
returnkey;
}
@ -80,7 +79,7 @@ public class AdminSettings extends BaseData<AdminSettingsId> implements HasTenan
this.key=key;
}
@ApiModelProperty(position=5,value="JSON representation of the Administration Settings value")
@Schema(description="JSON representation of the Administration Settings value")
@ -35,9 +36,9 @@ public class Customer extends ContactBased<CustomerId> implements HasTenantId, E
@NoXss
@Length(fieldName="title")
@ApiModelProperty(position=3,value="Title of the customer",example="Company A")
@Schema(description="Title of the customer",example="Company A")
privateStringtitle;
@ApiModelProperty(position=5,required=true,value="JSON object with Tenant Id")
@Schema(required=true,description="JSON object with Tenant Id")
privateTenantIdtenantId;
@Getter@Setter
@ -74,7 +75,7 @@ public class Customer extends ContactBased<CustomerId> implements HasTenantId, E
this.title=title;
}
@ApiModelProperty(position=1,value="JSON object with the customer Id. "+
@Schema(description="JSON object with the customer Id. "+
"Specify this field to update the customer. "+
"Referencing non-existing customer Id will cause error. "+
"Omit this field to create new customer.")
@ -83,61 +84,61 @@ public class Customer extends ContactBased<CustomerId> implements HasTenantId, E
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the customer creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the customer creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@ApiModelProperty(position=14,value="Additional parameters of the device",dataType="com.fasterxml.jackson.databind.JsonNode")
@Schema(description="Additional parameters of the device",implementation=com.fasterxml.jackson.databind.JsonNode.class)
@Override
publicJsonNodegetAdditionalInfo(){
returnsuper.getAdditionalInfo();
@ -159,7 +160,7 @@ public class Customer extends ContactBased<CustomerId> implements HasTenantId, E
@Override
@JsonProperty(access=Access.READ_ONLY)
@ApiModelProperty(position=4,value="Name of the customer. Read-only, duplicated from title for backward compatibility",example="Company A",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Name of the customer. Read-only, duplicated from title for backward compatibility",example="Company A",accessMode=Schema.AccessMode.READ_ONLY)
@ -61,7 +60,7 @@ public class DashboardInfo extends BaseData<DashboardId> implements HasName, Has
this.mobileOrder=dashboardInfo.getMobileOrder();
}
@ApiModelProperty(position=1,value="JSON object with the dashboard Id. "+
@Schema(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.")
@ -70,13 +69,13 @@ public class DashboardInfo extends BaseData<DashboardId> implements HasName, Has
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the dashboard creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the dashboard creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publiclonggetCreatedTime(){
returnsuper.getCreatedTime();
}
@ApiModelProperty(position=3,value="JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.",accessMode=Schema.AccessMode.READ_ONLY)
publicTenantIdgetTenantId(){
returntenantId;
}
@ -85,7 +84,7 @@ public class DashboardInfo extends BaseData<DashboardId> implements HasName, Has
this.tenantId=tenantId;
}
@ApiModelProperty(position=4,value="Title of the dashboard.")
@Schema(description="Title of the dashboard.")
publicStringgetTitle(){
returntitle;
}
@ -94,7 +93,7 @@ public class DashboardInfo extends BaseData<DashboardId> implements HasName, Has
this.title=title;
}
@ApiModelProperty(position=8,value="Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.",accessMode=Schema.AccessMode.READ_ONLY)
publicStringgetImage(){
returnimage;
}
@ -103,7 +102,7 @@ public class DashboardInfo extends BaseData<DashboardId> implements HasName, Has
this.image=image;
}
@ApiModelProperty(position=5,value="List of assigned customers with their info.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="List of assigned customers with their info.",accessMode=Schema.AccessMode.READ_ONLY)
@ -112,7 +111,7 @@ public class DashboardInfo extends BaseData<DashboardId> implements HasName, Has
this.assignedCustomers=assignedCustomers;
}
@ApiModelProperty(position=6,value="Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.",accessMode=Schema.AccessMode.READ_ONLY)
publicbooleanisMobileHide(){
returnmobileHide;
}
@ -121,7 +120,7 @@ public class DashboardInfo extends BaseData<DashboardId> implements HasName, Has
this.mobileHide=mobileHide;
}
@ApiModelProperty(position=7,value="Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications",accessMode=Schema.AccessMode.READ_ONLY)
publicIntegergetMobileOrder(){
returnmobileOrder;
}
@ -179,7 +178,7 @@ public class DashboardInfo extends BaseData<DashboardId> implements HasName, Has
}
}
@ApiModelProperty(position=4,value="Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.",accessMode=Schema.AccessMode.READ_ONLY)
@ -103,7 +102,7 @@ public class Device extends BaseDataWithAdditionalInfo<DeviceId> implements HasL
returnthis;
}
@ApiModelProperty(position=1,value="JSON object with the Device Id. "+
@Schema(description="JSON object with the Device Id. "+
"Specify this field to update the Device. "+
"Referencing non-existing Device Id will cause error. "+
"Omit this field to create new Device.")
@ -112,13 +111,13 @@ public class Device extends BaseDataWithAdditionalInfo<DeviceId> implements HasL
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the device creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the device creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publiclonggetCreatedTime(){
returnsuper.getCreatedTime();
}
@ApiModelProperty(position=3,value="JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.",accessMode=Schema.AccessMode.READ_ONLY)
publicTenantIdgetTenantId(){
returntenantId;
}
@ -127,7 +126,7 @@ public class Device extends BaseDataWithAdditionalInfo<DeviceId> implements HasL
this.tenantId=tenantId;
}
@ApiModelProperty(position=4,value="JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.",accessMode=Schema.AccessMode.READ_ONLY)
publicCustomerIdgetCustomerId(){
returncustomerId;
}
@ -136,7 +135,7 @@ public class Device extends BaseDataWithAdditionalInfo<DeviceId> implements HasL
this.customerId=customerId;
}
@ApiModelProperty(position=5,required=true,value="Unique Device Name in scope of Tenant",example="A4B72CCDFF33")
@Schema(required=true,description="Unique Device Name in scope of Tenant",example="A4B72CCDFF33")
@Override
publicStringgetName(){
returnname;
@ -146,7 +145,7 @@ public class Device extends BaseDataWithAdditionalInfo<DeviceId> implements HasL
@ApiModelProperty(position=13,value="Title of the Customer that owns the device.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Title of the Customer that owns the device.",accessMode=Schema.AccessMode.READ_ONLY)
privateStringcustomerTitle;
@ApiModelProperty(position=14,value="Indicates special 'Public' Customer that is auto-generated to use the devices on public dashboards.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Indicates special 'Public' Customer that is auto-generated to use the devices on public dashboards.",accessMode=Schema.AccessMode.READ_ONLY)
privatebooleancustomerIsPublic;
@ApiModelProperty(position=15,value="Name of the corresponding Device Profile.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Name of the corresponding Device Profile.",accessMode=Schema.AccessMode.READ_ONLY)
privateStringdeviceProfileName;
@ApiModelProperty(position=16,value="Device active flag.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Device active flag.",accessMode=Schema.AccessMode.READ_ONLY)
@ApiModelProperty(position=12,value="Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. ")
@Schema(description="Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. ")
privateStringimage;
privatebooleanisDefault;
@ApiModelProperty(position=16,value="Type of the profile. Always 'DEFAULT' for now. Reserved for future use.")
@Schema(description="Type of the profile. Always 'DEFAULT' for now. Reserved for future use.")
privateDeviceProfileTypetype;
@ApiModelProperty(position=14,value="Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT.")
@Schema(description="Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT.")
@ApiModelProperty(position=7,value="Reference to the rule chain. "+
@Schema(description="Reference to the rule chain. "+
"If present, the specified rule chain will be used to process all messages related to device, including telemetry, attribute updates, etc. "+
"Otherwise, the root rule chain will be used to process those messages.")
privateRuleChainIddefaultRuleChainId;
@ApiModelProperty(position=6,value="Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details.")
@Schema(description="Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details.")
"If present, the specified queue will be used to store all unprocessed messages related to device, including telemetry, attribute updates, etc. "+
"Otherwise, the 'Main' queue will be used to store those messages.")
privateStringdefaultQueueName;
@ -81,15 +80,15 @@ public class DeviceProfile extends BaseData<DeviceProfileId> implements HasName,
@JsonIgnore
privatebyte[]profileDataBytes;
@NoXss
@ApiModelProperty(position=13,value="Unique provisioning key used by 'Device Provisioning' feature.")
@Schema(description="Unique provisioning key used by 'Device Provisioning' feature.")
privateStringprovisionDeviceKey;
@ApiModelProperty(position=9,value="Reference to the firmware OTA package. If present, the specified package will be used as default device firmware. ")
@Schema(description="Reference to the firmware OTA package. If present, the specified package will be used as default device firmware. ")
privateOtaPackageIdfirmwareId;
@ApiModelProperty(position=10,value="Reference to the software OTA package. If present, the specified package will be used as default device software. ")
@Schema(description="Reference to the software OTA package. If present, the specified package will be used as default device software. ")
privateOtaPackageIdsoftwareId;
@ApiModelProperty(position=17,value="Reference to the edge rule chain. "+
@Schema(description="Reference to the edge rule chain. "+
"If present, the specified edge rule chain will be used on the edge to process all messages related to device, including telemetry, attribute updates, etc. "+
"Otherwise, the edge root rule chain will be used to process those messages.")
privateRuleChainIddefaultEdgeRuleChainId;
@ -122,7 +121,7 @@ public class DeviceProfile extends BaseData<DeviceProfileId> implements HasName,
this.externalId=deviceProfile.getExternalId();
}
@ApiModelProperty(position=1,value="JSON object with the device profile Id. "+
@Schema(description="JSON object with the device profile Id. "+
"Specify this field to update the device profile. "+
"Referencing non-existing device profile Id will cause error. "+
"Omit this field to create new device profile.")
@ -131,18 +130,18 @@ public class DeviceProfile extends BaseData<DeviceProfileId> implements HasName,
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the profile creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the profile creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publiclonggetCreatedTime(){
returnsuper.getCreatedTime();
}
@ApiModelProperty(position=5,value="Used to mark the default profile. Default profile is used when the device profile is not specified during device creation.")
@Schema(description="Used to mark the default profile. Default profile is used when the device profile is not specified during device creation.")
publicbooleanisDefault(){
returnisDefault;
}
@ApiModelProperty(position=16,value="Complex JSON object that includes addition device profile configuration (transport, alarm rules, etc).")
@Schema(description="Complex JSON object that includes addition device profile configuration (transport, alarm rules, etc).")
@ApiModelProperty(position=3,value="Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. ")
@Schema(description="Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. ")
privatefinalStringimage;
@ApiModelProperty(position=4,value="Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details.")
@Schema(description="Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details.")
privatefinalDashboardIddefaultDashboardId;
@ApiModelProperty(position=5,value="Type of the profile. Always 'DEFAULT' for now. Reserved for future use.")
@Schema(description="Type of the profile. Always 'DEFAULT' for now. Reserved for future use.")
privatefinalDeviceProfileTypetype;
@ApiModelProperty(position=6,value="Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT.")
@Schema(description="Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT.")
@ApiModelProperty(position=8,required=true,value="Set of telemetry and attribute keys to expose via Entity View.")
@Schema(required=true,description="Set of telemetry and attribute keys to expose via Entity View.")
privateTelemetryEntityViewkeys;
@ApiModelProperty(position=9,value="Represents the start time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;")
@Schema(description="Represents the start time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;")
privatelongstartTimeMs;
@ApiModelProperty(position=10,value="Represents the end time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;")
@Schema(description="Represents the end time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;")
privatelongendTimeMs;
privateEntityViewIdexternalId;
@ -82,7 +82,7 @@ public class EntityView extends BaseDataWithAdditionalInfo<EntityViewId>
this.externalId=entityView.getExternalId();
}
@ApiModelProperty(position=4,value="JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publicCustomerIdgetCustomerId(){
returncustomerId;
@ -93,13 +93,13 @@ public class EntityView extends BaseDataWithAdditionalInfo<EntityViewId>
returnname;
}
@ApiModelProperty(position=3,value="JSON object with Tenant Id.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with Tenant Id.",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publicTenantIdgetTenantId(){
returntenantId;
}
@ApiModelProperty(position=1,value="JSON object with the Entity View Id. "+
@Schema(description="JSON object with the Entity View Id. "+
"Specify this field to update the Entity View. "+
"Referencing non-existing Entity View Id will cause error. "+
"Omit this field to create new Entity View.")
@ -108,13 +108,13 @@ public class EntityView extends BaseDataWithAdditionalInfo<EntityViewId>
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the Entity View creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the Entity View creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publiclonggetCreatedTime(){
returnsuper.getCreatedTime();
}
@ApiModelProperty(position=11,value="Additional parameters of the device",dataType="com.fasterxml.jackson.databind.JsonNode")
@Schema(description="Additional parameters of the device",implementation=com.fasterxml.jackson.databind.JsonNode.class)
@ApiModelProperty(position=12,value="Title of the Customer that owns the entity view.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Title of the Customer that owns the entity view.",accessMode=Schema.AccessMode.READ_ONLY)
privateStringcustomerTitle;
@ApiModelProperty(position=13,value="Indicates special 'Public' Customer that is auto-generated to use the entity view on public dashboards.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Indicates special 'Public' Customer that is auto-generated to use the entity view on public dashboards.",accessMode=Schema.AccessMode.READ_ONLY)
@ -53,7 +52,7 @@ public class EventInfo extends BaseData<EventId> {
super(event);
}
@ApiModelProperty(position=6,value="Timestamp of the event creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the event creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@ApiModelProperty(position=3,value="JSON object with Tenant Id. Tenant Id of the ota package can't be changed.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with Tenant Id. Tenant Id of the ota package can't be changed.",accessMode=Schema.AccessMode.READ_ONLY)
privateTenantIdtenantId;
@ApiModelProperty(position=4,value="JSON object with Device Profile Id. Device Profile Id of the ota package can't be changed.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with Device Profile Id. Device Profile Id of the ota package can't be changed.",accessMode=Schema.AccessMode.READ_ONLY)
@ApiModelProperty(position=10,value="Indicates OTA Package 'has data'. Field is returned from DB ('true' if data exists or url is set). If OTA Package 'has data' is 'false' we can not assign the OTA Package to the Device or Device Profile.",example="true",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Indicates OTA Package 'has data'. Field is returned from DB ('true' if data exists or url is set). If OTA Package 'has data' is 'false' we can not assign the OTA Package to the Device or Device Profile.",example="true",accessMode=Schema.AccessMode.READ_ONLY)
@ApiModelProperty(position=15,value="OTA Package data size.",example="8",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="OTA Package data size.",example="8",accessMode=Schema.AccessMode.READ_ONLY)
privateLongdataSize;
publicOtaPackageInfo(){
@ -103,7 +102,7 @@ public class OtaPackageInfo extends BaseDataWithAdditionalInfo<OtaPackageId> imp
this.dataSize=otaPackageInfo.getDataSize();
}
@ApiModelProperty(position=1,value="JSON object with the ota package Id. "+
@Schema(description="JSON object with the ota package Id. "+
"Specify existing ota package Id to update the ota package. "+
"Referencing non-existing ota package id will cause error. "+
"Omit this field to create new ota package.")
@ -112,7 +111,7 @@ public class OtaPackageInfo extends BaseDataWithAdditionalInfo<OtaPackageId> imp
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the ota package creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the ota package creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publiclonggetCreatedTime(){
returnsuper.getCreatedTime();
@ -129,7 +128,7 @@ public class OtaPackageInfo extends BaseDataWithAdditionalInfo<OtaPackageId> imp
returnStringUtils.isNotEmpty(url);
}
@ApiModelProperty(position=17,value="OTA Package description.",example="Description for the OTA Package fw_1.0")
@Schema(description="OTA Package description.",example="Description for the OTA Package fw_1.0")
@ApiModelProperty(position=16,value="Indicates OTA Package uses url. Should be 'true' if uses url or 'false' if will be used data.",example="true",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Indicates OTA Package uses url. Should be 'true' if uses url or 'false' if will be used data.",example="true",accessMode=Schema.AccessMode.READ_ONLY)
@ApiModelProperty(position=3,value="JSON object with Tenant Id. Tenant Id of the resource can't be changed.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with Tenant Id. Tenant Id of the resource can't be changed.",accessMode=Schema.AccessMode.READ_ONLY)
@ -66,7 +65,7 @@ public class TbResourceInfo extends BaseData<TbResourceId> implements HasName, H
this.searchText=resourceInfo.getSearchText();
}
@ApiModelProperty(position=1,value="JSON object with the Resource Id. "+
@Schema(description="JSON object with the Resource Id. "+
"Specify this field to update the Resource. "+
"Referencing non-existing Resource Id will cause error. "+
"Omit this field to create new Resource.")
@ -75,7 +74,7 @@ public class TbResourceInfo extends BaseData<TbResourceId> implements HasName, H
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the resource creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the resource creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@ -34,14 +33,14 @@ public class Tenant extends ContactBased<TenantId> implements HasTenantId, HasTi
@Length(fieldName="title")
@NoXss
@ApiModelProperty(position=3,value="Title of the tenant",example="Company A")
@Schema(description="Title of the tenant",example="Company A")
privateStringtitle;
@NoXss
@Length(fieldName="region")
@ApiModelProperty(position=5,value="Geo region of the tenant",example="North America")
@Schema(description="Geo region of the tenant",example="North America")
privateStringregion;
@ApiModelProperty(position=6,required=true,value="JSON object with Tenant Profile Id")
@Schema(required=true,description="JSON object with Tenant Profile Id")
privateTenantProfileIdtenantProfileId;
publicTenant(){
@ -74,7 +73,7 @@ public class Tenant extends ContactBased<TenantId> implements HasTenantId, HasTi
}
@Override
@ApiModelProperty(position=4,value="Name of the tenant. Read-only, duplicated from title for backward compatibility",example="Company A",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Name of the tenant. Read-only, duplicated from title for backward compatibility",example="Company A",accessMode=Schema.AccessMode.READ_ONLY)
@ -96,7 +95,7 @@ public class Tenant extends ContactBased<TenantId> implements HasTenantId, HasTi
this.tenantProfileId=tenantProfileId;
}
@ApiModelProperty(position=1,value="JSON object with the tenant Id. "+
@Schema(description="JSON object with the tenant Id. "+
"Specify this field to update the tenant. "+
"Referencing non-existing tenant Id will cause error. "+
"Omit this field to create new tenant.")
@ -105,61 +104,61 @@ public class Tenant extends ContactBased<TenantId> implements HasTenantId, HasTi
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the tenant creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the tenant creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@ApiModelProperty(position=1,value="JSON object with the tenant profile Id. "+
@Schema(description="JSON object with the tenant profile Id. "+
"Specify this field to update the tenant profile. "+
"Referencing non-existing tenant profile Id will cause error. "+
"Omit this field to create new tenant profile.")
@ -88,7 +87,7 @@ public class TenantProfile extends BaseData<TenantProfileId> implements HasName
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the tenant profile creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the tenant profile creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@ -71,7 +70,7 @@ public class User extends BaseDataWithAdditionalInfo<UserId> implements HasName,
}
@ApiModelProperty(position=1,value="JSON object with the User Id. "+
@Schema(description="JSON object with the User Id. "+
"Specify this field to update the device. "+
"Referencing non-existing User Id will cause error. "+
"Omit this field to create new customer.")
@ -80,13 +79,13 @@ public class User extends BaseDataWithAdditionalInfo<UserId> implements HasName,
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the user creation, in milliseconds",example="1609459200000",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the user creation, in milliseconds",example="1609459200000",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publiclonggetCreatedTime(){
returnsuper.getCreatedTime();
}
@ApiModelProperty(position=3,value="JSON object with the Tenant Id.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with the Tenant Id.",accessMode=Schema.AccessMode.READ_ONLY)
publicTenantIdgetTenantId(){
returntenantId;
}
@ -95,7 +94,7 @@ public class User extends BaseDataWithAdditionalInfo<UserId> implements HasName,
this.tenantId=tenantId;
}
@ApiModelProperty(position=4,value="JSON object with the Customer Id.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with the Customer Id.",accessMode=Schema.AccessMode.READ_ONLY)
publicCustomerIdgetCustomerId(){
returncustomerId;
}
@ -104,7 +103,7 @@ public class User extends BaseDataWithAdditionalInfo<UserId> implements HasName,
this.customerId=customerId;
}
@ApiModelProperty(position=5,required=true,value="Email of the user",example="user@example.com")
@Schema(required=true,description="Email of the user",example="user@example.com")
publicStringgetEmail(){
returnemail;
}
@ -113,14 +112,14 @@ public class User extends BaseDataWithAdditionalInfo<UserId> implements HasName,
this.email=email;
}
@ApiModelProperty(position=6,accessMode=ApiModelProperty.AccessMode.READ_ONLY,value="Duplicates the email of the user, readonly",example="user@example.com")
@Schema(accessMode=Schema.AccessMode.READ_ONLY,description="Duplicates the email of the user, readonly",example="user@example.com")
@ApiModelProperty(position=11,value="Alarm assignee user id")
@Schema(description="Alarm assignee user id")
privateUserIdassigneeId;
@ApiModelProperty(position=12,value="Timestamp of the alarm start time, in milliseconds",example="1634058704565")
@Schema(description="Timestamp of the alarm start time, in milliseconds",example="1634058704565")
privatelongstartTs;
@ApiModelProperty(position=13,value="Timestamp of the alarm end time(last time update), in milliseconds",example="1634111163522")
@Schema(description="Timestamp of the alarm end time(last time update), in milliseconds",example="1634111163522")
privatelongendTs;
@ApiModelProperty(position=14,value="Timestamp of the alarm acknowledgement, in milliseconds",example="1634115221948")
@Schema(description="Timestamp of the alarm acknowledgement, in milliseconds",example="1634115221948")
privatelongackTs;
@ApiModelProperty(position=15,value="Timestamp of the alarm clearing, in milliseconds",example="1634114528465")
@Schema(description="Timestamp of the alarm clearing, in milliseconds",example="1634114528465")
privatelongclearTs;
@ApiModelProperty(position=16,value="Timestamp of the alarm assignment, in milliseconds",example="1634115928465")
@Schema(description="Timestamp of the alarm assignment, in milliseconds",example="1634115928465")
privatelongassignTs;
@ApiModelProperty(position=17,value="JSON object with alarm details")
@Schema(description="JSON object with alarm details")
privatetransientJsonNodedetails;
@ApiModelProperty(position=18,value="Propagation flag to specify if alarm should be propagated to parent entities of alarm originator",example="true")
@Schema(description="Propagation flag to specify if alarm should be propagated to parent entities of alarm originator",example="true")
privatebooleanpropagate;
@ApiModelProperty(position=19,value="Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator",example="true")
@Schema(description="Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator",example="true")
privatebooleanpropagateToOwner;
@ApiModelProperty(position=20,value="Propagation flag to specify if alarm should be propagated to the tenant entity",example="true")
@Schema(description="Propagation flag to specify if alarm should be propagated to the tenant entity",example="true")
privatebooleanpropagateToTenant;
@ApiModelProperty(position=21,value="JSON array of relation types that should be used for propagation. "+
@Schema(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.")
privateList<String>propagateRelationTypes;
@ -125,12 +124,12 @@ public class Alarm extends BaseData<AlarmId> implements HasName, HasTenantId, Ha
@ApiModelProperty(position=5,required=true,value="representing type of the Alarm",example="High Temperature Alarm")
@Schema(required=true,description="representing type of the Alarm",example="High Temperature Alarm")
publicStringgetName(){
returntype;
}
@ApiModelProperty(position=1,value="JSON object with the alarm Id. "+
@Schema(description="JSON object with the alarm Id. "+
"Specify this field to update the alarm. "+
"Referencing non-existing alarm Id will cause error. "+
"Omit this field to create new alarm.")
@ -140,14 +139,14 @@ public class Alarm extends BaseData<AlarmId> implements HasName, HasTenantId, Ha
}
@ApiModelProperty(position=2,value="Timestamp of the alarm creation, in milliseconds",example="1634058704567",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the alarm creation, in milliseconds",example="1634058704567",accessMode=Schema.AccessMode.READ_ONLY)
@ApiModelProperty(position=3,value="JSON object with Alarm id.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with Alarm id.",accessMode=Schema.AccessMode.READ_ONLY)
privateEntityIdalarmId;
@ApiModelProperty(position=4,value="JSON object with User id.",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="JSON object with User id.",accessMode=Schema.AccessMode.READ_ONLY)
privateUserIduserId;
@ApiModelProperty(position=5,value="Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.",example="SYSTEM/OTHER",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.",example="SYSTEM/OTHER",accessMode=Schema.AccessMode.READ_ONLY)
privateAlarmCommentTypetype;
@ApiModelProperty(position=6,value="JSON object with text of comment.",dataType="com.fasterxml.jackson.databind.JsonNode")
@Schema(description="JSON object with text of comment.",implementation=com.fasterxml.jackson.databind.JsonNode.class)
@NoXss
@Length(fieldName="comment",max=10000)
privatetransientJsonNodecomment;
@ApiModelProperty(position=1,value="JSON object with the alarm comment Id. "+
@Schema(description="JSON object with the alarm comment Id. "+
"Specify this field to update the alarm comment. "+
"Referencing non-existing alarm Id will cause error. "+
"Omit this field to create new alarm.")
@ -55,7 +54,7 @@ public class AlarmComment extends BaseData<AlarmCommentId> implements HasName {
returnsuper.getId();
}
@ApiModelProperty(position=2,value="Timestamp of the alarm comment creation, in milliseconds",example="1634058704567",accessMode=ApiModelProperty.AccessMode.READ_ONLY)
@Schema(description="Timestamp of the alarm comment creation, in milliseconds",example="1634058704567",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publiclonggetCreatedTime(){
returnsuper.getCreatedTime();
@ -71,7 +70,7 @@ public class AlarmComment extends BaseData<AlarmCommentId> implements HasName {
@ApiModelProperty(position=1,value="Propagation flag to specify if alarm should be propagated to parent entities of alarm originator",example="true")
@Schema(description="Propagation flag to specify if alarm should be propagated to parent entities of alarm originator",example="true")
privatebooleanpropagate;
@ApiModelProperty(position=2,value="Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator",example="true")
@Schema(description="Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator",example="true")
privatebooleanpropagateToOwner;
@ApiModelProperty(position=3,value="Propagation flag to specify if alarm should be propagated to the tenant entity",example="true")
@Schema(description="Propagation flag to specify if alarm should be propagated to the tenant entity",example="true")
privatebooleanpropagateToTenant;
@NoXss
@ApiModelProperty(position=4,value="JSON array of relation types that should be used for propagation. "+
@Schema(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.")