diff --git a/examples/example_application.py b/examples/example_application.py index 06244d4e..96451bbb 100644 --- a/examples/example_application.py +++ b/examples/example_application.py @@ -18,7 +18,6 @@ from tb_rest_client.rest_client_ce import * from tb_rest_client.rest import ApiException - logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(module)s - %(lineno)d - %(message)s', datefmt='%Y-%m-%d %H:%M:%S') @@ -31,29 +30,42 @@ password = "tenant" -# Creating the REST client object with context manager to get auto token refresh -with RestClientCE(base_url=url) as rest_client: - try: - # Auth with credentials - rest_client.login(username=username, password=password) +def main(): + # Creating the REST client object with context manager to get auto token refresh + with RestClientCE(base_url=url) as rest_client: + try: + # Auth with credentials + rest_client.login(username=username, password=password) + + # Creating an Asset + default_asset_profile_id = rest_client.get_default_asset_profile_info().id + asset = Asset(name="Building 1", label="Building 1", + asset_profile_id=default_asset_profile_id) + asset = rest_client.save_asset(asset) - # Creating an Asset - asset = Asset(name="Building 1", type="building") - asset = rest_client.save_asset(asset) + logging.info("Asset was created:\n%r\n", asset) - logging.info("Asset was created:\n%r\n", asset) + # Creating a Device + # Also, you can use default Device Profile: + # default_device_profile_id = rest_client.get_default_device_profile_info().id + device_profile = DeviceProfile(name="Thermometer", + profile_data=DeviceProfileData(configuration={"type": "DEFAULT"}, + transport_configuration={"type": "DEFAULT"})) + device_profile = rest_client.save_device_profile(device_profile) + device = Device(name="Thermometer 1", label="Thermometer 1", + device_profile_id=device_profile.id) + device = rest_client.save_device(device) - # creating a Device - device = Device(name="Thermometer 1", type="thermometer") - device = rest_client.save_device(device) + logging.info(" Device was created:\n%r\n", device) - logging.info(" Device was created:\n%r\n", device) + # Creating relations from device to asset + relation = EntityRelation(_from=asset.id, to=device.id, type="Contains") + rest_client.save_relation(relation) - # Creating relations from device to asset - relation = EntityRelation(_from=asset.id, to=device.id, type="Contains") - relation = rest_client.save_relation(relation) + logging.info(" Relation was created:\n%r\n", relation) + except ApiException as e: + logging.exception(e) - logging.info(" Relation was created:\n%r\n", relation) - except ApiException as e: - logging.exception(e) +if __name__ == '__main__': + main() diff --git a/examples/example_application_2.py b/examples/example_application_2.py index 87f3c908..f2114f7d 100644 --- a/examples/example_application_2.py +++ b/examples/example_application_2.py @@ -44,8 +44,9 @@ def main(): current_user = rest_client.get_user() # Creating Dashboard Group on the Tenant Level - shared_dashboards_group = EntityGroup(name="Shared Dashboards", type="DASHBOARD") + shared_dashboards_group = EntityGroup(name="Shared Dashboards3", type="DASHBOARD") shared_dashboards_group = rest_client.save_entity_group(shared_dashboards_group) + logging.info('Dashboard group created:\n%r\n', shared_dashboards_group) # Loading Dashboard from file dashboard_json = None @@ -53,35 +54,41 @@ def main(): dashboard_json = load(dashboard_file) dashboard = Dashboard(title=dashboard_json["title"], configuration=dashboard_json["configuration"]) dashboard = rest_client.save_dashboard(dashboard) + logging.info('Dashboard created:\n%r\n', dashboard) # Adding Dashboard to the Shared Dashboards Group - rest_client.add_entities_to_entity_group([dashboard.id.id], shared_dashboards_group.id) + dashboard = list(filter(lambda x: x.name == dashboard.name, + rest_client.get_user_dashboards(10, 0).data))[0] + rest_client.add_entities_to_entity_group(shared_dashboards_group.id, [dashboard.id.id]) # Creating Customer 1 - customer1 = Customer(title="Customer 1") - customer1 = rest_client.save_customer(customer1) + customer1 = Customer(title="Customer 11") + customer1 = rest_client.save_customer(body=customer1) # Creating Device - device = Device(name="WaterMeter1", type="waterMeter") + default_device_profile_id = rest_client.get_default_device_profile_info().id + device = Device(name="WaterMeter 1", label="WaterMeter 1", device_profile_id=default_device_profile_id) device = rest_client.save_device(device) + logging.info('Device created:\n%r\n', device) # Fetching automatically created "Customer Administrators" Group. - customer1_administrators = rest_client.get_entity_group_by_owner_and_name_and_type(customer1.id.entity_type, customer1.id.id, "USER", "Customer Administrators") + customer1_administrators = rest_client.get_entity_group_by_owner_and_name_and_type(customer1.id, "USER", "Customer Administrators") # Creating Read-Only Role read_only_role = Role(name="Read-Only", permissions=['READ', 'READ_ATTRIBUTES', 'READ_TELEMETRY', 'READ_CREDENTIALS'], type="GROUP") read_only_role = rest_client.save_role(read_only_role) + logging.info('Role created:\n%r\n', read_only_role) # Assigning Shared Dashboards to the Customer 1 Administrators tenant_id = current_user.tenant_id group_permission = GroupPermission(role_id=read_only_role.id, name="Read Only Permission", - is_public=False, user_group_id=customer1_administrators.id, tenant_id=tenant_id, entity_group_id=shared_dashboards_group.id, entity_group_type=shared_dashboards_group.type) group_permission = rest_client.save_group_permission(group_permission) + logging.info('Group permission created:\n%r\n', group_permission) # Creating User for Customer 1 with default dashboard from Tenant "Shared Dashboards" group. user_email = "user@thingsboard.org" @@ -95,10 +102,10 @@ def main(): email=user_email, additional_info=additional_info) user = rest_client.save_user(user, send_activation_mail=False) - rest_client.activate_user(user.id, user_password) - - rest_client.add_entities_to_entity_group([user.id.id], customer1_administrators.id) + rest_client.activate_user(body=ActivateUserRequest(user.id, user_password), send_activation_mail=False) + rest_client.add_entities_to_entity_group(customer1_administrators.id, [user.id.id]) + logging.info('User created:\n%r\n', user) except ApiException as e: logging.exception(e) diff --git a/tb_rest_client/api/api_ce/__init__.py b/tb_rest_client/api/api_ce/__init__.py index 4fa2e2dc..bd812f85 100644 --- a/tb_rest_client/api/api_ce/__init__.py +++ b/tb_rest_client/api/api_ce/__init__.py @@ -16,7 +16,6 @@ from .entity_relation_controller_api import EntityRelationControllerApi from .entity_view_controller_api import EntityViewControllerApi from .admin_controller_api import AdminControllerApi -from .sign_up_controller_api import SignUpControllerApi from .tb_resource_controller_api import TbResourceControllerApi from .o_auth_2_controller_api import OAuth2ControllerApi from .tenant_profile_controller_api import TenantProfileControllerApi @@ -32,6 +31,12 @@ from .ota_package_controller_api import OtaPackageControllerApi from .entities_version_control_controller_api import EntitiesVersionControlControllerApi from .device_api_controller_api import DeviceApiControllerApi -from .two_fa_config_controller_api import TwoFaConfigControllerApi from .two_factor_auth_controller_api import TwoFactorAuthControllerApi from .alarm_comment_controller_api import AlarmCommentControllerApi +from .asset_profile_controller_api import AssetProfileControllerApi +from .notification_controller_api import NotificationControllerApi +from .notification_rule_controller_api import NotificationRuleControllerApi +from .notification_target_controller_api import NotificationTargetControllerApi +from .notification_template_controller_api import NotificationTemplateControllerApi +from .usage_info_controller_api import UsageInfoControllerApi +from .two_factor_auth_config_controller_api import TwoFactorAuthConfigControllerApi diff --git a/tb_rest_client/api/api_ce/admin_controller_api.py b/tb_rest_client/api/api_ce/admin_controller_api.py index 06cf0966..e8ff6d5c 100644 --- a/tb_rest_client/api/api_ce/admin_controller_api.py +++ b/tb_rest_client/api/api_ce/admin_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,6 +32,188 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def auto_commit_settings_exists_using_get(self, **kwargs): # noqa: E501 + """Check auto commit settings exists (autoCommitSettingsExists) # noqa: E501 + + Check whether the auto commit settings exists. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auto_commit_settings_exists_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: bool + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.auto_commit_settings_exists_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.auto_commit_settings_exists_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def auto_commit_settings_exists_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Check auto commit settings exists (autoCommitSettingsExists) # noqa: E501 + + Check whether the auto commit settings exists. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.auto_commit_settings_exists_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: bool + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method auto_commit_settings_exists_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/autoCommitSettings/exists', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='bool', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def check_repository_access_using_post(self, **kwargs): # noqa: E501 + """Check repository access (checkRepositoryAccess) # noqa: E501 + + Attempts to check repository access. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.check_repository_access_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param RepositorySettings body: + :return: DeferredResultVoid + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.check_repository_access_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.check_repository_access_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def check_repository_access_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Check repository access (checkRepositoryAccess) # noqa: E501 + + Attempts to check repository access. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.check_repository_access_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param RepositorySettings body: + :return: DeferredResultVoid + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method check_repository_access_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/repositorySettings/checkAccess', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultVoid', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def check_updates_using_get(self, **kwargs): # noqa: E501 """Check for new Platform Releases (checkUpdates) # noqa: E501 @@ -119,38 +301,38 @@ def check_updates_using_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_jwt_settings_using_get(self, **kwargs): # noqa: E501 - """Get the JWT Settings object (getJwtSettings) # noqa: E501 + def delete_auto_commit_settings_using_delete(self, **kwargs): # noqa: E501 + """Delete auto commit settings (deleteAutoCommitSettings) # noqa: E501 - Get the JWT Settings object that contains JWT token policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Deletes the auto commit settings. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_jwt_settings_using_get(async_req=True) + >>> thread = api.delete_auto_commit_settings_using_delete(async_req=True) >>> result = thread.get() :param async_req bool - :return: JWTSettings + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_jwt_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return self.delete_auto_commit_settings_using_delete_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_jwt_settings_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.delete_auto_commit_settings_using_delete_with_http_info(**kwargs) # noqa: E501 return data - def get_jwt_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Get the JWT Settings object (getJwtSettings) # noqa: E501 + def delete_auto_commit_settings_using_delete_with_http_info(self, **kwargs): # noqa: E501 + """Delete auto commit settings (deleteAutoCommitSettings) # noqa: E501 - Get the JWT Settings object that contains JWT token policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Deletes the auto commit settings. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_jwt_settings_using_get_with_http_info(async_req=True) + >>> thread = api.delete_auto_commit_settings_using_delete_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: JWTSettings + :return: None If the method is called asynchronously, returns the request thread. """ @@ -166,7 +348,7 @@ def get_jwt_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_jwt_settings_using_get" % key + " to method delete_auto_commit_settings_using_delete" % key ) params[key] = val del params['kwargs'] @@ -191,14 +373,14 @@ def get_jwt_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/jwtSettings', 'GET', + '/api/admin/autoCommitSettings', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='JWTSettings', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -206,45 +388,43 @@ def get_jwt_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_jwt_settings_using_post(self, **kwargs): # noqa: E501 - """Update JWT Settings (saveJwtSettings) # noqa: E501 + def delete_repository_settings_using_delete(self, **kwargs): # noqa: E501 + """Delete repository settings (deleteRepositorySettings) # noqa: E501 - Updates the JWT Settings object that contains JWT token policy, etc. The tokenSigningKey field is a Base64 encoded string. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Deletes the repository settings. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_jwt_settings_using_post(async_req=True) + >>> thread = api.delete_repository_settings_using_delete(async_req=True) >>> result = thread.get() :param async_req bool - :param JWTSettings body: - :return: JWTPair + :return: DeferredResultVoid If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_jwt_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return self.delete_repository_settings_using_delete_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.save_jwt_settings_using_post_with_http_info(**kwargs) # noqa: E501 + (data) = self.delete_repository_settings_using_delete_with_http_info(**kwargs) # noqa: E501 return data - def save_jwt_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Update JWT Settings (saveJwtSettings) # noqa: E501 + def delete_repository_settings_using_delete_with_http_info(self, **kwargs): # noqa: E501 + """Delete repository settings (deleteRepositorySettings) # noqa: E501 - Updates the JWT Settings object that contains JWT token policy, etc. The tokenSigningKey field is a Base64 encoded string. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Deletes the repository settings. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_jwt_settings_using_post_with_http_info(async_req=True) + >>> thread = api.delete_repository_settings_using_delete_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param JWTSettings body: - :return: JWTPair + :return: DeferredResultVoid If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -255,7 +435,7 @@ def save_jwt_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method save_jwt_settings_using_post" % key + " to method delete_repository_settings_using_delete" % key ) params[key] = val del params['kwargs'] @@ -272,28 +452,22 @@ def save_jwt_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/jwtSettings', 'POST', + '/api/admin/repositorySettings', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='JWTPair', # noqa: E501 + response_type='DeferredResultVoid', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -323,43 +497,23 @@ def get_admin_settings_using_get(self, key, **kwargs): # noqa: E501 (data) = self.get_admin_settings_using_get_with_http_info(key, **kwargs) # noqa: E501 return data - def get_repository_settings_using_get(self, **kwargs): # noqa: E501 - """Get repository settings (getRepositorySettings) # noqa: E501 - - Get the repository settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_repository_settings_using_get(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: RepositorySettings - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_repository_settings_using_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_repository_settings_using_get_with_http_info(**kwargs) # noqa: E501 - return data - - def get_repository_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Get repository settings (getRepositorySettings) # noqa: E501 + def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E501 + """Get the Administration Settings object using key (getAdminSettings) # noqa: E501 - Get the repository settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Get the Administration Settings object using specified string key. Referencing non-existing key will cause an error. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_repository_settings_using_get_with_http_info(async_req=True) + >>> thread = api.get_admin_settings_using_get_with_http_info(key, async_req=True) >>> result = thread.get() :param async_req bool - :return: RepositorySettings + :param str key: A string value of the key (e.g. 'general' or 'mail'). (required) + :return: AdminSettings If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -370,14 +524,20 @@ def get_repository_settings_using_get_with_http_info(self, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_repository_settings_using_get" % key + " to method get_admin_settings_using_get" % key ) params[key] = val del params['kwargs'] + # verify the required parameter 'key' is set + if ('key' not in params or + params['key'] is None): + raise ValueError("Missing the required parameter `key` when calling `get_admin_settings_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'key' in params: + path_params['key'] = params['key'] # noqa: E501 query_params = [] @@ -395,14 +555,14 @@ def get_repository_settings_using_get_with_http_info(self, **kwargs): # noqa: E auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/repositorySettings', 'GET', + '/api/admin/settings/{key}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='RepositorySettings', # noqa: E501 + response_type='AdminSettings', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -410,38 +570,38 @@ def get_repository_settings_using_get_with_http_info(self, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def delete_repository_settings_using_delete(self, **kwargs): # noqa: E501 - """Delete repository settings (deleteRepositorySettings) # noqa: E501 + def get_auto_commit_settings_using_get(self, **kwargs): # noqa: E501 + """Get auto commit settings (getAutoCommitSettings) # noqa: E501 - Deletes the repository settings. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Get the auto commit settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_repository_settings_using_delete(async_req=True) + >>> thread = api.get_auto_commit_settings_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :return: DeferredResultVoid + :return: dict(str, AutoVersionCreateConfig) If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_repository_settings_using_delete_with_http_info(**kwargs) # noqa: E501 + return self.get_auto_commit_settings_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.delete_repository_settings_using_delete_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_auto_commit_settings_using_get_with_http_info(**kwargs) # noqa: E501 return data - def delete_repository_settings_using_delete_with_http_info(self, **kwargs): # noqa: E501 - """Delete repository settings (deleteRepositorySettings) # noqa: E501 + def get_auto_commit_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get auto commit settings (getAutoCommitSettings) # noqa: E501 - Deletes the repository settings. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Get the auto commit settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_repository_settings_using_delete_with_http_info(async_req=True) + >>> thread = api.get_auto_commit_settings_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: DeferredResultVoid + :return: dict(str, AutoVersionCreateConfig) If the method is called asynchronously, returns the request thread. """ @@ -457,7 +617,7 @@ def delete_repository_settings_using_delete_with_http_info(self, **kwargs): # n if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_repository_settings_using_delete" % key + " to method get_auto_commit_settings_using_get" % key ) params[key] = val del params['kwargs'] @@ -482,14 +642,14 @@ def delete_repository_settings_using_delete_with_http_info(self, **kwargs): # n auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/repositorySettings', 'DELETE', + '/api/admin/autoCommitSettings', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='DeferredResultVoid', # noqa: E501 + response_type='dict(str, AutoVersionCreateConfig)', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -497,38 +657,38 @@ def delete_repository_settings_using_delete_with_http_info(self, **kwargs): # n _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repository_settings_exists_using_get(self, **kwargs): # noqa: E501 - """Check repository settings exists (repositorySettingsExists) # noqa: E501 + def get_features_info_using_get(self, **kwargs): # noqa: E501 + """Get features info (getFeaturesInfo) # noqa: E501 - Check whether the repository settings exists. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Get information about enabled/disabled features. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repository_settings_exists_using_get(async_req=True) + >>> thread = api.get_features_info_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :return: bool + :return: FeaturesInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repository_settings_exists_using_get_with_http_info(**kwargs) # noqa: E501 + return self.get_features_info_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.repository_settings_exists_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_features_info_using_get_with_http_info(**kwargs) # noqa: E501 return data - def repository_settings_exists_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Check repository settings exists (repositorySettingsExists) # noqa: E501 + def get_features_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get features info (getFeaturesInfo) # noqa: E501 - Check whether the repository settings exists. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Get information about enabled/disabled features. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repository_settings_exists_using_get_with_http_info(async_req=True) + >>> thread = api.get_features_info_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: bool + :return: FeaturesInfo If the method is called asynchronously, returns the request thread. """ @@ -544,7 +704,7 @@ def repository_settings_exists_using_get_with_http_info(self, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repository_settings_exists_using_get" % key + " to method get_features_info_using_get" % key ) params[key] = val del params['kwargs'] @@ -569,14 +729,14 @@ def repository_settings_exists_using_get_with_http_info(self, **kwargs): # noqa auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/repositorySettings/exists', 'GET', + '/api/admin/featuresInfo', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='bool', # noqa: E501 + response_type='FeaturesInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -584,45 +744,43 @@ def repository_settings_exists_using_get_with_http_info(self, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_repository_settings_using_post(self, **kwargs): # noqa: E501 - """Creates or Updates the repository settings (saveRepositorySettings) # noqa: E501 + def get_jwt_settings_using_get(self, **kwargs): # noqa: E501 + """Get the JWT Settings object (getJwtSettings) # noqa: E501 - Creates or Updates the repository settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Get the JWT Settings object that contains JWT token policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_repository_settings_using_post(async_req=True) + >>> thread = api.get_jwt_settings_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param RepositorySettings body: - :return: DeferredResultRepositorySettings + :return: JWTSettings If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_repository_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return self.get_jwt_settings_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.save_repository_settings_using_post_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_jwt_settings_using_get_with_http_info(**kwargs) # noqa: E501 return data - def save_repository_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Creates or Updates the repository settings (saveRepositorySettings) # noqa: E501 + def get_jwt_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get the JWT Settings object (getJwtSettings) # noqa: E501 - Creates or Updates the repository settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Get the JWT Settings object that contains JWT token policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_repository_settings_using_post_with_http_info(async_req=True) + >>> thread = api.get_jwt_settings_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param RepositorySettings body: - :return: DeferredResultRepositorySettings + :return: JWTSettings If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -633,7 +791,7 @@ def save_repository_settings_using_post_with_http_info(self, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method save_repository_settings_using_post" % key + " to method get_jwt_settings_using_get" % key ) params[key] = val del params['kwargs'] @@ -650,74 +808,64 @@ def save_repository_settings_using_post_with_http_info(self, **kwargs): # noqa: local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/repositorySettings', 'POST', + '/api/admin/jwtSettings', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='DeferredResultRepositorySettings', # noqa: E501 + response_type='JWTSettings', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def check_repository_access_using_post(self, **kwargs): # noqa: E501 - """Check repository access (checkRepositoryAccess) # noqa: E501 - Attempts to check repository access. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + def get_repository_settings_info_using_get(self, **kwargs): # noqa: E501 + """getRepositorySettingsInfo # noqa: E501 + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.check_repository_access_using_post(async_req=True) + >>> thread = api.get_repository_settings_info_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param RepositorySettings body: - :return: DeferredResultVoid + :return: RepositorySettingsInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.check_repository_access_using_post_with_http_info(**kwargs) # noqa: E501 + return self.get_repository_settings_info_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.check_repository_access_using_post_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_repository_settings_info_using_get_with_http_info(**kwargs) # noqa: E501 return data - def check_repository_access_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Check repository access (checkRepositoryAccess) # noqa: E501 + def get_repository_settings_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getRepositorySettingsInfo # noqa: E501 - Attempts to check repository access. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.check_repository_access_using_post_with_http_info(async_req=True) + >>> thread = api.get_repository_settings_info_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param RepositorySettings body: - :return: DeferredResultVoid + :return: RepositorySettingsInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -728,7 +876,7 @@ def check_repository_access_using_post_with_http_info(self, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method check_repository_access_using_post" % key + " to method get_repository_settings_info_using_get" % key ) params[key] = val del params['kwargs'] @@ -745,67 +893,61 @@ def check_repository_access_using_post_with_http_info(self, **kwargs): # noqa: local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/repositorySettings/checkAccess', 'POST', + '/api/admin/repositorySettings/info', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='DeferredResultVoid', # noqa: E501 + response_type='RepositorySettingsInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def delete_auto_commit_settings_using_delete(self, **kwargs): # noqa: E501 - """Delete auto commit settings (deleteAutoCommitSettings) # noqa: E501 - Deletes the auto commit settings. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + def get_repository_settings_using_get(self, **kwargs): # noqa: E501 + """Get repository settings (getRepositorySettings) # noqa: E501 + + Get the repository settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_auto_commit_settings_using_delete(async_req=True) + >>> thread = api.get_repository_settings_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :return: None + :return: RepositorySettings If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_auto_commit_settings_using_delete_with_http_info(**kwargs) # noqa: E501 + return self.get_repository_settings_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.delete_auto_commit_settings_using_delete_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_repository_settings_using_get_with_http_info(**kwargs) # noqa: E501 return data - def delete_auto_commit_settings_using_delete_with_http_info(self, **kwargs): # noqa: E501 - """Delete auto commit settings (deleteAutoCommitSettings) # noqa: E501 + def get_repository_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get repository settings (getRepositorySettings) # noqa: E501 - Deletes the auto commit settings. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Get the repository settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_auto_commit_settings_using_delete_with_http_info(async_req=True) + >>> thread = api.get_repository_settings_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: None + :return: RepositorySettings If the method is called asynchronously, returns the request thread. """ @@ -821,7 +963,7 @@ def delete_auto_commit_settings_using_delete_with_http_info(self, **kwargs): # if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_auto_commit_settings_using_delete" % key + " to method get_repository_settings_using_get" % key ) params[key] = val del params['kwargs'] @@ -846,53 +988,53 @@ def delete_auto_commit_settings_using_delete_with_http_info(self, **kwargs): # auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/autoCommitSettings', 'DELETE', + '/api/admin/repositorySettings', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='RepositorySettings', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def auto_commit_settings_exists_using_get(self, **kwargs): # noqa: E501 - """Check auto commit settings exists (autoCommitSettingsExists) # noqa: E501 - Check whether the auto commit settings exists. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + def get_security_settings_using_get(self, **kwargs): # noqa: E501 + """Get the Security Settings object # noqa: E501 + + Get the Security Settings object that contains password policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.auto_commit_settings_exists_using_get(async_req=True) + >>> thread = api.get_security_settings_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :return: bool + :return: SecuritySettings If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.auto_commit_settings_exists_using_get_with_http_info(**kwargs) # noqa: E501 + return self.get_security_settings_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.auto_commit_settings_exists_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_security_settings_using_get_with_http_info(**kwargs) # noqa: E501 return data - def auto_commit_settings_exists_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Check auto commit settings exists (autoCommitSettingsExists) # noqa: E501 + def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get the Security Settings object # noqa: E501 - Check whether the auto commit settings exists. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Get the Security Settings object that contains password policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.auto_commit_settings_exists_using_get_with_http_info(async_req=True) + >>> thread = api.get_security_settings_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: bool + :return: SecuritySettings If the method is called asynchronously, returns the request thread. """ @@ -908,7 +1050,7 @@ def auto_commit_settings_exists_using_get_with_http_info(self, **kwargs): # noq if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method auto_commit_settings_exists_using_get" % key + " to method get_security_settings_using_get" % key ) params[key] = val del params['kwargs'] @@ -933,60 +1075,58 @@ def auto_commit_settings_exists_using_get_with_http_info(self, **kwargs): # noq auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/autoCommitSettings/exists', 'GET', + '/api/admin/securitySettings', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='bool', # noqa: E501 + response_type='SecuritySettings', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def save_auto_commit_settings_using_post(self, **kwargs): # noqa: E501 - """Creates or Updates the auto commit settings (saveAutoCommitSettings) # noqa: E501 - Creates or Updates the auto commit settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + def get_system_info_using_get(self, **kwargs): # noqa: E501 + """Get system info (getSystemInfo) # noqa: E501 + + Get main information about system. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_auto_commit_settings_using_post(async_req=True) + >>> thread = api.get_system_info_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param dict(str, AutoVersionCreateConfig) body: - :return: dict(str, AutoVersionCreateConfig) + :return: SystemInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_auto_commit_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return self.get_system_info_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.save_auto_commit_settings_using_post_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_system_info_using_get_with_http_info(**kwargs) # noqa: E501 return data - def save_auto_commit_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Creates or Updates the auto commit settings (saveAutoCommitSettings) # noqa: E501 + def get_system_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get system info (getSystemInfo) # noqa: E501 - Creates or Updates the auto commit settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Get main information about system. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_auto_commit_settings_using_post_with_http_info(async_req=True) + >>> thread = api.get_system_info_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param dict(str, AutoVersionCreateConfig) body: - :return: dict(str, AutoVersionCreateConfig) + :return: SystemInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -997,7 +1137,7 @@ def save_auto_commit_settings_using_post_with_http_info(self, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method save_auto_commit_settings_using_post" % key + " to method get_system_info_using_get" % key ) params[key] = val del params['kwargs'] @@ -1014,67 +1154,61 @@ def save_auto_commit_settings_using_post_with_http_info(self, **kwargs): # noqa local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/autoCommitSettings', 'POST', + '/api/admin/systemInfo', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='dict(str, AutoVersionCreateConfig)', # noqa: E501 + response_type='SystemInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def get_auto_commit_settings_using_get(self, **kwargs): # noqa: E501 - """Get auto commit settings (getAutoCommitSettings) # noqa: E501 - Get the auto commit settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + def repository_settings_exists_using_get(self, **kwargs): # noqa: E501 + """Check repository settings exists (repositorySettingsExists) # noqa: E501 + + Check whether the repository settings exists. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_auto_commit_settings_using_get(async_req=True) + >>> thread = api.repository_settings_exists_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :return: dict(str, AutoVersionCreateConfig) + :return: bool If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_auto_commit_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return self.repository_settings_exists_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_auto_commit_settings_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.repository_settings_exists_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_auto_commit_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Get auto commit settings (getAutoCommitSettings) # noqa: E501 + def repository_settings_exists_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Check repository settings exists (repositorySettingsExists) # noqa: E501 - Get the auto commit settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Check whether the repository settings exists. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_auto_commit_settings_using_get_with_http_info(async_req=True) + >>> thread = api.repository_settings_exists_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: dict(str, AutoVersionCreateConfig) + :return: bool If the method is called asynchronously, returns the request thread. """ @@ -1090,7 +1224,7 @@ def get_auto_commit_settings_using_get_with_http_info(self, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_auto_commit_settings_using_get" % key + " to method repository_settings_exists_using_get" % key ) params[key] = val del params['kwargs'] @@ -1115,14 +1249,14 @@ def get_auto_commit_settings_using_get_with_http_info(self, **kwargs): # noqa: auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/autoCommitSettings', 'GET', + '/api/admin/repositorySettings/exists', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='dict(str, AutoVersionCreateConfig)', # noqa: E501 + response_type='bool', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1130,23 +1264,45 @@ def get_auto_commit_settings_using_get_with_http_info(self, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E501 + def save_admin_settings_using_post(self, **kwargs): # noqa: E501 """Get the Administration Settings object using key (getAdminSettings) # noqa: E501 - Get the Administration Settings object using specified string key. Referencing non-existing key will cause an error. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Creates or Updates the Administration Settings. Platform generates random Administration Settings Id during settings creation. The Administration Settings Id will be present in the response. Specify the Administration Settings Id when you would like to update the Administration Settings. Referencing non-existing Administration Settings Id will cause an error. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_admin_settings_using_get_with_http_info(key, async_req=True) + >>> thread = api.save_admin_settings_using_post(async_req=True) >>> result = thread.get() :param async_req bool - :param str key: A string value of the key (e.g. 'general' or 'mail'). (required) + :param AdminSettings body: :return: AdminSettings If the method is called asynchronously, returns the request thread. """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_admin_settings_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_admin_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return data - all_params = ['key'] # noqa: E501 + def save_admin_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Get the Administration Settings object using key (getAdminSettings) # noqa: E501 + + Creates or Updates the Administration Settings. Platform generates random Administration Settings Id during settings creation. The Administration Settings Id will be present in the response. Specify the Administration Settings Id when you would like to update the Administration Settings. Referencing non-existing Administration Settings Id will cause an error. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_admin_settings_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AdminSettings body: + :return: AdminSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1157,20 +1313,14 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_admin_settings_using_get" % key + " to method save_admin_settings_using_post" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'key' is set - if ('key' not in params or - params['key'] is None): - raise ValueError("Missing the required parameter `key` when calling `get_admin_settings_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'key' in params: - path_params['key'] = params['key'] # noqa: E501 query_params = [] @@ -1180,15 +1330,21 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/settings/{key}', 'GET', + '/api/admin/settings', 'POST', path_params, query_params, header_params, @@ -1203,43 +1359,45 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_security_settings_using_get(self, **kwargs): # noqa: E501 - """Get the Security Settings object # noqa: E501 + def save_auto_commit_settings_using_post(self, **kwargs): # noqa: E501 + """Creates or Updates the auto commit settings (saveAutoCommitSettings) # noqa: E501 - Get the Security Settings object that contains password policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Creates or Updates the auto commit settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_security_settings_using_get(async_req=True) + >>> thread = api.save_auto_commit_settings_using_post(async_req=True) >>> result = thread.get() :param async_req bool - :return: SecuritySettings + :param dict(str, AutoVersionCreateConfig) body: + :return: dict(str, AutoVersionCreateConfig) If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_security_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return self.save_auto_commit_settings_using_post_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_security_settings_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.save_auto_commit_settings_using_post_with_http_info(**kwargs) # noqa: E501 return data - def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Get the Security Settings object # noqa: E501 + def save_auto_commit_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Creates or Updates the auto commit settings (saveAutoCommitSettings) # noqa: E501 - Get the Security Settings object that contains password policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Creates or Updates the auto commit settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_security_settings_using_get_with_http_info(async_req=True) + >>> thread = api.save_auto_commit_settings_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: SecuritySettings + :param dict(str, AutoVersionCreateConfig) body: + :return: dict(str, AutoVersionCreateConfig) If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1250,7 +1408,7 @@ def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E50 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_security_settings_using_get" % key + " to method save_auto_commit_settings_using_post" % key ) params[key] = val del params['kwargs'] @@ -1267,22 +1425,28 @@ def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E50 local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/securitySettings', 'GET', + '/api/admin/autoCommitSettings', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='SecuritySettings', # noqa: E501 + response_type='dict(str, AutoVersionCreateConfig)', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1290,40 +1454,40 @@ def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E50 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_admin_settings_using_post(self, **kwargs): # noqa: E501 - """Get the Administration Settings object using key (getAdminSettings) # noqa: E501 + def save_jwt_settings_using_post(self, **kwargs): # noqa: E501 + """Update JWT Settings (saveJwtSettings) # noqa: E501 - Creates or Updates the Administration Settings. Platform generates random Administration Settings Id during settings creation. The Administration Settings Id will be present in the response. Specify the Administration Settings Id when you would like to update the Administration Settings. Referencing non-existing Administration Settings Id will cause an error. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Updates the JWT Settings object that contains JWT token policy, etc. The tokenSigningKey field is a Base64 encoded string. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_admin_settings_using_post(async_req=True) + >>> thread = api.save_jwt_settings_using_post(async_req=True) >>> result = thread.get() :param async_req bool - :param AdminSettings body: - :return: AdminSettings + :param JWTSettings body: + :return: JWTPair If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_admin_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return self.save_jwt_settings_using_post_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.save_admin_settings_using_post_with_http_info(**kwargs) # noqa: E501 + (data) = self.save_jwt_settings_using_post_with_http_info(**kwargs) # noqa: E501 return data - def save_admin_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Get the Administration Settings object using key (getAdminSettings) # noqa: E501 + def save_jwt_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Update JWT Settings (saveJwtSettings) # noqa: E501 - Creates or Updates the Administration Settings. Platform generates random Administration Settings Id during settings creation. The Administration Settings Id will be present in the response. Specify the Administration Settings Id when you would like to update the Administration Settings. Referencing non-existing Administration Settings Id will cause an error. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Updates the JWT Settings object that contains JWT token policy, etc. The tokenSigningKey field is a Base64 encoded string. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_admin_settings_using_post_with_http_info(async_req=True) + >>> thread = api.save_jwt_settings_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param AdminSettings body: - :return: AdminSettings + :param JWTSettings body: + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -1339,7 +1503,7 @@ def save_admin_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method save_admin_settings_using_post" % key + " to method save_jwt_settings_using_post" % key ) params[key] = val del params['kwargs'] @@ -1370,14 +1534,14 @@ def save_admin_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/settings', 'POST', + '/api/admin/jwtSettings', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='AdminSettings', # noqa: E501 + response_type='JWTPair', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1385,40 +1549,40 @@ def save_admin_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_security_settings_using_post(self, **kwargs): # noqa: E501 - """Update Security Settings (saveSecuritySettings) # noqa: E501 + def save_repository_settings_using_post(self, **kwargs): # noqa: E501 + """Creates or Updates the repository settings (saveRepositorySettings) # noqa: E501 - Updates the Security Settings object that contains password policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Creates or Updates the repository settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_security_settings_using_post(async_req=True) + >>> thread = api.save_repository_settings_using_post(async_req=True) >>> result = thread.get() :param async_req bool - :param SecuritySettings body: - :return: SecuritySettings + :param RepositorySettings body: + :return: DeferredResultRepositorySettings If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_security_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return self.save_repository_settings_using_post_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.save_security_settings_using_post_with_http_info(**kwargs) # noqa: E501 + (data) = self.save_repository_settings_using_post_with_http_info(**kwargs) # noqa: E501 return data - def save_security_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Update Security Settings (saveSecuritySettings) # noqa: E501 + def save_repository_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Creates or Updates the repository settings (saveRepositorySettings) # noqa: E501 - Updates the Security Settings object that contains password policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Creates or Updates the repository settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_security_settings_using_post_with_http_info(async_req=True) + >>> thread = api.save_repository_settings_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param SecuritySettings body: - :return: SecuritySettings + :param RepositorySettings body: + :return: DeferredResultRepositorySettings If the method is called asynchronously, returns the request thread. """ @@ -1434,7 +1598,7 @@ def save_security_settings_using_post_with_http_info(self, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method save_security_settings_using_post" % key + " to method save_repository_settings_using_post" % key ) params[key] = val del params['kwargs'] @@ -1465,14 +1629,14 @@ def save_security_settings_using_post_with_http_info(self, **kwargs): # noqa: E auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/securitySettings', 'POST', + '/api/admin/repositorySettings', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='SecuritySettings', # noqa: E501 + response_type='DeferredResultRepositorySettings', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1480,40 +1644,40 @@ def save_security_settings_using_post_with_http_info(self, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_repository_settings_using_post(self, **kwargs): # noqa: E501 - """Creates or Updates the repository settings (saveRepositorySettings) # noqa: E501 + def save_security_settings_using_post(self, **kwargs): # noqa: E501 + """Update Security Settings (saveSecuritySettings) # noqa: E501 - Creates or Updates the repository settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Updates the Security Settings object that contains password policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_repository_settings_using_post(async_req=True) + >>> thread = api.save_security_settings_using_post(async_req=True) >>> result = thread.get() :param async_req bool - :param RepositorySettings body: - :return: DeferredResultRepositorySettings + :param SecuritySettings body: + :return: SecuritySettings If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_repository_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return self.save_security_settings_using_post_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.save_repository_settings_using_post_with_http_info(**kwargs) # noqa: E501 + (data) = self.save_security_settings_using_post_with_http_info(**kwargs) # noqa: E501 return data - def save_repository_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Creates or Updates the repository settings (saveRepositorySettings) # noqa: E501 + def save_security_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Update Security Settings (saveSecuritySettings) # noqa: E501 - Creates or Updates the repository settings object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Updates the Security Settings object that contains password policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_repository_settings_using_post_with_http_info(async_req=True) + >>> thread = api.save_security_settings_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param RepositorySettings body: - :return: DeferredResultRepositorySettings + :param SecuritySettings body: + :return: SecuritySettings If the method is called asynchronously, returns the request thread. """ @@ -1529,7 +1693,7 @@ def save_repository_settings_using_post_with_http_info(self, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method save_repository_settings_using_post" % key + " to method save_security_settings_using_post" % key ) params[key] = val del params['kwargs'] @@ -1557,17 +1721,17 @@ def save_repository_settings_using_post_with_http_info(self, **kwargs): # noqa: ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/repositorySettings', 'POST', + '/api/admin/securitySettings', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='DeferredResultRepositorySettings', # noqa: E501 + response_type='SecuritySettings', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_ce/alarm_comment_controller_api.py b/tb_rest_client/api/api_ce/alarm_comment_controller_api.py index 4340f8ec..611a3774 100644 --- a/tb_rest_client/api/api_ce/alarm_comment_controller_api.py +++ b/tb_rest_client/api/api_ce/alarm_comment_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.5.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -239,7 +239,7 @@ def get_alarm_comments_using_get_with_http_info(self, alarm_id, page_size, page, auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/alarm/{alarmId}/comment?sortProperty=createdTime{&page,pageSize,sortOrder}', 'GET', + '/api/alarm/{alarmId}/comment{?page,pageSize,sortOrder,sortProperty}', 'GET', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_ce/alarm_controller_api.py b/tb_rest_client/api/api_ce/alarm_controller_api.py index 46b181b6..04cae38e 100644 --- a/tb_rest_client/api/api_ce/alarm_controller_api.py +++ b/tb_rest_client/api/api_ce/alarm_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -43,7 +43,7 @@ def ack_alarm_using_post(self, alarm_id, **kwargs): # noqa: E501 :param async_req bool :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: AlarmInfo If the method is called asynchronously, returns the request thread. """ @@ -65,7 +65,7 @@ def ack_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E501 :param async_req bool :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: AlarmInfo If the method is called asynchronously, returns the request thread. """ @@ -88,8 +88,7 @@ def ack_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E501 # verify the required parameter 'alarm_id' is set if ('alarm_id' not in params or params['alarm_id'] is None): - raise ValueError( - "Missing the required parameter `alarm_id` when calling `ack_alarm_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `ack_alarm_using_post`") # noqa: E501 collection_formats = {} @@ -120,7 +119,110 @@ def ack_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='AlarmInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def assign_alarm_using_post(self, alarm_id, assignee_id, **kwargs): # noqa: E501 + """Assign/Reassign Alarm (assignAlarm) # noqa: E501 + + 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assign_alarm_using_post(alarm_id, assignee_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str assignee_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: Alarm + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assign_alarm_using_post_with_http_info(alarm_id, assignee_id, **kwargs) # noqa: E501 + else: + (data) = self.assign_alarm_using_post_with_http_info(alarm_id, assignee_id, **kwargs) # noqa: E501 + return data + + def assign_alarm_using_post_with_http_info(self, alarm_id, assignee_id, **kwargs): # noqa: E501 + """Assign/Reassign Alarm (assignAlarm) # noqa: E501 + + 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assign_alarm_using_post_with_http_info(alarm_id, assignee_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str assignee_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: Alarm + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['alarm_id', 'assignee_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method assign_alarm_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'alarm_id' is set + if ('alarm_id' not in params or + params['alarm_id'] is None): + raise ValueError("Missing the required parameter `alarm_id` when calling `assign_alarm_using_post`") # noqa: E501 + # verify the required parameter 'assignee_id' is set + if ('assignee_id' not in params or + params['assignee_id'] is None): + raise ValueError("Missing the required parameter `assignee_id` when calling `assign_alarm_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alarm_id' in params: + path_params['alarmId'] = params['alarm_id'] # noqa: E501 + if 'assignee_id' in params: + path_params['assigneeId'] = params['assignee_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/alarm/{alarmId}/assign/{assigneeId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Alarm', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -139,7 +241,7 @@ def clear_alarm_using_post(self, alarm_id, **kwargs): # noqa: E501 :param async_req bool :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: AlarmInfo If the method is called asynchronously, returns the request thread. """ @@ -161,7 +263,7 @@ def clear_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E5 :param async_req bool :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: AlarmInfo If the method is called asynchronously, returns the request thread. """ @@ -184,8 +286,7 @@ def clear_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E5 # verify the required parameter 'alarm_id' is set if ('alarm_id' not in params or params['alarm_id'] is None): - raise ValueError( - "Missing the required parameter `alarm_id` when calling `clear_alarm_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `clear_alarm_using_post`") # noqa: E501 collection_formats = {} @@ -216,7 +317,7 @@ def clear_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='AlarmInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -280,8 +381,7 @@ def delete_alarm_using_delete_with_http_info(self, alarm_id, **kwargs): # noqa: # verify the required parameter 'alarm_id' is set if ('alarm_id' not in params or params['alarm_id'] is None): - raise ValueError( - "Missing the required parameter `alarm_id` when calling `delete_alarm_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `delete_alarm_using_delete`") # noqa: E501 collection_formats = {} @@ -376,8 +476,7 @@ def get_alarm_by_id_using_get_with_http_info(self, alarm_id, **kwargs): # noqa: # verify the required parameter 'alarm_id' is set if ('alarm_id' not in params or params['alarm_id'] is None): - raise ValueError( - "Missing the required parameter `alarm_id` when calling `get_alarm_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `get_alarm_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -472,8 +571,7 @@ def get_alarm_info_by_id_using_get_with_http_info(self, alarm_id, **kwargs): # # verify the required parameter 'alarm_id' is set if ('alarm_id' not in params or params['alarm_id'] is None): - raise ValueError( - "Missing the required parameter `alarm_id` when calling `get_alarm_info_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `get_alarm_info_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -528,7 +626,8 @@ def get_alarms_using_get(self, entity_type, entity_id, page_size, page, **kwargs :param int page: Sequence number of page starting from 0 (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value - :param str text_search: The case insensitive 'startsWith' filter based on of next alarm fields: type, severity or status + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. @@ -540,11 +639,9 @@ def get_alarms_using_get(self, entity_type, entity_id, page_size, page, **kwargs """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_alarms_using_get_with_http_info(entity_type, entity_id, page_size, page, - **kwargs) # noqa: E501 + return self.get_alarms_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_alarms_using_get_with_http_info(entity_type, entity_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.get_alarms_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 return data def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 @@ -563,7 +660,8 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, :param int page: Sequence number of page starting from 0 (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value - :param str text_search: The case insensitive 'startsWith' filter based on of next alarm fields: type, severity or status + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. @@ -574,8 +672,7 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'page_size', 'page', 'search_status', 'status', 'text_search', - 'sort_property', 'sort_order', 'start_time', 'end_time', 'fetch_originator'] # noqa: E501 + all_params = ['entity_type', 'entity_id', 'page_size', 'page', 'search_status', 'status', 'assignee_id', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'fetch_originator'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -593,18 +690,15 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): - raise ValueError( - "Missing the required parameter `entity_type` when calling `get_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_type` when calling `get_alarms_using_get`") # noqa: E501 # verify the required parameter 'entity_id' is set if ('entity_id' not in params or params['entity_id'] is None): - raise ValueError( - "Missing the required parameter `entity_id` when calling `get_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_id` when calling `get_alarms_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_alarms_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): @@ -623,6 +717,8 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, query_params.append(('searchStatus', params['search_status'])) # noqa: E501 if 'status' in params: query_params.append(('status', params['status'])) # noqa: E501 + if 'assignee_id' in params: + query_params.append(('assigneeId', params['assignee_id'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: @@ -654,8 +750,162 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/alarm/{entityType}/{entityId}{?endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}', - 'GET', + '/api/alarm/{entityType}/{entityId}{?assigneeId,endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAlarmInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_alarms_v2_using_get(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 + """Get Alarms (getAlarmsV2) # noqa: E501 + + Returns a page of alarms for the selected entity. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alarms_v2_using_get(entity_type, entity_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str status_list: A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value + :param str severity_list: A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value + :param str type_list: A list of string values separated by comma ',' representing alarm types + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :param int end_time: The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :return: PageDataAlarmInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_alarms_v2_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_alarms_v2_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_alarms_v2_using_get_with_http_info(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 + """Get Alarms (getAlarmsV2) # noqa: E501 + + Returns a page of alarms for the selected entity. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alarms_v2_using_get_with_http_info(entity_type, entity_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str status_list: A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value + :param str severity_list: A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value + :param str type_list: A list of string values separated by comma ',' representing alarm types + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :param int end_time: The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :return: PageDataAlarmInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_type', 'entity_id', 'page_size', 'page', 'status_list', 'severity_list', 'type_list', 'assignee_id', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_alarms_v2_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `get_alarms_v2_using_get`") # noqa: E501 + # verify the required parameter 'entity_id' is set + if ('entity_id' not in params or + params['entity_id'] is None): + raise ValueError("Missing the required parameter `entity_id` when calling `get_alarms_v2_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_alarms_v2_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_alarms_v2_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + if 'entity_id' in params: + path_params['entityId'] = params['entity_id'] # noqa: E501 + + query_params = [] + if 'status_list' in params: + query_params.append(('statusList', params['status_list'])) # noqa: E501 + if 'severity_list' in params: + query_params.append(('severityList', params['severity_list'])) # noqa: E501 + if 'type_list' in params: + query_params.append(('typeList', params['type_list'])) # noqa: E501 + if 'assignee_id' in params: + query_params.append(('assigneeId', params['assignee_id'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alarm/{entityType}/{entityId}{?assigneeId,endTime,page,pageSize,severityList,sortOrder,sortProperty,startTime,statusList,textSearch,typeList}', 'GET', path_params, query_params, header_params, @@ -684,7 +934,8 @@ def get_all_alarms_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page: Sequence number of page starting from 0 (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value - :param str text_search: The case insensitive 'startsWith' filter based on of next alarm fields: type, severity or status + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. @@ -715,7 +966,8 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # :param int page: Sequence number of page starting from 0 (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value - :param str text_search: The case insensitive 'startsWith' filter based on of next alarm fields: type, severity or status + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. @@ -726,8 +978,7 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # returns the request thread. """ - all_params = ['page_size', 'page', 'search_status', 'status', 'text_search', 'sort_property', 'sort_order', - 'start_time', 'end_time', 'fetch_originator'] # noqa: E501 + all_params = ['page_size', 'page', 'search_status', 'status', 'assignee_id', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'fetch_originator'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -745,13 +996,11 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_all_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_all_alarms_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError( - "Missing the required parameter `page` when calling `get_all_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_all_alarms_using_get`") # noqa: E501 collection_formats = {} @@ -762,6 +1011,8 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # query_params.append(('searchStatus', params['search_status'])) # noqa: E501 if 'status' in params: query_params.append(('status', params['status'])) # noqa: E501 + if 'assignee_id' in params: + query_params.append(('assigneeId', params['assignee_id'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: @@ -793,8 +1044,146 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/alarms{?endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}', - 'GET', + '/api/alarms{?assigneeId,endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAlarmInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_alarms_v2_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get All Alarms (getAllAlarmsV2) # noqa: E501 + + Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_alarms_v2_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str status_list: A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value + :param str severity_list: A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value + :param str type_list: A list of string values separated by comma ',' representing alarm types + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :param int end_time: The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :return: PageDataAlarmInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_all_alarms_v2_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_all_alarms_v2_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_all_alarms_v2_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get All Alarms (getAllAlarmsV2) # noqa: E501 + + Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_alarms_v2_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str status_list: A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value + :param str severity_list: A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value + :param str type_list: A list of string values separated by comma ',' representing alarm types + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :param int end_time: The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :return: PageDataAlarmInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'status_list', 'severity_list', 'type_list', 'assignee_id', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_alarms_v2_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_all_alarms_v2_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_all_alarms_v2_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'status_list' in params: + query_params.append(('statusList', params['status_list'])) # noqa: E501 + if 'severity_list' in params: + query_params.append(('severityList', params['severity_list'])) # noqa: E501 + if 'type_list' in params: + query_params.append(('typeList', params['type_list'])) # noqa: E501 + if 'assignee_id' in params: + query_params.append(('assigneeId', params['assignee_id'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alarms{?assigneeId,endTime,page,pageSize,severityList,sortOrder,sortProperty,startTime,statusList,textSearch,typeList}', 'GET', path_params, query_params, header_params, @@ -823,17 +1212,16 @@ def get_highest_alarm_severity_using_get(self, entity_type, entity_id, **kwargs) :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_highest_alarm_severity_using_get_with_http_info(entity_type, entity_id, - **kwargs) # noqa: E501 + return self.get_highest_alarm_severity_using_get_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 else: - (data) = self.get_highest_alarm_severity_using_get_with_http_info(entity_type, entity_id, - **kwargs) # noqa: E501 + (data) = self.get_highest_alarm_severity_using_get_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 return data def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entity_id, **kwargs): # noqa: E501 @@ -850,12 +1238,13 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'search_status', 'status'] # noqa: E501 + all_params = ['entity_type', 'entity_id', 'search_status', 'status', 'assignee_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -873,13 +1262,11 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): - raise ValueError( - "Missing the required parameter `entity_type` when calling `get_highest_alarm_severity_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_type` when calling `get_highest_alarm_severity_using_get`") # noqa: E501 # verify the required parameter 'entity_id' is set if ('entity_id' not in params or params['entity_id'] is None): - raise ValueError( - "Missing the required parameter `entity_id` when calling `get_highest_alarm_severity_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_id` when calling `get_highest_alarm_severity_using_get`") # noqa: E501 collection_formats = {} @@ -894,6 +1281,8 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit query_params.append(('searchStatus', params['search_status'])) # noqa: E501 if 'status' in params: query_params.append(('status', params['status'])) # noqa: E501 + if 'assignee_id' in params: + query_params.append(('assigneeId', params['assignee_id'])) # noqa: E501 header_params = {} @@ -909,7 +1298,7 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/alarm/highestSeverity/{entityType}/{entityId}{?searchStatus,status}', 'GET', + '/api/alarm/highestSeverity/{entityType}/{entityId}{?assigneeId,searchStatus,status}', 'GET', path_params, query_params, header_params, @@ -925,9 +1314,9 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit collection_formats=collection_formats) def save_alarm_using_post(self, **kwargs): # noqa: E501 - """Create or update Alarm (saveAlarm) # noqa: E501 + """Create or Update Alarm (saveAlarm) # noqa: E501 - Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_alarm_using_post(async_req=True) @@ -947,9 +1336,9 @@ def save_alarm_using_post(self, **kwargs): # noqa: E501 return data def save_alarm_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Create or update Alarm (saveAlarm) # noqa: E501 + """Create or Update Alarm (saveAlarm) # noqa: E501 - Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_alarm_using_post_with_http_info(async_req=True) @@ -1018,3 +1407,98 @@ def save_alarm_using_post_with_http_info(self, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def unassign_alarm_using_delete(self, alarm_id, **kwargs): # noqa: E501 + """Unassign Alarm (unassignAlarm) # noqa: E501 + + Unassign the Alarm. 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unassign_alarm_using_delete(alarm_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: Alarm + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.unassign_alarm_using_delete_with_http_info(alarm_id, **kwargs) # noqa: E501 + else: + (data) = self.unassign_alarm_using_delete_with_http_info(alarm_id, **kwargs) # noqa: E501 + return data + + def unassign_alarm_using_delete_with_http_info(self, alarm_id, **kwargs): # noqa: E501 + """Unassign Alarm (unassignAlarm) # noqa: E501 + + Unassign the Alarm. 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unassign_alarm_using_delete_with_http_info(alarm_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: Alarm + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['alarm_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method unassign_alarm_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'alarm_id' is set + if ('alarm_id' not in params or + params['alarm_id'] is None): + raise ValueError("Missing the required parameter `alarm_id` when calling `unassign_alarm_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alarm_id' in params: + path_params['alarmId'] = params['alarm_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/alarm/{alarmId}/assign', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Alarm', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_ce/asset_controller_api.py b/tb_rest_client/api/api_ce/asset_controller_api.py index 7f90c7b0..a7415220 100644 --- a/tb_rest_client/api/api_ce/asset_controller_api.py +++ b/tb_rest_client/api/api_ce/asset_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -50,11 +50,9 @@ def assign_asset_to_customer_using_post(self, customer_id, asset_id, **kwargs): """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_asset_to_customer_using_post_with_http_info(customer_id, asset_id, - **kwargs) # noqa: E501 + return self.assign_asset_to_customer_using_post_with_http_info(customer_id, asset_id, **kwargs) # noqa: E501 else: - (data) = self.assign_asset_to_customer_using_post_with_http_info(customer_id, asset_id, - **kwargs) # noqa: E501 + (data) = self.assign_asset_to_customer_using_post_with_http_info(customer_id, asset_id, **kwargs) # noqa: E501 return data def assign_asset_to_customer_using_post_with_http_info(self, customer_id, asset_id, **kwargs): # noqa: E501 @@ -92,13 +90,11 @@ def assign_asset_to_customer_using_post_with_http_info(self, customer_id, asset_ # verify the required parameter 'customer_id' is set if ('customer_id' not in params or params['customer_id'] is None): - raise ValueError( - "Missing the required parameter `customer_id` when calling `assign_asset_to_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `customer_id` when calling `assign_asset_to_customer_using_post`") # noqa: E501 # verify the required parameter 'asset_id' is set if ('asset_id' not in params or params['asset_id'] is None): - raise ValueError( - "Missing the required parameter `asset_id` when calling `assign_asset_to_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_id` when calling `assign_asset_to_customer_using_post`") # noqa: E501 collection_formats = {} @@ -197,13 +193,11 @@ def assign_asset_to_edge_using_post_with_http_info(self, edge_id, asset_id, **kw # verify the required parameter 'edge_id' is set if ('edge_id' not in params or params['edge_id'] is None): - raise ValueError( - "Missing the required parameter `edge_id` when calling `assign_asset_to_edge_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `edge_id` when calling `assign_asset_to_edge_using_post`") # noqa: E501 # verify the required parameter 'asset_id' is set if ('asset_id' not in params or params['asset_id'] is None): - raise ValueError( - "Missing the required parameter `asset_id` when calling `assign_asset_to_edge_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_id` when calling `assign_asset_to_edge_using_post`") # noqa: E501 collection_formats = {} @@ -300,8 +294,7 @@ def assign_asset_to_public_customer_using_post_with_http_info(self, asset_id, ** # verify the required parameter 'asset_id' is set if ('asset_id' not in params or params['asset_id'] is None): - raise ValueError( - "Missing the required parameter `asset_id` when calling `assign_asset_to_public_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_id` when calling `assign_asset_to_public_customer_using_post`") # noqa: E501 collection_formats = {} @@ -396,8 +389,7 @@ def delete_asset_using_delete_with_http_info(self, asset_id, **kwargs): # noqa: # verify the required parameter 'asset_id' is set if ('asset_id' not in params or params['asset_id'] is None): - raise ValueError( - "Missing the required parameter `asset_id` when calling `delete_asset_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_id` when calling `delete_asset_using_delete`") # noqa: E501 collection_formats = {} @@ -587,8 +579,7 @@ def get_asset_by_id_using_get_with_http_info(self, asset_id, **kwargs): # noqa: # verify the required parameter 'asset_id' is set if ('asset_id' not in params or params['asset_id'] is None): - raise ValueError( - "Missing the required parameter `asset_id` when calling `get_asset_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_id` when calling `get_asset_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -683,8 +674,7 @@ def get_asset_info_by_id_using_get_with_http_info(self, asset_id, **kwargs): # # verify the required parameter 'asset_id' is set if ('asset_id' not in params or params['asset_id'] is None): - raise ValueError( - "Missing the required parameter `asset_id` when calling `get_asset_info_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_id` when calling `get_asset_info_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -866,8 +856,7 @@ def get_assets_by_ids_using_get_with_http_info(self, asset_ids, **kwargs): # no # verify the required parameter 'asset_ids' is set if ('asset_ids' not in params or params['asset_ids'] is None): - raise ValueError( - "Missing the required parameter `asset_ids` when calling `get_assets_by_ids_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_ids` when calling `get_assets_by_ids_using_get`") # noqa: E501 collection_formats = {} @@ -920,7 +909,8 @@ def get_customer_asset_infos_using_get(self, customer_id, page_size, page, **kwa :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAssetInfo @@ -929,11 +919,9 @@ def get_customer_asset_infos_using_get(self, customer_id, page_size, page, **kwa """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_customer_asset_infos_using_get_with_http_info(customer_id, page_size, page, - **kwargs) # noqa: E501 + return self.get_customer_asset_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_customer_asset_infos_using_get_with_http_info(customer_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.get_customer_asset_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 return data def get_customer_asset_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 @@ -950,7 +938,8 @@ def get_customer_asset_infos_using_get_with_http_info(self, customer_id, page_si :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAssetInfo @@ -958,8 +947,7 @@ def get_customer_asset_infos_using_get_with_http_info(self, customer_id, page_si returns the request thread. """ - all_params = ['customer_id', 'page_size', 'page', 'type', 'text_search', 'sort_property', - 'sort_order'] # noqa: E501 + all_params = ['customer_id', 'page_size', 'page', 'type', 'asset_profile_id', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -977,18 +965,15 @@ def get_customer_asset_infos_using_get_with_http_info(self, customer_id, page_si # verify the required parameter 'customer_id' is set if ('customer_id' not in params or params['customer_id'] is None): - raise ValueError( - "Missing the required parameter `customer_id` when calling `get_customer_asset_infos_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_asset_infos_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_customer_asset_infos_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_asset_infos_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError( - "Missing the required parameter `page` when calling `get_customer_asset_infos_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_customer_asset_infos_using_get`") # noqa: E501 collection_formats = {} @@ -1003,6 +988,8 @@ def get_customer_asset_infos_using_get_with_http_info(self, customer_id, page_si query_params.append(('page', params['page'])) # noqa: E501 if 'type' in params: query_params.append(('type', params['type'])) # noqa: E501 + if 'asset_profile_id' in params: + query_params.append(('assetProfileId', params['asset_profile_id'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: @@ -1024,7 +1011,7 @@ def get_customer_asset_infos_using_get_with_http_info(self, customer_id, page_si auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/customer/{customerId}/assetInfos{?page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', + '/api/customer/{customerId}/assetInfos{?assetProfileId,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', path_params, query_params, header_params, @@ -1053,7 +1040,7 @@ def get_customer_assets_using_get(self, customer_id, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAsset @@ -1062,11 +1049,9 @@ def get_customer_assets_using_get(self, customer_id, page_size, page, **kwargs): """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_customer_assets_using_get_with_http_info(customer_id, page_size, page, - **kwargs) # noqa: E501 + return self.get_customer_assets_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_customer_assets_using_get_with_http_info(customer_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.get_customer_assets_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 return data def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 @@ -1083,7 +1068,7 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAsset @@ -1091,8 +1076,7 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p returns the request thread. """ - all_params = ['customer_id', 'page_size', 'page', 'type', 'text_search', 'sort_property', - 'sort_order'] # noqa: E501 + all_params = ['customer_id', 'page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1110,18 +1094,15 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p # verify the required parameter 'customer_id' is set if ('customer_id' not in params or params['customer_id'] is None): - raise ValueError( - "Missing the required parameter `customer_id` when calling `get_customer_assets_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_assets_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_customer_assets_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_assets_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError( - "Missing the required parameter `page` when calling `get_customer_assets_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_customer_assets_using_get`") # noqa: E501 collection_formats = {} @@ -1186,7 +1167,7 @@ def get_edge_assets_using_get(self, edge_id, page_size, page, **kwargs): # noqa :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Assets with creation time before it won't be queried @@ -1216,7 +1197,7 @@ def get_edge_assets_using_get_with_http_info(self, edge_id, page_size, page, **k :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Assets with creation time before it won't be queried @@ -1226,8 +1207,7 @@ def get_edge_assets_using_get_with_http_info(self, edge_id, page_size, page, **k returns the request thread. """ - all_params = ['edge_id', 'page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order', - 'start_time', 'end_time'] # noqa: E501 + all_params = ['edge_id', 'page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1245,18 +1225,15 @@ def get_edge_assets_using_get_with_http_info(self, edge_id, page_size, page, **k # verify the required parameter 'edge_id' is set if ('edge_id' not in params or params['edge_id'] is None): - raise ValueError( - "Missing the required parameter `edge_id` when calling `get_edge_assets_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `edge_id` when calling `get_edge_assets_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_edge_assets_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_edge_assets_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError( - "Missing the required parameter `page` when calling `get_edge_assets_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_edge_assets_using_get`") # noqa: E501 collection_formats = {} @@ -1324,7 +1301,8 @@ def get_tenant_asset_infos_using_get(self, page_size, page, **kwargs): # noqa: :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAssetInfo @@ -1351,7 +1329,8 @@ def get_tenant_asset_infos_using_get_with_http_info(self, page_size, page, **kwa :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAssetInfo @@ -1359,7 +1338,7 @@ def get_tenant_asset_infos_using_get_with_http_info(self, page_size, page, **kwa returns the request thread. """ - all_params = ['page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['page_size', 'page', 'type', 'asset_profile_id', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1377,13 +1356,11 @@ def get_tenant_asset_infos_using_get_with_http_info(self, page_size, page, **kwa # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_tenant_asset_infos_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_asset_infos_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError( - "Missing the required parameter `page` when calling `get_tenant_asset_infos_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_tenant_asset_infos_using_get`") # noqa: E501 collection_formats = {} @@ -1396,6 +1373,8 @@ def get_tenant_asset_infos_using_get_with_http_info(self, page_size, page, **kwa query_params.append(('page', params['page'])) # noqa: E501 if 'type' in params: query_params.append(('type', params['type'])) # noqa: E501 + if 'asset_profile_id' in params: + query_params.append(('assetProfileId', params['asset_profile_id'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: @@ -1417,7 +1396,7 @@ def get_tenant_asset_infos_using_get_with_http_info(self, page_size, page, **kwa auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenant/assetInfos{?page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', + '/api/tenant/assetInfos{?assetProfileId,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', path_params, query_params, header_params, @@ -1488,8 +1467,7 @@ def get_tenant_asset_using_get_with_http_info(self, asset_name, **kwargs): # no # verify the required parameter 'asset_name' is set if ('asset_name' not in params or params['asset_name'] is None): - raise ValueError( - "Missing the required parameter `asset_name` when calling `get_tenant_asset_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_name` when calling `get_tenant_asset_using_get`") # noqa: E501 collection_formats = {} @@ -1541,7 +1519,7 @@ def get_tenant_assets_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAsset @@ -1568,7 +1546,7 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAsset @@ -1594,13 +1572,11 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_tenant_assets_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_assets_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError( - "Missing the required parameter `page` when calling `get_tenant_assets_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_tenant_assets_using_get`") # noqa: E501 collection_formats = {} @@ -1747,7 +1723,7 @@ def process_assets_bulk_import_using_post_with_http_info(self, **kwargs): # noq def save_asset_using_post(self, **kwargs): # noqa: E501 """Create Or Update Asset (saveAsset) # noqa: E501 - Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_asset_using_post(async_req=True) @@ -1755,7 +1731,6 @@ def save_asset_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param Asset body: - :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group. :return: Asset If the method is called asynchronously, returns the request thread. @@ -1770,7 +1745,7 @@ def save_asset_using_post(self, **kwargs): # noqa: E501 def save_asset_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Asset (saveAsset) # noqa: E501 - Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_asset_using_post_with_http_info(async_req=True) @@ -1778,13 +1753,12 @@ def save_asset_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param Asset body: - :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group. :return: Asset If the method is called asynchronously, returns the request thread. """ - all_params = ['body', 'entity_group_id'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1805,8 +1779,6 @@ def save_asset_using_post_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'entity_group_id' in params: - query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 header_params = {} @@ -1828,7 +1800,7 @@ def save_asset_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/asset{?entityGroupId}', 'POST', + '/api/asset', 'POST', path_params, query_params, header_params, @@ -1899,8 +1871,7 @@ def unassign_asset_from_customer_using_delete_with_http_info(self, asset_id, **k # verify the required parameter 'asset_id' is set if ('asset_id' not in params or params['asset_id'] is None): - raise ValueError( - "Missing the required parameter `asset_id` when calling `unassign_asset_from_customer_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_id` when calling `unassign_asset_from_customer_using_delete`") # noqa: E501 collection_formats = {} @@ -1959,8 +1930,7 @@ def unassign_asset_from_edge_using_delete(self, edge_id, asset_id, **kwargs): # if kwargs.get('async_req'): return self.unassign_asset_from_edge_using_delete_with_http_info(edge_id, asset_id, **kwargs) # noqa: E501 else: - (data) = self.unassign_asset_from_edge_using_delete_with_http_info(edge_id, asset_id, - **kwargs) # noqa: E501 + (data) = self.unassign_asset_from_edge_using_delete_with_http_info(edge_id, asset_id, **kwargs) # noqa: E501 return data def unassign_asset_from_edge_using_delete_with_http_info(self, edge_id, asset_id, **kwargs): # noqa: E501 @@ -1998,13 +1968,11 @@ def unassign_asset_from_edge_using_delete_with_http_info(self, edge_id, asset_id # verify the required parameter 'edge_id' is set if ('edge_id' not in params or params['edge_id'] is None): - raise ValueError( - "Missing the required parameter `edge_id` when calling `unassign_asset_from_edge_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `edge_id` when calling `unassign_asset_from_edge_using_delete`") # noqa: E501 # verify the required parameter 'asset_id' is set if ('asset_id' not in params or params['asset_id'] is None): - raise ValueError( - "Missing the required parameter `asset_id` when calling `unassign_asset_from_edge_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_id` when calling `unassign_asset_from_edge_using_delete`") # noqa: E501 collection_formats = {} diff --git a/tb_rest_client/api/api_ce/asset_profile_controller_api.py b/tb_rest_client/api/api_ce/asset_profile_controller_api.py new file mode 100644 index 00000000..48a5b2ce --- /dev/null +++ b/tb_rest_client/api/api_ce/asset_profile_controller_api.py @@ -0,0 +1,825 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class AssetProfileControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_asset_profile_using_delete(self, asset_profile_id, **kwargs): # noqa: E501 + """Delete asset profile (deleteAssetProfile) # noqa: E501 + + Deletes the asset profile. Referencing non-existing asset profile Id will cause an error. Can't delete the asset profile if it is referenced by existing assets. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_asset_profile_using_delete(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_asset_profile_using_delete_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_asset_profile_using_delete_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + return data + + def delete_asset_profile_using_delete_with_http_info(self, asset_profile_id, **kwargs): # noqa: E501 + """Delete asset profile (deleteAssetProfile) # noqa: E501 + + Deletes the asset profile. Referencing non-existing asset profile Id will cause an error. Can't delete the asset profile if it is referenced by existing assets. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_asset_profile_using_delete_with_http_info(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_profile_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_asset_profile_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'asset_profile_id' is set + if ('asset_profile_id' not in params or + params['asset_profile_id'] is None): + raise ValueError("Missing the required parameter `asset_profile_id` when calling `delete_asset_profile_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_profile_id' in params: + path_params['assetProfileId'] = params['asset_profile_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfile/{assetProfileId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_asset_profile_by_id_using_get(self, asset_profile_id, **kwargs): # noqa: E501 + """Get Asset Profile (getAssetProfileById) # noqa: E501 + + Fetch the Asset Profile object based on the provided Asset Profile Id. The server checks that the asset profile is owned by the same tenant. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_by_id_using_get(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_asset_profile_by_id_using_get_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_profile_by_id_using_get_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + return data + + def get_asset_profile_by_id_using_get_with_http_info(self, asset_profile_id, **kwargs): # noqa: E501 + """Get Asset Profile (getAssetProfileById) # noqa: E501 + + Fetch the Asset Profile object based on the provided Asset Profile Id. The server checks that the asset profile is owned by the same tenant. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_by_id_using_get_with_http_info(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_profile_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_asset_profile_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'asset_profile_id' is set + if ('asset_profile_id' not in params or + params['asset_profile_id'] is None): + raise ValueError("Missing the required parameter `asset_profile_id` when calling `get_asset_profile_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_profile_id' in params: + path_params['assetProfileId'] = params['asset_profile_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfile/{assetProfileId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetProfile', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_asset_profile_info_by_id_using_get(self, asset_profile_id, **kwargs): # noqa: E501 + """Get Asset Profile Info (getAssetProfileInfoById) # noqa: E501 + + Fetch the Asset Profile Info object based on the provided Asset Profile Id. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_info_by_id_using_get(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_asset_profile_info_by_id_using_get_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_profile_info_by_id_using_get_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + return data + + def get_asset_profile_info_by_id_using_get_with_http_info(self, asset_profile_id, **kwargs): # noqa: E501 + """Get Asset Profile Info (getAssetProfileInfoById) # noqa: E501 + + Fetch the Asset Profile Info object based on the provided Asset Profile Id. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_info_by_id_using_get_with_http_info(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_profile_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_asset_profile_info_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'asset_profile_id' is set + if ('asset_profile_id' not in params or + params['asset_profile_id'] is None): + raise ValueError("Missing the required parameter `asset_profile_id` when calling `get_asset_profile_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_profile_id' in params: + path_params['assetProfileId'] = params['asset_profile_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfileInfo/{assetProfileId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetProfileInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_asset_profile_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get Asset Profile infos (getAssetProfileInfos) # noqa: E501 + + Returns a page of asset profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_infos_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the asset profile name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_asset_profile_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_profile_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_asset_profile_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get Asset Profile infos (getAssetProfileInfos) # noqa: E501 + + Returns a page of asset profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the asset profile name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_asset_profile_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_asset_profile_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_asset_profile_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfileInfos{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAssetProfileInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_asset_profiles_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get Asset Profiles (getAssetProfiles) # noqa: E501 + + Returns a page of asset profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profiles_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the asset profile name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetProfile + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_asset_profiles_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_profiles_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_asset_profiles_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get Asset Profiles (getAssetProfiles) # noqa: E501 + + Returns a page of asset profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profiles_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the asset profile name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetProfile + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_asset_profiles_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_asset_profiles_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_asset_profiles_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfiles{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAssetProfile', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_default_asset_profile_info_using_get(self, **kwargs): # noqa: E501 + """Get Default Asset Profile (getDefaultAssetProfileInfo) # noqa: E501 + + Fetch the Default Asset Profile Info object. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_default_asset_profile_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: AssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_default_asset_profile_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_default_asset_profile_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_default_asset_profile_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get Default Asset Profile (getDefaultAssetProfileInfo) # noqa: E501 + + Fetch the Default Asset Profile Info object. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_default_asset_profile_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: AssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_default_asset_profile_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfileInfo/default', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetProfileInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_asset_profile_using_post(self, **kwargs): # noqa: E501 + """Create Or Update Asset Profile (saveAssetProfile) # noqa: E501 + + Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. Asset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_asset_profile_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssetProfile body: + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_asset_profile_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_asset_profile_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_asset_profile_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Create Or Update Asset Profile (saveAssetProfile) # noqa: E501 + + Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. Asset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_asset_profile_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssetProfile body: + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_asset_profile_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfile', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetProfile', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_default_asset_profile_using_post(self, asset_profile_id, **kwargs): # noqa: E501 + """Make Asset Profile Default (setDefaultAssetProfile) # noqa: E501 + + Marks asset profile as default within a tenant scope. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_default_asset_profile_using_post(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.set_default_asset_profile_using_post_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + else: + (data) = self.set_default_asset_profile_using_post_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + return data + + def set_default_asset_profile_using_post_with_http_info(self, asset_profile_id, **kwargs): # noqa: E501 + """Make Asset Profile Default (setDefaultAssetProfile) # noqa: E501 + + Marks asset profile as default within a tenant scope. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_default_asset_profile_using_post_with_http_info(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_profile_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method set_default_asset_profile_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'asset_profile_id' is set + if ('asset_profile_id' not in params or + params['asset_profile_id'] is None): + raise ValueError("Missing the required parameter `asset_profile_id` when calling `set_default_asset_profile_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_profile_id' in params: + path_params['assetProfileId'] = params['asset_profile_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfile/{assetProfileId}/default', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetProfile', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_ce/audit_log_controller_api.py b/tb_rest_client/api/api_ce/audit_log_controller_api.py index b933d483..3afad951 100644 --- a/tb_rest_client/api/api_ce/audit_log_controller_api.py +++ b/tb_rest_client/api/api_ce/audit_log_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -45,7 +45,7 @@ def get_audit_logs_by_customer_id_using_get(self, customer_id, page_size, page, :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -75,7 +75,7 @@ def get_audit_logs_by_customer_id_using_get_with_http_info(self, customer_id, pa :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -181,7 +181,7 @@ def get_audit_logs_by_entity_id_using_get(self, entity_type, entity_id, page_siz :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -212,7 +212,7 @@ def get_audit_logs_by_entity_id_using_get_with_http_info(self, entity_type, enti :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -323,7 +323,7 @@ def get_audit_logs_by_user_id_using_get(self, user_id, page_size, page, **kwargs :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -353,7 +353,7 @@ def get_audit_logs_by_user_id_using_get_with_http_info(self, user_id, page_size, :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -457,7 +457,7 @@ def get_audit_logs_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -486,7 +486,7 @@ def get_audit_logs_using_get_with_http_info(self, page_size, page, **kwargs): # :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. diff --git a/tb_rest_client/api/api_ce/auth_controller_api.py b/tb_rest_client/api/api_ce/auth_controller_api.py index ed8b6d4e..9aa86859 100644 --- a/tb_rest_client/api/api_ce/auth_controller_api.py +++ b/tb_rest_client/api/api_ce/auth_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -44,7 +44,7 @@ def activate_user_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param ActivateUserRequest body: :param bool send_activation_mail: sendActivationMail - :return: JWTTokenPair + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -67,7 +67,7 @@ def activate_user_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param ActivateUserRequest body: :param bool send_activation_mail: sendActivationMail - :return: JWTTokenPair + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -123,7 +123,7 @@ def activate_user_using_post_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='JWTTokenPair', # noqa: E501 + response_type='JWTPair', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -783,7 +783,7 @@ def reset_password_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param ResetPasswordRequest body: - :return: JWTTokenPair + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -805,7 +805,7 @@ def reset_password_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param ResetPasswordRequest body: - :return: JWTTokenPair + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -859,7 +859,7 @@ def reset_password_using_post_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='JWTTokenPair', # noqa: E501 + response_type='JWTPair', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_ce/component_descriptor_controller_api.py b/tb_rest_client/api/api_ce/component_descriptor_controller_api.py index 97dc37d1..179f22df 100644 --- a/tb_rest_client/api/api_ce/component_descriptor_controller_api.py +++ b/tb_rest_client/api/api_ce/component_descriptor_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_ce/customer_controller_api.py b/tb_rest_client/api/api_ce/customer_controller_api.py index bda380d6..92234937 100644 --- a/tb_rest_client/api/api_ce/customer_controller_api.py +++ b/tb_rest_client/api/api_ce/customer_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -225,7 +225,7 @@ def get_customer_by_id_using_get_with_http_info(self, customer_id, **kwargs): # def get_customer_title_by_id_using_get(self, customer_id, **kwargs): # noqa: E501 """Get Customer Title (getCustomerTitleById) # noqa: E501 - Get the title of the customer. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Get the title of the customer. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_customer_title_by_id_using_get(customer_id, async_req=True) @@ -247,7 +247,7 @@ def get_customer_title_by_id_using_get(self, customer_id, **kwargs): # noqa: E5 def get_customer_title_by_id_using_get_with_http_info(self, customer_id, **kwargs): # noqa: E501 """Get Customer Title (getCustomerTitleById) # noqa: E501 - Get the title of the customer. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Get the title of the customer. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_customer_title_by_id_using_get_with_http_info(customer_id, async_req=True) @@ -278,8 +278,7 @@ def get_customer_title_by_id_using_get_with_http_info(self, customer_id, **kwarg # verify the required parameter 'customer_id' is set if ('customer_id' not in params or params['customer_id'] is None): - raise ValueError( - "Missing the required parameter `customer_id` when calling `get_customer_title_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_title_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -297,7 +296,7 @@ def get_customer_title_by_id_using_get_with_http_info(self, customer_id, **kwarg body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/text']) # noqa: E501 + ['application/text', 'application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 @@ -330,7 +329,7 @@ def get_customers_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the customer title. + :param str text_search: The case insensitive 'substring' filter based on the customer title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataCustomer @@ -356,7 +355,7 @@ def get_customers_using_get_with_http_info(self, page_size, page, **kwargs): # :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the customer title. + :param str text_search: The case insensitive 'substring' filter based on the customer title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataCustomer @@ -626,7 +625,7 @@ def get_tenant_customer_using_get_with_http_info(self, customer_title, **kwargs) def save_customer_using_post(self, **kwargs): # noqa: E501 """Create or update Customer (saveCustomer) # noqa: E501 - Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Customer entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_customer_using_post(async_req=True) @@ -634,7 +633,6 @@ def save_customer_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param Customer body: - :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group. :return: Customer If the method is called asynchronously, returns the request thread. @@ -649,7 +647,7 @@ def save_customer_using_post(self, **kwargs): # noqa: E501 def save_customer_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create or update Customer (saveCustomer) # noqa: E501 - Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Customer entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_customer_using_post_with_http_info(async_req=True) @@ -657,13 +655,12 @@ def save_customer_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param Customer body: - :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group. :return: Customer If the method is called asynchronously, returns the request thread. """ - all_params = ['body', 'entity_group_id'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -684,8 +681,6 @@ def save_customer_using_post_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'entity_group_id' in params: - query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 header_params = {} @@ -707,7 +702,7 @@ def save_customer_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/customer{?entityGroupId}', 'POST', + '/api/customer', 'POST', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_ce/dashboard_controller_api.py b/tb_rest_client/api/api_ce/dashboard_controller_api.py index b794bf43..d01dae72 100644 --- a/tb_rest_client/api/api_ce/dashboard_controller_api.py +++ b/tb_rest_client/api/api_ce/dashboard_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -42,7 +42,7 @@ def add_dashboard_customers_using_post(self, dashboard_id, **kwargs): # noqa: E >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param list[str] body: :return: Dashboard If the method is called asynchronously, @@ -65,7 +65,7 @@ def add_dashboard_customers_using_post_with_http_info(self, dashboard_id, **kwar >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param list[str] body: :return: Dashboard If the method is called asynchronously, @@ -146,7 +146,7 @@ def assign_dashboard_to_customer_using_post(self, customer_id, dashboard_id, **k :param async_req bool :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -169,7 +169,7 @@ def assign_dashboard_to_customer_using_post_with_http_info(self, customer_id, da :param async_req bool :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -351,7 +351,7 @@ def assign_dashboard_to_public_customer_using_post(self, dashboard_id, **kwargs) >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -373,7 +373,7 @@ def assign_dashboard_to_public_customer_using_post_with_http_info(self, dashboar >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -446,7 +446,7 @@ def delete_dashboard_using_delete(self, dashboard_id, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: None If the method is called asynchronously, returns the request thread. @@ -468,7 +468,7 @@ def delete_dashboard_using_delete_with_http_info(self, dashboard_id, **kwargs): >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: None If the method is called asynchronously, returns the request thread. @@ -545,7 +545,7 @@ def get_customer_dashboards_using_get(self, customer_id, page_size, page, **kwar :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param bool mobile: Exclude dashboards that are hidden for mobile - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -573,7 +573,7 @@ def get_customer_dashboards_using_get_with_http_info(self, customer_id, page_siz :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param bool mobile: Exclude dashboards that are hidden for mobile - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -668,7 +668,7 @@ def get_dashboard_by_id_using_get(self, dashboard_id, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -690,7 +690,7 @@ def get_dashboard_by_id_using_get_with_http_info(self, dashboard_id, **kwargs): >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -763,7 +763,7 @@ def get_dashboard_info_by_id_using_get(self, dashboard_id, **kwargs): # noqa: E >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: DashboardInfo If the method is called asynchronously, returns the request thread. @@ -785,7 +785,7 @@ def get_dashboard_info_by_id_using_get_with_http_info(self, dashboard_id, **kwar >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: DashboardInfo If the method is called asynchronously, returns the request thread. @@ -861,7 +861,7 @@ def get_edge_dashboards_using_get(self, edge_id, page_size, page, **kwargs): # :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -888,7 +888,7 @@ def get_edge_dashboards_using_get_with_http_info(self, edge_id, page_size, page, :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -1332,7 +1332,7 @@ def get_tenant_dashboards_using_get(self, page_size, page, **kwargs): # noqa: E :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param bool mobile: Exclude dashboards that are hidden for mobile - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -1359,7 +1359,7 @@ def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwar :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param bool mobile: Exclude dashboards that are hidden for mobile - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -1451,7 +1451,7 @@ def get_tenant_dashboards_using_get1(self, tenant_id, page_size, page, **kwargs) :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -1478,7 +1478,7 @@ def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -1658,7 +1658,7 @@ def remove_dashboard_customers_using_post(self, dashboard_id, **kwargs): # noqa >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param list[str] body: :return: Dashboard If the method is called asynchronously, @@ -1681,7 +1681,7 @@ def remove_dashboard_customers_using_post_with_http_info(self, dashboard_id, **k >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param list[str] body: :return: Dashboard If the method is called asynchronously, @@ -1754,7 +1754,7 @@ def remove_dashboard_customers_using_post_with_http_info(self, dashboard_id, **k def save_dashboard_using_post(self, **kwargs): # noqa: E501 """Create Or Update Dashboard (saveDashboard) # noqa: E501 - Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Dashboard entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_dashboard_using_post(async_req=True) @@ -1776,7 +1776,7 @@ def save_dashboard_using_post(self, **kwargs): # noqa: E501 def save_dashboard_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Dashboard (saveDashboard) # noqa: E501 - Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Dashboard entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_dashboard_using_post_with_http_info(async_req=True) @@ -1952,7 +1952,7 @@ def unassign_dashboard_from_customer_using_delete(self, customer_id, dashboard_i :param async_req bool :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -1975,7 +1975,7 @@ def unassign_dashboard_from_customer_using_delete_with_http_info(self, customer_ :param async_req bool :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -2157,7 +2157,7 @@ def unassign_dashboard_from_public_customer_using_delete(self, dashboard_id, **k >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -2179,7 +2179,7 @@ def unassign_dashboard_from_public_customer_using_delete_with_http_info(self, da >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -2252,7 +2252,7 @@ def update_dashboard_customers_using_post(self, dashboard_id, **kwargs): # noqa >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param list[str] body: :return: Dashboard If the method is called asynchronously, @@ -2275,7 +2275,7 @@ def update_dashboard_customers_using_post_with_http_info(self, dashboard_id, **k >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param list[str] body: :return: Dashboard If the method is called asynchronously, diff --git a/tb_rest_client/api/api_ce/device_api_controller_api.py b/tb_rest_client/api/api_ce/device_api_controller_api.py index 1c1c0878..b2a15ab7 100644 --- a/tb_rest_client/api/api_ce/device_api_controller_api.py +++ b/tb_rest_client/api/api_ce/device_api_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_ce/device_controller_api.py b/tb_rest_client/api/api_ce/device_controller_api.py index 012074a1..dab89b84 100644 --- a/tb_rest_client/api/api_ce/device_controller_api.py +++ b/tb_rest_client/api/api_ce/device_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -436,13 +436,13 @@ def assign_device_to_tenant_using_post_with_http_info(self, tenant_id, device_id _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def claim_device_using_post(self, device_name, **kwargs): # noqa: E501 + def claim_device_using_post1(self, device_name, **kwargs): # noqa: E501 """Claim device (claimDevice) # noqa: E501 Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming. Available for users with 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.claim_device_using_post(device_name, async_req=True) + >>> thread = api.claim_device_using_post1(device_name, async_req=True) >>> result = thread.get() :param async_req bool @@ -454,18 +454,18 @@ def claim_device_using_post(self, device_name, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.claim_device_using_post_with_http_info(device_name, **kwargs) # noqa: E501 + return self.claim_device_using_post1_with_http_info(device_name, **kwargs) # noqa: E501 else: - (data) = self.claim_device_using_post_with_http_info(device_name, **kwargs) # noqa: E501 + (data) = self.claim_device_using_post1_with_http_info(device_name, **kwargs) # noqa: E501 return data - def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa: E501 + def claim_device_using_post1_with_http_info(self, device_name, **kwargs): # noqa: E501 """Claim device (claimDevice) # noqa: E501 Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming. Available for users with 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.claim_device_using_post_with_http_info(device_name, async_req=True) + >>> thread = api.claim_device_using_post1_with_http_info(device_name, async_req=True) >>> result = thread.get() :param async_req bool @@ -487,14 +487,14 @@ def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method claim_device_using_post" % key + " to method claim_device_using_post1" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'device_name' is set if ('device_name' not in params or params['device_name'] is None): - raise ValueError("Missing the required parameter `device_name` when calling `claim_device_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `device_name` when calling `claim_device_using_post1`") # noqa: E501 collection_formats = {} @@ -847,7 +847,8 @@ def get_customer_device_infos_using_get(self, customer_id, page_size, page, **kw :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile :param str device_profile_id: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param bool active: A boolean value representing the device active flag. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDeviceInfo @@ -876,7 +877,8 @@ def get_customer_device_infos_using_get_with_http_info(self, customer_id, page_s :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile :param str device_profile_id: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param bool active: A boolean value representing the device active flag. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDeviceInfo @@ -884,7 +886,7 @@ def get_customer_device_infos_using_get_with_http_info(self, customer_id, page_s returns the request thread. """ - all_params = ['customer_id', 'page_size', 'page', 'type', 'device_profile_id', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['customer_id', 'page_size', 'page', 'type', 'device_profile_id', 'active', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -927,6 +929,8 @@ def get_customer_device_infos_using_get_with_http_info(self, customer_id, page_s query_params.append(('type', params['type'])) # noqa: E501 if 'device_profile_id' in params: query_params.append(('deviceProfileId', params['device_profile_id'])) # noqa: E501 + if 'active' in params: + query_params.append(('active', params['active'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: @@ -948,7 +952,7 @@ def get_customer_device_infos_using_get_with_http_info(self, customer_id, page_s auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/customer/{customerId}/deviceInfos{?deviceProfileId,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', + '/api/customer/{customerId}/deviceInfos{?active,deviceProfileId,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', path_params, query_params, header_params, @@ -977,7 +981,7 @@ def get_customer_devices_using_get(self, customer_id, page_size, page, **kwargs) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -1005,7 +1009,7 @@ def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -1571,12 +1575,14 @@ def get_edge_devices_using_get(self, edge_id, page_size, page, **kwargs): # noq :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str device_profile_id: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param bool active: A boolean value representing the device active flag. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Devices with creation time before it won't be queried :param int end_time: Timestamp. Devices with creation time after it won't be queried - :return: PageDataDevice + :return: PageDataDeviceInfo If the method is called asynchronously, returns the request thread. """ @@ -1601,17 +1607,19 @@ def get_edge_devices_using_get_with_http_info(self, edge_id, page_size, page, ** :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str device_profile_id: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param bool active: A boolean value representing the device active flag. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Devices with creation time before it won't be queried :param int end_time: Timestamp. Devices with creation time after it won't be queried - :return: PageDataDevice + :return: PageDataDeviceInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time'] # noqa: E501 + all_params = ['edge_id', 'page_size', 'page', 'type', 'device_profile_id', 'active', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1652,6 +1660,10 @@ def get_edge_devices_using_get_with_http_info(self, edge_id, page_size, page, ** query_params.append(('page', params['page'])) # noqa: E501 if 'type' in params: query_params.append(('type', params['type'])) # noqa: E501 + if 'device_profile_id' in params: + query_params.append(('deviceProfileId', params['device_profile_id'])) # noqa: E501 + if 'active' in params: + query_params.append(('active', params['active'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: @@ -1677,14 +1689,14 @@ def get_edge_devices_using_get_with_http_info(self, edge_id, page_size, page, ** auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/{edgeId}/devices{?endTime,page,pageSize,sortOrder,sortProperty,startTime,textSearch,type}', 'GET', + '/api/edge/{edgeId}/devices{?active,deviceProfileId,endTime,page,pageSize,sortOrder,sortProperty,startTime,textSearch,type}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataDevice', # noqa: E501 + response_type='PageDataDeviceInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1706,7 +1718,8 @@ def get_tenant_device_infos_using_get(self, page_size, page, **kwargs): # noqa: :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile :param str device_profile_id: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param bool active: A boolean value representing the device active flag. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDeviceInfo @@ -1734,7 +1747,8 @@ def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kw :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile :param str device_profile_id: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param bool active: A boolean value representing the device active flag. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDeviceInfo @@ -1742,7 +1756,7 @@ def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kw returns the request thread. """ - all_params = ['page_size', 'page', 'type', 'device_profile_id', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['page_size', 'page', 'type', 'device_profile_id', 'active', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1779,6 +1793,8 @@ def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kw query_params.append(('type', params['type'])) # noqa: E501 if 'device_profile_id' in params: query_params.append(('deviceProfileId', params['device_profile_id'])) # noqa: E501 + if 'active' in params: + query_params.append(('active', params['active'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: @@ -1800,7 +1816,7 @@ def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kw auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenant/deviceInfos{?deviceProfileId,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', + '/api/tenant/deviceInfos{?active,deviceProfileId,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', path_params, query_params, header_params, @@ -1923,7 +1939,7 @@ def get_tenant_devices_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -1950,7 +1966,7 @@ def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -2014,7 +2030,7 @@ def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs) auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenant/devices', 'GET', + '/api/tenant/devices{?page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', path_params, query_params, header_params, @@ -2222,7 +2238,7 @@ def re_claim_device_using_delete_with_http_info(self, device_name, **kwargs): # def save_device_using_post(self, **kwargs): # noqa: E501 """Create Or Update Device (saveDevice) # noqa: E501 - Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error. Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error. Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_using_post(async_req=True) @@ -2245,7 +2261,7 @@ def save_device_using_post(self, **kwargs): # noqa: E501 def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Device (saveDevice) # noqa: E501 - Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error. Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error. Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_using_post_with_http_info(async_req=True) @@ -2259,7 +2275,7 @@ def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 returns the request thread. """ - all_params = ['body', 'access_token', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'access_token'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2282,8 +2298,6 @@ def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 query_params = [] if 'access_token' in params: query_params.append(('accessToken', params['access_token'])) # noqa: E501 - if 'entity_group_id' in params: - query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 header_params = {} @@ -2305,7 +2319,7 @@ def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/device{?accessToken,entityGroupId}', 'POST', + '/api/device{?accessToken}', 'POST', path_params, query_params, header_params, @@ -2323,7 +2337,7 @@ def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 def save_device_with_credentials_using_post(self, **kwargs): # noqa: E501 """Create Device (saveDevice) with credentials # noqa: E501 - Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below: ```json { \"device\": { \"name\": \"LwRpk00000000\", \"type\": \"lwm2mProfileRpk\" }, \"credentials\": { \"id\": \"null\", \"createdTime\": 0, \"deviceId\": \"null\", \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": { \"client\": { \"endpoint\": \"LwRpk00000000\", \"securityConfigClientMode\": \"RPK\", \"key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\" }, \"bootstrap\": { \"bootstrapServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" }, \"lwm2mServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" } } } } } ``` Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below: ```json { \"device\": { \"name\": \"LwRpk00000000\", \"type\": \"lwm2mProfileRpk\" }, \"credentials\": { \"id\": \"null\", \"createdTime\": 0, \"deviceId\": \"null\", \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": { \"client\": { \"endpoint\": \"LwRpk00000000\", \"securityConfigClientMode\": \"RPK\", \"key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\" }, \"bootstrap\": { \"bootstrapServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" }, \"lwm2mServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" } } } } } ```Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_with_credentials_using_post(async_req=True) @@ -2345,7 +2359,7 @@ def save_device_with_credentials_using_post(self, **kwargs): # noqa: E501 def save_device_with_credentials_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Device (saveDevice) with credentials # noqa: E501 - Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below: ```json { \"device\": { \"name\": \"LwRpk00000000\", \"type\": \"lwm2mProfileRpk\" }, \"credentials\": { \"id\": \"null\", \"createdTime\": 0, \"deviceId\": \"null\", \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": { \"client\": { \"endpoint\": \"LwRpk00000000\", \"securityConfigClientMode\": \"RPK\", \"key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\" }, \"bootstrap\": { \"bootstrapServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" }, \"lwm2mServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" } } } } } ``` Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below: ```json { \"device\": { \"name\": \"LwRpk00000000\", \"type\": \"lwm2mProfileRpk\" }, \"credentials\": { \"id\": \"null\", \"createdTime\": 0, \"deviceId\": \"null\", \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": { \"client\": { \"endpoint\": \"LwRpk00000000\", \"securityConfigClientMode\": \"RPK\", \"key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\" }, \"bootstrap\": { \"bootstrapServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" }, \"lwm2mServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" } } } } } ```Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_with_credentials_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_ce/device_profile_controller_api.py b/tb_rest_client/api/api_ce/device_profile_controller_api.py index 79ddc1bf..203f7ba3 100644 --- a/tb_rest_client/api/api_ce/device_profile_controller_api.py +++ b/tb_rest_client/api/api_ce/device_profile_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -507,7 +507,7 @@ def get_device_profile_infos_using_get(self, page_size, page, **kwargs): # noqa :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the device profile name. + :param str text_search: The case insensitive 'substring' filter based on the device profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param str transport_type: Type of the transport @@ -534,7 +534,7 @@ def get_device_profile_infos_using_get_with_http_info(self, page_size, page, **k :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the device profile name. + :param str text_search: The case insensitive 'substring' filter based on the device profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param str transport_type: Type of the transport @@ -626,7 +626,7 @@ def get_device_profiles_using_get(self, page_size, page, **kwargs): # noqa: E50 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the device profile name. + :param str text_search: The case insensitive 'substring' filter based on the device profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDeviceProfile @@ -652,7 +652,7 @@ def get_device_profiles_using_get_with_http_info(self, page_size, page, **kwargs :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the device profile name. + :param str text_search: The case insensitive 'substring' filter based on the device profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDeviceProfile @@ -823,7 +823,7 @@ def get_timeseries_keys_using_get_with_http_info(self, **kwargs): # noqa: E501 def save_device_profile_using_post(self, **kwargs): # noqa: E501 """Create Or Update Device Profile (saveDeviceProfile) # noqa: E501 - Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time-series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time-series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time-series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time-series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_profile_using_post(async_req=True) @@ -845,7 +845,7 @@ def save_device_profile_using_post(self, **kwargs): # noqa: E501 def save_device_profile_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Device Profile (saveDeviceProfile) # noqa: E501 - Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time-series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time-series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time-series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time-series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_profile_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_ce/edge_controller_api.py b/tb_rest_client/api/api_ce/edge_controller_api.py index 72939c7a..f93b05a0 100644 --- a/tb_rest_client/api/api_ce/edge_controller_api.py +++ b/tb_rest_client/api/api_ce/edge_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,109 +32,6 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def activate_instance_using_post(self, license_secret, release_date, **kwargs): # noqa: E501 - """Activate edge instance (activateInstance) # noqa: E501 - - Activates edge license on license portal. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_instance_using_post(license_secret, release_date, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str license_secret: licenseSecret (required) - :param str release_date: releaseDate (required) - :return: JsonNode - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.activate_instance_using_post_with_http_info(license_secret, release_date, **kwargs) # noqa: E501 - else: - (data) = self.activate_instance_using_post_with_http_info(license_secret, release_date, **kwargs) # noqa: E501 - return data - - def activate_instance_using_post_with_http_info(self, license_secret, release_date, **kwargs): # noqa: E501 - """Activate edge instance (activateInstance) # noqa: E501 - - Activates edge license on license portal. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_instance_using_post_with_http_info(license_secret, release_date, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str license_secret: licenseSecret (required) - :param str release_date: releaseDate (required) - :return: JsonNode - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['license_secret', 'release_date'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method activate_instance_using_post" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'license_secret' is set - if ('license_secret' not in params or - params['license_secret'] is None): - raise ValueError("Missing the required parameter `license_secret` when calling `activate_instance_using_post`") # noqa: E501 - # verify the required parameter 'release_date' is set - if ('release_date' not in params or - params['release_date'] is None): - raise ValueError("Missing the required parameter `release_date` when calling `activate_instance_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'license_secret' in params: - query_params.append(('licenseSecret', params['license_secret'])) # noqa: E501 - if 'release_date' in params: - query_params.append(('releaseDate', params['release_date'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/license/activateInstance{?licenseSecret,releaseDate}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JsonNode', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def assign_edge_to_customer_using_post(self, customer_id, edge_id, **kwargs): # noqa: E501 """Assign edge to customer (assignEdgeToCustomer) # noqa: E501 @@ -333,101 +230,6 @@ def assign_edge_to_public_customer_using_post_with_http_info(self, edge_id, **kw _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def check_instance_using_post(self, **kwargs): # noqa: E501 - """Check edge license (checkInstance) # noqa: E501 - - Checks license request from edge service by forwarding request to license portal. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.check_instance_using_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param JsonNode body: - :return: JsonNode - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.check_instance_using_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.check_instance_using_post_with_http_info(**kwargs) # noqa: E501 - return data - - def check_instance_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Check edge license (checkInstance) # noqa: E501 - - Checks license request from edge service by forwarding request to license portal. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.check_instance_using_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param JsonNode body: - :return: JsonNode - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method check_instance_using_post" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/license/checkInstance', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JsonNode', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def delete_edge_using_delete(self, edge_id, **kwargs): # noqa: E501 """Delete edge (deleteEdge) # noqa: E501 @@ -727,7 +529,7 @@ def get_customer_edge_infos_using_get(self, customer_id, page_size, page, **kwar :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdgeInfo @@ -755,7 +557,7 @@ def get_customer_edge_infos_using_get_with_http_info(self, customer_id, page_siz :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdgeInfo @@ -854,7 +656,7 @@ def get_customer_edges_using_get(self, customer_id, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -882,7 +684,7 @@ def get_customer_edges_using_get_with_http_info(self, customer_id, page_size, pa :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -1062,6 +864,101 @@ def get_edge_by_id_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_edge_docker_install_instructions_using_get(self, edge_id, **kwargs): # noqa: E501 + """Get Edge Docker Install Instructions (getEdgeDockerInstallInstructions) # noqa: E501 + + Get a docker install instructions for provided edge id. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edge_docker_install_instructions_using_get(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EdgeInstallInstructions + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + else: + (data) = self.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + return data + + def get_edge_docker_install_instructions_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E501 + """Get Edge Docker Install Instructions (getEdgeDockerInstallInstructions) # noqa: E501 + + Get a docker install instructions for provided edge id. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EdgeInstallInstructions + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_edge_docker_install_instructions_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'edge_id' is set + if ('edge_id' not in params or + params['edge_id'] is None): + raise ValueError("Missing the required parameter `edge_id` when calling `get_edge_docker_install_instructions_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/instructions/{edgeId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EdgeInstallInstructions', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_edge_info_by_id_using_get(self, edge_id, **kwargs): # noqa: E501 """Get Edge Info (getEdgeInfoById) # noqa: E501 @@ -1351,7 +1248,7 @@ def get_edges_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -1377,7 +1274,7 @@ def get_edges_using_get_with_http_info(self, page_size, page, **kwargs): # noqa :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -1467,7 +1364,7 @@ def get_tenant_edge_infos_using_get(self, page_size, page, **kwargs): # noqa: E :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdgeInfo @@ -1494,7 +1391,7 @@ def get_tenant_edge_infos_using_get_with_http_info(self, page_size, page, **kwar :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdgeInfo @@ -1681,7 +1578,7 @@ def get_tenant_edges_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -1708,7 +1605,7 @@ def get_tenant_edges_using_get_with_http_info(self, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -1972,7 +1869,7 @@ def process_edges_bulk_import_using_post_with_http_info(self, **kwargs): # noqa def save_edge_using_post(self, **kwargs): # noqa: E501 """Create Or Update Edge (saveEdge) # noqa: E501 - Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error. Edge 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. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error. Edge 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. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_edge_using_post(async_req=True) @@ -1994,7 +1891,7 @@ def save_edge_using_post(self, **kwargs): # noqa: E501 def save_edge_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Edge (saveEdge) # noqa: E501 - Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error. Edge 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. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error. Edge 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. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_edge_using_post_with_http_info(async_req=True) @@ -2178,7 +2075,7 @@ def sync_edge_using_post(self, edge_id, **kwargs): # noqa: E501 :param async_req bool :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ @@ -2200,7 +2097,7 @@ def sync_edge_using_post_with_http_info(self, edge_id, **kwargs): # noqa: E501 :param async_req bool :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ @@ -2254,7 +2151,7 @@ def sync_edge_using_post_with_http_info(self, edge_id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='DeferredResultResponseEntity', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2356,99 +2253,3 @@ def unassign_edge_from_customer_using_delete_with_http_info(self, edge_id, **kwa _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def get_edge_docker_install_instructions_using_get(self, edge_id, **kwargs): # noqa: E501 - """Get Edge Docker Install Instructions (getEdgeDockerInstallInstructions) # noqa: E501 - - Get a docker install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_edge_docker_install_instructions_using_get(edge_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: EdgeInstallInstructions - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 - else: - (data) = self.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 - return data - - def get_edge_docker_install_instructions_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E501 - """Get Edge Docker Install Instructions (getEdgeDockerInstallInstructions) # noqa: E501 - - Get a docker install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: EdgeInstallInstructions - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['edge_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_edge_docker_install_instructions_using_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'edge_id' is set - if ('edge_id' not in params or - params['edge_id'] is None): - raise ValueError( - "Missing the required parameter `edge_id` when calling `get_edge_docker_install_instructions_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/instructions/{edgeId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='EdgeInstallInstructions', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_ce/edge_event_controller_api.py b/tb_rest_client/api/api_ce/edge_event_controller_api.py index e87756ca..aa848196 100644 --- a/tb_rest_client/api/api_ce/edge_event_controller_api.py +++ b/tb_rest_client/api/api_ce/edge_event_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -45,7 +45,7 @@ def get_edge_events_using_get(self, edge_id, page_size, page, **kwargs): # noqa :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the edge event type name. + :param str text_search: The case insensitive 'substring' filter based on the edge event type name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Edge events with creation time before it won't be queried @@ -74,7 +74,7 @@ def get_edge_events_using_get_with_http_info(self, edge_id, page_size, page, **k :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the edge event type name. + :param str text_search: The case insensitive 'substring' filter based on the edge event type name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Edge events with creation time before it won't be queried diff --git a/tb_rest_client/api/api_ce/entities_version_control_controller_api.py b/tb_rest_client/api/api_ce/entities_version_control_controller_api.py index 33749ee0..b3675ec7 100644 --- a/tb_rest_client/api/api_ce/entities_version_control_controller_api.py +++ b/tb_rest_client/api/api_ce/entities_version_control_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -128,7 +128,7 @@ def compare_entity_data_to_version_using_get_with_http_info(self, entity_type, i auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entities/vc/diff/{entityType}/{internalEntityUuid}{versionId}', 'GET', + '/api/entities/vc/diff/{entityType}/{internalEntityUuid}{?versionId}', 'GET', path_params, query_params, header_params, @@ -845,7 +845,7 @@ def list_entity_type_versions_using_get_with_http_info(self, entity_type, branch auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entities/vc/version/{entityType}', 'GET', + '/api/entities/vc/version/{entityType}?sortProperty=timestamp{&branch,page,pageSize,sortOrder,textSearch}', 'GET', path_params, query_params, header_params, @@ -984,7 +984,7 @@ def list_entity_versions_using_get_with_http_info(self, entity_type, external_en auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entities/vc/version/{entityType}/{externalEntityUuid}', 'GET', + '/api/entities/vc/version/{entityType}/{externalEntityUuid}?sortProperty=timestamp{&branch,page,pageSize,sortOrder,textSearch}', 'GET', path_params, query_params, header_params, @@ -1107,7 +1107,7 @@ def list_versions_using_get_with_http_info(self, branch, page_size, page, **kwar auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entities/vc/version', 'GET', + '/api/entities/vc/version?sortProperty=timestamp{&branch,page,pageSize,sortOrder,textSearch}', 'GET', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_ce/entity_query_controller_api.py b/tb_rest_client/api/api_ce/entity_query_controller_api.py index 3215af86..92d2de76 100644 --- a/tb_rest_client/api/api_ce/entity_query_controller_api.py +++ b/tb_rest_client/api/api_ce/entity_query_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,6 +32,101 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def count_alarms_by_query_using_post(self, **kwargs): # noqa: E501 + """Count Alarms by Query (countAlarmsByQuery) # noqa: E501 + + Returns the number of alarms that match the query definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.count_alarms_by_query_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AlarmCountQuery body: + :return: int + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.count_alarms_by_query_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.count_alarms_by_query_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def count_alarms_by_query_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Count Alarms by Query (countAlarmsByQuery) # noqa: E501 + + Returns the number of alarms that match the query definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.count_alarms_by_query_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AlarmCountQuery body: + :return: int + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method count_alarms_by_query_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/alarmsQuery/count', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='int', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def count_entities_by_query_using_post(self, **kwargs): # noqa: E501 """Count Entities by Query # noqa: E501 diff --git a/tb_rest_client/api/api_ce/entity_relation_controller_api.py b/tb_rest_client/api/api_ce/entity_relation_controller_api.py index fb58cb43..dd13fc8e 100644 --- a/tb_rest_client/api/api_ce/entity_relation_controller_api.py +++ b/tb_rest_client/api/api_ce/entity_relation_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_ce/entity_view_controller_api.py b/tb_rest_client/api/api_ce/entity_view_controller_api.py index 19196731..47e1d9b4 100644 --- a/tb_rest_client/api/api_ce/entity_view_controller_api.py +++ b/tb_rest_client/api/api_ce/entity_view_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -537,7 +537,7 @@ def get_customer_entity_view_infos_using_get(self, customer_id, page_size, page, :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityViewInfo @@ -565,7 +565,7 @@ def get_customer_entity_view_infos_using_get_with_http_info(self, customer_id, p :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityViewInfo @@ -664,7 +664,7 @@ def get_customer_entity_views_using_get(self, customer_id, page_size, page, **kw :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -692,7 +692,7 @@ def get_customer_entity_views_using_get_with_http_info(self, customer_id, page_s :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -1200,7 +1200,7 @@ def get_tenant_entity_view_infos_using_get(self, page_size, page, **kwargs): # :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityViewInfo @@ -1227,7 +1227,7 @@ def get_tenant_entity_view_infos_using_get_with_http_info(self, page_size, page, :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityViewInfo @@ -1414,7 +1414,7 @@ def get_tenant_entity_views_using_get(self, page_size, page, **kwargs): # noqa: :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -1441,7 +1441,7 @@ def get_tenant_entity_views_using_get_with_http_info(self, page_size, page, **kw :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -1523,7 +1523,7 @@ def get_tenant_entity_views_using_get_with_http_info(self, page_size, page, **kw def save_entity_view_using_post(self, **kwargs): # noqa: E501 """Save or update entity view (saveEntityView) # noqa: E501 - Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details. # noqa: E501 + Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_view_using_post(async_req=True) @@ -1545,7 +1545,7 @@ def save_entity_view_using_post(self, **kwargs): # noqa: E501 def save_entity_view_using_post_with_http_info(self, **kwargs): # noqa: E501 """Save or update entity view (saveEntityView) # noqa: E501 - Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details. # noqa: E501 + Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_view_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_ce/event_controller_api.py b/tb_rest_client/api/api_ce/event_controller_api.py index 52ea6377..aa6d6d0e 100644 --- a/tb_rest_client/api/api_ce/event_controller_api.py +++ b/tb_rest_client/api/api_ce/event_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,10 +32,129 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def clear_events_using_post(self, entity_type, entity_id, **kwargs): # noqa: E501 + """Clear Events (clearEvents) # noqa: E501 + + Clears events by filter for specified entity. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.clear_events_using_post(entity_type, entity_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param EventFilter body: + :param int start_time: Timestamp. Events with creation time before it won't be queried. + :param int end_time: Timestamp. Events with creation time after it won't be queried. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.clear_events_using_post_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + else: + (data) = self.clear_events_using_post_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + return data + + def clear_events_using_post_with_http_info(self, entity_type, entity_id, **kwargs): # noqa: E501 + """Clear Events (clearEvents) # noqa: E501 + + Clears events by filter for specified entity. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.clear_events_using_post_with_http_info(entity_type, entity_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param EventFilter body: + :param int start_time: Timestamp. Events with creation time before it won't be queried. + :param int end_time: Timestamp. Events with creation time after it won't be queried. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_type', 'entity_id', 'body', 'start_time', 'end_time'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method clear_events_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `clear_events_using_post`") # noqa: E501 + # verify the required parameter 'entity_id' is set + if ('entity_id' not in params or + params['entity_id'] is None): + raise ValueError("Missing the required parameter `entity_id` when calling `clear_events_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + if 'entity_id' in params: + path_params['entityId'] = params['entity_id'] # noqa: E501 + + query_params = [] + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/events/{entityType}/{entityId}/clear{?endTime,startTime}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_events_using_get(self, entity_type, entity_id, tenant_id, page_size, page, **kwargs): # noqa: E501 - """Get Events (getEvents) # noqa: E501 + """Get Events (Deprecated) # noqa: E501 - Returns a page of events for specified entity. You can 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. # noqa: E501 + Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_events_using_get(entity_type, entity_id, tenant_id, page_size, page, async_req=True) @@ -52,7 +171,7 @@ def get_events_using_get(self, entity_type, entity_id, tenant_id, page_size, pag :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -64,9 +183,9 @@ def get_events_using_get(self, entity_type, entity_id, tenant_id, page_size, pag return data def get_events_using_get_with_http_info(self, entity_type, entity_id, tenant_id, page_size, page, **kwargs): # noqa: E501 - """Get Events (getEvents) # noqa: E501 + """Get Events (Deprecated) # noqa: E501 - Returns a page of events for specified entity. You can 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. # noqa: E501 + Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_events_using_get_with_http_info(entity_type, entity_id, tenant_id, page_size, page, async_req=True) @@ -83,7 +202,7 @@ def get_events_using_get_with_http_info(self, entity_type, entity_id, tenant_id, :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -171,7 +290,7 @@ def get_events_using_get_with_http_info(self, entity_type, entity_id, tenant_id, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataEvent', # noqa: E501 + response_type='PageDataEventInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -200,7 +319,7 @@ def get_events_using_get1(self, entity_type, entity_id, event_type, tenant_id, p :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -232,7 +351,7 @@ def get_events_using_get1_with_http_info(self, entity_type, entity_id, event_typ :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -326,7 +445,7 @@ def get_events_using_get1_with_http_info(self, entity_type, entity_id, event_typ body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataEvent', # noqa: E501 + response_type='PageDataEventInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -355,7 +474,7 @@ def get_events_using_post(self, tenant_id, page_size, page, entity_type, entity_ :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -387,7 +506,7 @@ def get_events_using_post_with_http_info(self, tenant_id, page_size, page, entit :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -481,7 +600,7 @@ def get_events_using_post_with_http_info(self, tenant_id, page_size, page, entit body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataEvent', # noqa: E501 + response_type='PageDataEventInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_ce/login_endpoint_api.py b/tb_rest_client/api/api_ce/login_endpoint_api.py index 4b91fad8..75f89375 100644 --- a/tb_rest_client/api/api_ce/login_endpoint_api.py +++ b/tb_rest_client/api/api_ce/login_endpoint_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_ce/lwm_2m_controller_api.py b/tb_rest_client/api/api_ce/lwm_2m_controller_api.py index 278ee9b4..0ad63dc5 100644 --- a/tb_rest_client/api/api_ce/lwm_2m_controller_api.py +++ b/tb_rest_client/api/api_ce/lwm_2m_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -43,7 +43,7 @@ def get_lwm2m_bootstrap_security_info_using_get(self, is_bootstrap_server, **kwa :param async_req bool :param bool is_bootstrap_server: A Boolean value representing the Server SecurityInfo for future Bootstrap client mode settings. Values: 'true' for Bootstrap Server; 'false' for Lwm2m Server. (required) - :return: ServerSecurityConfig + :return: LwM2MServerSecurityConfigDefault If the method is called asynchronously, returns the request thread. """ @@ -65,7 +65,7 @@ def get_lwm2m_bootstrap_security_info_using_get_with_http_info(self, is_bootstra :param async_req bool :param bool is_bootstrap_server: A Boolean value representing the Server SecurityInfo for future Bootstrap client mode settings. Values: 'true' for Bootstrap Server; 'false' for Lwm2m Server. (required) - :return: ServerSecurityConfig + :return: LwM2MServerSecurityConfigDefault If the method is called asynchronously, returns the request thread. """ @@ -119,7 +119,7 @@ def get_lwm2m_bootstrap_security_info_using_get_with_http_info(self, is_bootstra body=body_params, post_params=form_params, files=local_var_files, - response_type='ServerSecurityConfig', # noqa: E501 + response_type='LwM2MServerSecurityConfigDefault', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_ce/notification_controller_api.py b/tb_rest_client/api/api_ce/notification_controller_api.py new file mode 100644 index 00000000..377f2ed5 --- /dev/null +++ b/tb_rest_client/api/api_ce/notification_controller_api.py @@ -0,0 +1,1189 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class NotificationControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_notification_request_using_post(self, **kwargs): # noqa: E501 + """Create notification request (createNotificationRequest) # noqa: E501 + + Processes notification request. Mandatory request properties are `targets` (list of targets ids to send notification to), and either `templateId` (existing notification template id) or `template` (to send notification without saving the template). Optionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification. For each enabled delivery method in the notification template, there must be a target in the `targets` list that supports this delivery method: if you chose `WEB`, `EMAIL` or `SMS` - there must be at least one target in `targets` of `PLATFORM_USERS` type. For `SLACK` delivery method - you need to chose at least one `SLACK` notification target. Notification request object with `PROCESSING` status will be returned immediately, and the notification sending itself is done asynchronously. After all notifications are sent, the `status` of the request becomes `SENT`. Use `getNotificationRequestById` to see the notification request processing status and some sending stats. Here is an example of notification request to one target using saved template: ```json { \"templateId\": { \"entityType\": \"NOTIFICATION_TEMPLATE\", \"id\": \"6dbc3670-e4dd-11ed-9401-dbcc5dff78be\" }, \"targets\": [ \"320e3ed0-d785-11ed-a06c-21dd57dd88ca\" ], \"additionalConfig\": { \"sendingDelayInSec\": 0 } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_notification_request_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRequest body: + :return: NotificationRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_notification_request_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_notification_request_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def create_notification_request_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Create notification request (createNotificationRequest) # noqa: E501 + + Processes notification request. Mandatory request properties are `targets` (list of targets ids to send notification to), and either `templateId` (existing notification template id) or `template` (to send notification without saving the template). Optionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification. For each enabled delivery method in the notification template, there must be a target in the `targets` list that supports this delivery method: if you chose `WEB`, `EMAIL` or `SMS` - there must be at least one target in `targets` of `PLATFORM_USERS` type. For `SLACK` delivery method - you need to chose at least one `SLACK` notification target. Notification request object with `PROCESSING` status will be returned immediately, and the notification sending itself is done asynchronously. After all notifications are sent, the `status` of the request becomes `SENT`. Use `getNotificationRequestById` to see the notification request processing status and some sending stats. Here is an example of notification request to one target using saved template: ```json { \"templateId\": { \"entityType\": \"NOTIFICATION_TEMPLATE\", \"id\": \"6dbc3670-e4dd-11ed-9401-dbcc5dff78be\" }, \"targets\": [ \"320e3ed0-d785-11ed-a06c-21dd57dd88ca\" ], \"additionalConfig\": { \"sendingDelayInSec\": 0 } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_notification_request_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRequest body: + :return: NotificationRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_notification_request_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/request', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationRequest', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_notification_request_using_delete(self, id, **kwargs): # noqa: E501 + """Delete notification request (deleteNotificationRequest) # noqa: E501 + + Deletes notification request by its id. If the request has status `SENT` - all sent notifications for this request will be deleted. If it is `SCHEDULED`, the request will be cancelled. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_request_using_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_notification_request_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_notification_request_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_notification_request_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete notification request (deleteNotificationRequest) # noqa: E501 + + Deletes notification request by its id. If the request has status `SENT` - all sent notifications for this request will be deleted. If it is `SCHEDULED`, the request will be cancelled. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_request_using_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_notification_request_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_notification_request_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/request/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_notification_using_delete(self, id, **kwargs): # noqa: E501 + """Delete notification (deleteNotification) # noqa: E501 + + Deletes notification by its id. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_using_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_notification_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_notification_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_notification_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete notification (deleteNotification) # noqa: E501 + + Deletes notification by its id. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_using_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_notification_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_notification_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_available_delivery_methods_using_get(self, **kwargs): # noqa: E501 + """Get available delivery methods (getAvailableDeliveryMethods) # noqa: E501 + + Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_available_delivery_methods_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_available_delivery_methods_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_available_delivery_methods_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_available_delivery_methods_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get available delivery methods (getAvailableDeliveryMethods) # noqa: E501 + + Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_available_delivery_methods_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_available_delivery_methods_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/deliveryMethods', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_request_by_id_using_get(self, id, **kwargs): # noqa: E501 + """Get notification request by id (getNotificationRequestById) # noqa: E501 + + Fetches notification request info by request id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_request_by_id_using_get(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationRequestInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_request_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_request_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_notification_request_by_id_using_get_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification request by id (getNotificationRequestById) # noqa: E501 + + Fetches notification request info by request id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_request_by_id_using_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationRequestInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_request_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_notification_request_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/request/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationRequestInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_request_preview_using_post(self, **kwargs): # noqa: E501 + """Get notification request preview (getNotificationRequestPreview) # noqa: E501 + + Returns preview for notification request. `processedTemplates` shows how the notifications for each delivery method will look like for the first recipient of the corresponding notification target. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_request_preview_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRequest body: + :param int recipients_preview_size: Amount of the recipients to show in preview + :return: NotificationRequestPreview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_request_preview_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_notification_request_preview_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def get_notification_request_preview_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Get notification request preview (getNotificationRequestPreview) # noqa: E501 + + Returns preview for notification request. `processedTemplates` shows how the notifications for each delivery method will look like for the first recipient of the corresponding notification target. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_request_preview_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRequest body: + :param int recipients_preview_size: Amount of the recipients to show in preview + :return: NotificationRequestPreview + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'recipients_preview_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_request_preview_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'recipients_preview_size' in params: + query_params.append(('recipientsPreviewSize', params['recipients_preview_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/request/preview{?recipientsPreviewSize}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationRequestPreview', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_requests_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get notification requests (getNotificationRequests) # noqa: E501 + + Returns the page of notification requests submitted by users of this tenant or sysadmins. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_requests_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filed based on the used template name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationRequestInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_requests_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_requests_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_notification_requests_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get notification requests (getNotificationRequests) # noqa: E501 + + Returns the page of notification requests submitted by users of this tenant or sysadmins. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_requests_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filed based on the used template name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationRequestInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_requests_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notification_requests_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notification_requests_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/requests{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotificationRequestInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_settings_using_get(self, **kwargs): # noqa: E501 + """Get notification settings (getNotificationSettings) # noqa: E501 + + Retrieves notification settings for this tenant or sysadmin. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_settings_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NotificationSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_settings_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_notification_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_notification_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get notification settings (getNotificationSettings) # noqa: E501 + + Retrieves notification settings for this tenant or sysadmin. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_settings_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NotificationSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_settings_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notifications_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get notifications (getNotifications) # noqa: E501 + + Returns the page of notifications for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notifications_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on notification subject or text + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param bool unread_only: To search for unread notifications only + :return: PageDataNotification + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notifications_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notifications_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_notifications_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get notifications (getNotifications) # noqa: E501 + + Returns the page of notifications for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notifications_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on notification subject or text + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param bool unread_only: To search for unread notifications only + :return: PageDataNotification + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'unread_only'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notifications_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notifications_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notifications_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'unread_only' in params: + query_params.append(('unreadOnly', params['unread_only'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notifications{?page,pageSize,sortOrder,sortProperty,textSearch,unreadOnly}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotification', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def mark_all_notifications_as_read_using_put(self, **kwargs): # noqa: E501 + """Mark all notifications as read (markAllNotificationsAsRead) # noqa: E501 + + Marks all unread notifications as read. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_all_notifications_as_read_using_put(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.mark_all_notifications_as_read_using_put_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.mark_all_notifications_as_read_using_put_with_http_info(**kwargs) # noqa: E501 + return data + + def mark_all_notifications_as_read_using_put_with_http_info(self, **kwargs): # noqa: E501 + """Mark all notifications as read (markAllNotificationsAsRead) # noqa: E501 + + Marks all unread notifications as read. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_all_notifications_as_read_using_put_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method mark_all_notifications_as_read_using_put" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notifications/read', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def mark_notification_as_read_using_put(self, id, **kwargs): # noqa: E501 + """Mark notification as read (markNotificationAsRead) # noqa: E501 + + Marks notification as read by its id. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_notification_as_read_using_put(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.mark_notification_as_read_using_put_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.mark_notification_as_read_using_put_with_http_info(id, **kwargs) # noqa: E501 + return data + + def mark_notification_as_read_using_put_with_http_info(self, id, **kwargs): # noqa: E501 + """Mark notification as read (markNotificationAsRead) # noqa: E501 + + Marks notification as read by its id. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_notification_as_read_using_put_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method mark_notification_as_read_using_put" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `mark_notification_as_read_using_put`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/{id}/read', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_notification_settings_using_post(self, **kwargs): # noqa: E501 + """Save notification settings (saveNotificationSettings) # noqa: E501 + + Saves notification settings for this tenant or sysadmin. `deliveryMethodsConfigs` of the settings must be specified. Here is an example of the notification settings with Slack configuration: ```json { \"deliveryMethodsConfigs\": { \"SLACK\": { \"method\": \"SLACK\", \"botToken\": \"xoxb-....\" } } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_settings_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationSettings body: + :return: NotificationSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_notification_settings_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_notification_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_notification_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save notification settings (saveNotificationSettings) # noqa: E501 + + Saves notification settings for this tenant or sysadmin. `deliveryMethodsConfigs` of the settings must be specified. Here is an example of the notification settings with Slack configuration: ```json { \"deliveryMethodsConfigs\": { \"SLACK\": { \"method\": \"SLACK\", \"botToken\": \"xoxb-....\" } } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_settings_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationSettings body: + :return: NotificationSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_notification_settings_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/settings', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_ce/notification_rule_controller_api.py b/tb_rest_client/api/api_ce/notification_rule_controller_api.py new file mode 100644 index 00000000..f59eb9a2 --- /dev/null +++ b/tb_rest_client/api/api_ce/notification_rule_controller_api.py @@ -0,0 +1,433 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class NotificationRuleControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_notification_rule_using_delete(self, id, **kwargs): # noqa: E501 + """Delete notification rule (deleteNotificationRule) # noqa: E501 + + Deletes notification rule by id. Cancels all related scheduled notification requests (e.g. due to escalation table) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_rule_using_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_notification_rule_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_notification_rule_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_notification_rule_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete notification rule (deleteNotificationRule) # noqa: E501 + + Deletes notification rule by id. Cancels all related scheduled notification requests (e.g. due to escalation table) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_rule_using_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_notification_rule_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_notification_rule_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/rule/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_rule_by_id_using_get(self, id, **kwargs): # noqa: E501 + """Get notification rule by id (getNotificationRuleById) # noqa: E501 + + Fetches notification rule info by rule's id. In addition to regular notification rule fields, there are `templateName` and `deliveryMethods` in the response. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_rule_by_id_using_get(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationRuleInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_rule_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_rule_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_notification_rule_by_id_using_get_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification rule by id (getNotificationRuleById) # noqa: E501 + + Fetches notification rule info by rule's id. In addition to regular notification rule fields, there are `templateName` and `deliveryMethods` in the response. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_rule_by_id_using_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationRuleInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_rule_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_notification_rule_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/rule/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationRuleInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_rules_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get notification rules (getNotificationRules) # noqa: E501 + + Returns the page of notification rules. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_rules_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on rule's name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationRuleInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_rules_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_rules_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_notification_rules_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get notification rules (getNotificationRules) # noqa: E501 + + Returns the page of notification rules. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_rules_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on rule's name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationRuleInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_rules_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notification_rules_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notification_rules_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/rules{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotificationRuleInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_notification_rule_using_post(self, **kwargs): # noqa: E501 + """Save notification rule (saveNotificationRule) # noqa: E501 + + Creates or updates notification rule. Mandatory properties are `name`, `templateId` (of a template with `notificationType` matching to rule's `triggerType`), `triggerType`, `triggerConfig` and `recipientConfig`. Additionally, you may specify rule `description` inside of `additionalConfig`. Trigger type of the rule cannot be changed. Available trigger types for tenant: `ENTITY_ACTION`, `ALARM`, `ALARM_COMMENT`, `ALARM_ASSIGNMENT`, `DEVICE_ACTIVITY`, `RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT`. For sysadmin, there are following trigger types available: `ENTITIES_LIMIT`, `API_USAGE_LIMIT`, `NEW_PLATFORM_VERSION`. Here is an example of notification rule to send notification when a device, asset or customer is created or deleted: ```json { \"name\": \"Entity action\", \"templateId\": { \"entityType\": \"NOTIFICATION_TEMPLATE\", \"id\": \"32117320-d785-11ed-a06c-21dd57dd88ca\" }, \"triggerType\": \"ENTITY_ACTION\", \"triggerConfig\": { \"entityTypes\": [ \"CUSTOMER\", \"DEVICE\", \"ASSET\" ], \"created\": true, \"updated\": false, \"deleted\": true, \"triggerType\": \"ENTITY_ACTION\" }, \"recipientsConfig\": { \"targets\": [ \"320f2930-d785-11ed-a06c-21dd57dd88ca\" ], \"triggerType\": \"ENTITY_ACTION\" }, \"additionalConfig\": { \"description\": \"Send notification to tenant admins or customer users when a device, asset or customer is created\" }, \"templateName\": \"Entity action notification\", \"deliveryMethods\": [ \"WEB\" ] } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_rule_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRule body: + :return: NotificationRule + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_notification_rule_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_notification_rule_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_notification_rule_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save notification rule (saveNotificationRule) # noqa: E501 + + Creates or updates notification rule. Mandatory properties are `name`, `templateId` (of a template with `notificationType` matching to rule's `triggerType`), `triggerType`, `triggerConfig` and `recipientConfig`. Additionally, you may specify rule `description` inside of `additionalConfig`. Trigger type of the rule cannot be changed. Available trigger types for tenant: `ENTITY_ACTION`, `ALARM`, `ALARM_COMMENT`, `ALARM_ASSIGNMENT`, `DEVICE_ACTIVITY`, `RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT`. For sysadmin, there are following trigger types available: `ENTITIES_LIMIT`, `API_USAGE_LIMIT`, `NEW_PLATFORM_VERSION`. Here is an example of notification rule to send notification when a device, asset or customer is created or deleted: ```json { \"name\": \"Entity action\", \"templateId\": { \"entityType\": \"NOTIFICATION_TEMPLATE\", \"id\": \"32117320-d785-11ed-a06c-21dd57dd88ca\" }, \"triggerType\": \"ENTITY_ACTION\", \"triggerConfig\": { \"entityTypes\": [ \"CUSTOMER\", \"DEVICE\", \"ASSET\" ], \"created\": true, \"updated\": false, \"deleted\": true, \"triggerType\": \"ENTITY_ACTION\" }, \"recipientsConfig\": { \"targets\": [ \"320f2930-d785-11ed-a06c-21dd57dd88ca\" ], \"triggerType\": \"ENTITY_ACTION\" }, \"additionalConfig\": { \"description\": \"Send notification to tenant admins or customer users when a device, asset or customer is created\" }, \"templateName\": \"Entity action notification\", \"deliveryMethods\": [ \"WEB\" ] } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_rule_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRule body: + :return: NotificationRule + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_notification_rule_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/rule', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationRule', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_ce/notification_target_controller_api.py b/tb_rest_client/api/api_ce/notification_target_controller_api.py new file mode 100644 index 00000000..27d857e7 --- /dev/null +++ b/tb_rest_client/api/api_ce/notification_target_controller_api.py @@ -0,0 +1,762 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class NotificationTargetControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_notification_target_by_id_using_delete(self, id, **kwargs): # noqa: E501 + """Delete notification target by id (deleteNotificationTargetById) # noqa: E501 + + Deletes notification target by its id. This target cannot be referenced by existing scheduled notification requests or any notification rules. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_target_by_id_using_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_notification_target_by_id_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_notification_target_by_id_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_notification_target_by_id_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete notification target by id (deleteNotificationTargetById) # noqa: E501 + + Deletes notification target by its id. This target cannot be referenced by existing scheduled notification requests or any notification rules. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_target_by_id_using_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_notification_target_by_id_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_notification_target_by_id_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/target/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_target_by_id_using_get(self, id, **kwargs): # noqa: E501 + """Get notification target by id (getNotificationTargetById) # noqa: E501 + + Fetches notification target by id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_target_by_id_using_get(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_target_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_target_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_notification_target_by_id_using_get_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification target by id (getNotificationTargetById) # noqa: E501 + + Fetches notification target by id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_target_by_id_using_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_target_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_notification_target_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/target/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationTarget', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_targets_by_ids_using_get(self, ids, **kwargs): # noqa: E501 + """Get notification targets by ids (getNotificationTargetsByIds) # noqa: E501 + + Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_by_ids_using_get(ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ids: Comma-separated list of uuids representing targets ids (required) + :return: list[NotificationTarget] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_targets_by_ids_using_get_with_http_info(ids, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_targets_by_ids_using_get_with_http_info(ids, **kwargs) # noqa: E501 + return data + + def get_notification_targets_by_ids_using_get_with_http_info(self, ids, **kwargs): # noqa: E501 + """Get notification targets by ids (getNotificationTargetsByIds) # noqa: E501 + + Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_by_ids_using_get_with_http_info(ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ids: Comma-separated list of uuids representing targets ids (required) + :return: list[NotificationTarget] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ids'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_targets_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ids' is set + if ('ids' not in params or + params['ids'] is None): + raise ValueError("Missing the required parameter `ids` when calling `get_notification_targets_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/targets{?ids}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationTarget]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_targets_by_supported_notification_type_using_get(self, notification_type, page_size, page, **kwargs): # noqa: E501 + """Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) # noqa: E501 + + Returns the page of notification targets filtered by notification type that they can be used for. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_by_supported_notification_type_using_get(notification_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str notification_type: notificationType (required) + :param int page_size: pageSize (required) + :param int page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataNotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_targets_by_supported_notification_type_using_get_with_http_info(notification_type, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_targets_by_supported_notification_type_using_get_with_http_info(notification_type, page_size, page, **kwargs) # noqa: E501 + return data + + def get_notification_targets_by_supported_notification_type_using_get_with_http_info(self, notification_type, page_size, page, **kwargs): # noqa: E501 + """Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) # noqa: E501 + + Returns the page of notification targets filtered by notification type that they can be used for. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_by_supported_notification_type_using_get_with_http_info(notification_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str notification_type: notificationType (required) + :param int page_size: pageSize (required) + :param int page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataNotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['notification_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_targets_by_supported_notification_type_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'notification_type' is set + if ('notification_type' not in params or + params['notification_type'] is None): + raise ValueError("Missing the required parameter `notification_type` when calling `get_notification_targets_by_supported_notification_type_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notification_targets_by_supported_notification_type_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notification_targets_by_supported_notification_type_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'notification_type' in params: + query_params.append(('notificationType', params['notification_type'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/targets{?notificationType,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotificationTarget', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_targets_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get notification targets (getNotificationTargets) # noqa: E501 + + Returns the page of notification targets owned by sysadmin or tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filed based on the target's name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_targets_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_targets_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_notification_targets_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get notification targets (getNotificationTargets) # noqa: E501 + + Returns the page of notification targets owned by sysadmin or tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filed based on the target's name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_targets_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notification_targets_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notification_targets_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/targets{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotificationTarget', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_recipients_for_notification_target_config_using_post(self, page_size, page, **kwargs): # noqa: E501 + """Get recipients for notification target config (getRecipientsForNotificationTargetConfig) # noqa: E501 + + Returns the page of recipients for such notification target configuration. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_recipients_for_notification_target_config_using_post(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param NotificationTarget body: + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_recipients_for_notification_target_config_using_post_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_recipients_for_notification_target_config_using_post_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_recipients_for_notification_target_config_using_post_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get recipients for notification target config (getRecipientsForNotificationTargetConfig) # noqa: E501 + + Returns the page of recipients for such notification target configuration. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_recipients_for_notification_target_config_using_post_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param NotificationTarget body: + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_recipients_for_notification_target_config_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_recipients_for_notification_target_config_using_post`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_recipients_for_notification_target_config_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/target/recipients{?page,pageSize}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUser', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_notification_target_using_post(self, **kwargs): # noqa: E501 + """Save notification target (saveNotificationTarget) # noqa: E501 + + Creates or updates notification target. Available `configuration` types are `PLATFORM_USERS` and `SLACK`. For `PLATFORM_USERS` the `usersFilter` must be specified. For tenant, there are following users filter types available: `USER_LIST`, `CUSTOMER_USERS`, `TENANT_ADMINISTRATORS`, `ALL_USERS`, `ORIGINATOR_ENTITY_OWNER_USERS`, `AFFECTED_USER`. For sysadmin: `TENANT_ADMINISTRATORS`, `AFFECTED_TENANT_ADMINISTRATORS`, `SYSTEM_ADMINISTRATORS`, `ALL_USERS`. Here is an example of tenant-level notification target to send notification to customer's users: ```json { \"name\": \"Users of Customer A\", \"configuration\": { \"type\": \"PLATFORM_USERS\", \"usersFilter\": { \"type\": \"CUSTOMER_USERS\", \"customerId\": \"32499a20-d785-11ed-a06c-21dd57dd88ca\" }, \"description\": \"Users of Customer A\" } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_target_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationTarget body: + :return: NotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_notification_target_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_notification_target_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_notification_target_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save notification target (saveNotificationTarget) # noqa: E501 + + Creates or updates notification target. Available `configuration` types are `PLATFORM_USERS` and `SLACK`. For `PLATFORM_USERS` the `usersFilter` must be specified. For tenant, there are following users filter types available: `USER_LIST`, `CUSTOMER_USERS`, `TENANT_ADMINISTRATORS`, `ALL_USERS`, `ORIGINATOR_ENTITY_OWNER_USERS`, `AFFECTED_USER`. For sysadmin: `TENANT_ADMINISTRATORS`, `AFFECTED_TENANT_ADMINISTRATORS`, `SYSTEM_ADMINISTRATORS`, `ALL_USERS`. Here is an example of tenant-level notification target to send notification to customer's users: ```json { \"name\": \"Users of Customer A\", \"configuration\": { \"type\": \"PLATFORM_USERS\", \"usersFilter\": { \"type\": \"CUSTOMER_USERS\", \"customerId\": \"32499a20-d785-11ed-a06c-21dd57dd88ca\" }, \"description\": \"Users of Customer A\" } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_target_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationTarget body: + :return: NotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_notification_target_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/target', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationTarget', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_ce/notification_template_controller_api.py b/tb_rest_client/api/api_ce/notification_template_controller_api.py new file mode 100644 index 00000000..b8e5d85c --- /dev/null +++ b/tb_rest_client/api/api_ce/notification_template_controller_api.py @@ -0,0 +1,536 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class NotificationTemplateControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_notification_template_by_id_using_delete(self, id, **kwargs): # noqa: E501 + """Delete notification template by id (deleteNotificationTemplateById # noqa: E501 + + Deletes notification template by its id. This template cannot be referenced by existing scheduled notification requests or any notification rules. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_template_by_id_using_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_notification_template_by_id_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_notification_template_by_id_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_notification_template_by_id_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete notification template by id (deleteNotificationTemplateById # noqa: E501 + + Deletes notification template by its id. This template cannot be referenced by existing scheduled notification requests or any notification rules. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_template_by_id_using_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_notification_template_by_id_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_notification_template_by_id_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/template/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_template_by_id_using_get(self, id, **kwargs): # noqa: E501 + """Get notification template by id (getNotificationTemplateById) # noqa: E501 + + Fetches notification template by id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_template_by_id_using_get(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_template_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_template_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_notification_template_by_id_using_get_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification template by id (getNotificationTemplateById) # noqa: E501 + + Fetches notification template by id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_template_by_id_using_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_template_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_notification_template_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/template/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationTemplate', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_templates_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get notification templates (getNotificationTemplates) # noqa: E501 + + Returns the page of notification templates owned by sysadmin or tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_templates_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on template's name and notification type + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param str notification_types: Comma-separated list of notification types to filter the templates + :return: PageDataNotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_templates_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_templates_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_notification_templates_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get notification templates (getNotificationTemplates) # noqa: E501 + + Returns the page of notification templates owned by sysadmin or tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_templates_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on template's name and notification type + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param str notification_types: Comma-separated list of notification types to filter the templates + :return: PageDataNotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'notification_types'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_templates_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notification_templates_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notification_templates_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'notification_types' in params: + query_params.append(('notificationTypes', params['notification_types'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/templates{?notificationTypes,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotificationTemplate', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_slack_conversations_using_get(self, type, **kwargs): # noqa: E501 + """List Slack conversations (listSlackConversations) # noqa: E501 + + List available Slack conversations by type. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_slack_conversations_using_get(type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str type: type (required) + :param str token: Slack bot token. If absent - system Slack settings will be used + :return: list[SlackConversation] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_slack_conversations_using_get_with_http_info(type, **kwargs) # noqa: E501 + else: + (data) = self.list_slack_conversations_using_get_with_http_info(type, **kwargs) # noqa: E501 + return data + + def list_slack_conversations_using_get_with_http_info(self, type, **kwargs): # noqa: E501 + """List Slack conversations (listSlackConversations) # noqa: E501 + + List available Slack conversations by type. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_slack_conversations_using_get_with_http_info(type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str type: type (required) + :param str token: Slack bot token. If absent - system Slack settings will be used + :return: list[SlackConversation] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['type', 'token'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_slack_conversations_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'type' is set + if ('type' not in params or + params['type'] is None): + raise ValueError("Missing the required parameter `type` when calling `list_slack_conversations_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'token' in params: + query_params.append(('token', params['token'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/slack/conversations{?token,type}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SlackConversation]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_notification_template_using_post(self, **kwargs): # noqa: E501 + """Save notification template (saveNotificationTemplate) # noqa: E501 + + Creates or updates notification template. Here is an example of template to send notification via Web, SMS and Slack: ```json { \"name\": \"Greetings\", \"notificationType\": \"GENERAL\", \"configuration\": { \"deliveryMethodsTemplates\": { \"WEB\": { \"enabled\": true, \"subject\": \"Greetings\", \"body\": \"Hi there, ${recipientTitle}\", \"additionalConfig\": { \"icon\": { \"enabled\": true, \"icon\": \"back_hand\", \"color\": \"#757575\" }, \"actionButtonConfig\": { \"enabled\": false } }, \"method\": \"WEB\" }, \"SMS\": { \"enabled\": true, \"body\": \"Hi there, ${recipientTitle}\", \"method\": \"SMS\" }, \"SLACK\": { \"enabled\": true, \"body\": \"Hi there, @${recipientTitle}\", \"method\": \"SLACK\" } } } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_template_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationTemplate body: + :return: NotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_notification_template_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_notification_template_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_notification_template_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save notification template (saveNotificationTemplate) # noqa: E501 + + Creates or updates notification template. Here is an example of template to send notification via Web, SMS and Slack: ```json { \"name\": \"Greetings\", \"notificationType\": \"GENERAL\", \"configuration\": { \"deliveryMethodsTemplates\": { \"WEB\": { \"enabled\": true, \"subject\": \"Greetings\", \"body\": \"Hi there, ${recipientTitle}\", \"additionalConfig\": { \"icon\": { \"enabled\": true, \"icon\": \"back_hand\", \"color\": \"#757575\" }, \"actionButtonConfig\": { \"enabled\": false } }, \"method\": \"WEB\" }, \"SMS\": { \"enabled\": true, \"body\": \"Hi there, ${recipientTitle}\", \"method\": \"SMS\" }, \"SLACK\": { \"enabled\": true, \"body\": \"Hi there, @${recipientTitle}\", \"method\": \"SLACK\" } } } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_template_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationTemplate body: + :return: NotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_notification_template_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/template', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationTemplate', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_ce/o_auth_2_config_template_controller_api.py b/tb_rest_client/api/api_ce/o_auth_2_config_template_controller_api.py index afd70f6c..2da06dac 100644 --- a/tb_rest_client/api/api_ce/o_auth_2_config_template_controller_api.py +++ b/tb_rest_client/api/api_ce/o_auth_2_config_template_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_ce/o_auth_2_controller_api.py b/tb_rest_client/api/api_ce/o_auth_2_controller_api.py index 27b14b06..dee506c1 100644 --- a/tb_rest_client/api/api_ce/o_auth_2_controller_api.py +++ b/tb_rest_client/api/api_ce/o_auth_2_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_ce/ota_package_controller_api.py b/tb_rest_client/api/api_ce/ota_package_controller_api.py index 4a857d69..4db72e43 100644 --- a/tb_rest_client/api/api_ce/ota_package_controller_api.py +++ b/tb_rest_client/api/api_ce/ota_package_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -424,7 +424,7 @@ def get_ota_packages_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the ota package title. + :param str text_search: The case insensitive 'substring' filter based on the ota package title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataOtaPackageInfo @@ -450,7 +450,7 @@ def get_ota_packages_using_get_with_http_info(self, page_size, page, **kwargs): :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the ota package title. + :param str text_search: The case insensitive 'substring' filter based on the ota package title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataOtaPackageInfo @@ -541,7 +541,7 @@ def get_ota_packages_using_get1(self, device_profile_id, type, page_size, page, :param str type: OTA Package type. (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the ota package title. + :param str text_search: The case insensitive 'substring' filter based on the ota package title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataOtaPackageInfo @@ -569,7 +569,7 @@ def get_ota_packages_using_get1_with_http_info(self, device_profile_id, type, pa :param str type: OTA Package type. (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the ota package title. + :param str text_search: The case insensitive 'substring' filter based on the ota package title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataOtaPackageInfo @@ -683,7 +683,7 @@ def save_ota_package_data_using_post(self, ota_package_id, **kwargs): # noqa: E (data) = self.save_ota_package_data_using_post_with_http_info(ota_package_id, **kwargs) # noqa: E501 return data - def save_ota_package_data_using_post_with_http_info(self, checksum_algorithm, ota_package_id, **kwargs): # noqa: E501 + def save_ota_package_data_using_post_with_http_info(self, ota_package_id, **kwargs): # noqa: E501 """Save OTA Package data (saveOtaPackageData) # noqa: E501 Update the OTA Package. Adds the date to the existing OTA Package Info Available for users with 'TENANT_ADMIN' authority. # noqa: E501 diff --git a/tb_rest_client/api/api_ce/queue_controller_api.py b/tb_rest_client/api/api_ce/queue_controller_api.py index bf103744..b15c027e 100644 --- a/tb_rest_client/api/api_ce/queue_controller_api.py +++ b/tb_rest_client/api/api_ce/queue_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,45 +32,45 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def get_tenant_queues_by_service_type_using_get(self, service_type, **kwargs): # noqa: E501 - """Get queue names (getTenantQueuesByServiceType) # noqa: E501 + def delete_queue_using_delete(self, queue_id, **kwargs): # noqa: E501 + """Delete Queue (deleteQueue) # noqa: E501 - Returns a set of unique queue names based on service type. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Deletes the Queue. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tenant_queues_by_service_type_using_get(service_type, async_req=True) + >>> thread = api.delete_queue_using_delete(queue_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str service_type: Service type (implemented only for the TB-RULE-ENGINE) (required) - :return: list[str] + :param str queue_id: A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, **kwargs) # noqa: E501 + return self.delete_queue_using_delete_with_http_info(queue_id, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, **kwargs) # noqa: E501 + (data) = self.delete_queue_using_delete_with_http_info(queue_id, **kwargs) # noqa: E501 return data - def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_type, **kwargs): # noqa: E501 - """Get queue names (getTenantQueuesByServiceType) # noqa: E501 + def delete_queue_using_delete_with_http_info(self, queue_id, **kwargs): # noqa: E501 + """Delete Queue (deleteQueue) # noqa: E501 - Returns a set of unique queue names based on service type. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Deletes the Queue. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, async_req=True) + >>> thread = api.delete_queue_using_delete_with_http_info(queue_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str service_type: Service type (implemented only for the TB-RULE-ENGINE) (required) - :return: list[str] + :param str queue_id: A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['service_type'] # noqa: E501 + all_params = ['queue_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -81,22 +81,22 @@ def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_typ if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_tenant_queues_by_service_type_using_get" % key + " to method delete_queue_using_delete" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'service_type' is set - if ('service_type' not in params or - params['service_type'] is None): - raise ValueError("Missing the required parameter `service_type` when calling `get_tenant_queues_by_service_type_using_get`") # noqa: E501 + # verify the required parameter 'queue_id' is set + if ('queue_id' not in params or + params['queue_id'] is None): + raise ValueError("Missing the required parameter `queue_id` when calling `delete_queue_using_delete`") # noqa: E501 collection_formats = {} path_params = {} + if 'queue_id' in params: + path_params['queueId'] = params['queue_id'] # noqa: E501 query_params = [] - if 'service_type' in params: - query_params.append(('serviceType', params['service_type'])) # noqa: E501 header_params = {} @@ -112,31 +112,32 @@ def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_typ auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenant/queues{?serviceType}', 'GET', + '/api/queues/{queueId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[str]', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - + def get_queue_by_id_using_get(self, queue_id, **kwargs): # noqa: E501 - """getQueueById # noqa: E501 + """Get Queue (getQueueById) # noqa: E501 + Fetch the Queue object based on the provided Queue Id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_queue_by_id_using_get(queue_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str queue_id: queueId (required) + :param str queue_id: A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Queue If the method is called asynchronously, returns the request thread. @@ -147,17 +148,18 @@ def get_queue_by_id_using_get(self, queue_id, **kwargs): # noqa: E501 else: (data) = self.get_queue_by_id_using_get_with_http_info(queue_id, **kwargs) # noqa: E501 return data - + def get_queue_by_id_using_get_with_http_info(self, queue_id, **kwargs): # noqa: E501 - """getQueueById # noqa: E501 + """Get Queue (getQueueById) # noqa: E501 + Fetch the Queue object based on the provided Queue Id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_queue_by_id_using_get_with_http_info(queue_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str queue_id: queueId (required) + :param str queue_id: A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Queue If the method is called asynchronously, returns the request thread. @@ -219,44 +221,46 @@ def get_queue_by_id_using_get_with_http_info(self, queue_id, **kwargs): # noqa: _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def delete_queue_using_delete(self, queue_id, **kwargs): # noqa: E501 - """deleteQueue # noqa: E501 + def get_queue_by_name_using_get(self, queue_name, **kwargs): # noqa: E501 + """Get Queue (getQueueByName) # noqa: E501 + + Fetch the Queue object based on the provided Queue name. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_queue_using_delete(queue_id, async_req=True) + >>> thread = api.get_queue_by_name_using_get(queue_name, async_req=True) >>> result = thread.get() :param async_req bool - :param str queue_id: queueId (required) - :return: None + :param str queue_name: A string value representing the queue id. For example, 'Main' (required) + :return: Queue If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_queue_using_delete_with_http_info(queue_id, **kwargs) # noqa: E501 + return self.get_queue_by_name_using_get_with_http_info(queue_name, **kwargs) # noqa: E501 else: - (data) = self.delete_queue_using_delete_with_http_info(queue_id, **kwargs) # noqa: E501 + (data) = self.get_queue_by_name_using_get_with_http_info(queue_name, **kwargs) # noqa: E501 return data - - def delete_queue_using_delete_with_http_info(self, queue_id, **kwargs): # noqa: E501 - """deleteQueue # noqa: E501 + def get_queue_by_name_using_get_with_http_info(self, queue_name, **kwargs): # noqa: E501 + """Get Queue (getQueueByName) # noqa: E501 + + Fetch the Queue object based on the provided Queue name. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_queue_using_delete_with_http_info(queue_id, async_req=True) + >>> thread = api.get_queue_by_name_using_get_with_http_info(queue_name, async_req=True) >>> result = thread.get() :param async_req bool - :param str queue_id: queueId (required) - :return: None + :param str queue_name: A string value representing the queue id. For example, 'Main' (required) + :return: Queue If the method is called asynchronously, returns the request thread. """ - all_params = ['queue_id'] # noqa: E501 + all_params = ['queue_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -267,20 +271,20 @@ def delete_queue_using_delete_with_http_info(self, queue_id, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_queue_using_delete" % key + " to method get_queue_by_name_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'queue_id' is set - if ('queue_id' not in params or - params['queue_id'] is None): - raise ValueError("Missing the required parameter `queue_id` when calling `delete_queue_using_delete`") # noqa: E501 + # verify the required parameter 'queue_name' is set + if ('queue_name' not in params or + params['queue_name'] is None): + raise ValueError("Missing the required parameter `queue_name` when calling `get_queue_by_name_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'queue_id' in params: - path_params['queueId'] = params['queue_id'] # noqa: E501 + if 'queue_name' in params: + path_params['queueName'] = params['queue_name'] # noqa: E501 query_params = [] @@ -298,31 +302,155 @@ def delete_queue_using_delete_with_http_info(self, queue_id, **kwargs): # noqa: auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/queues/{queueId}', 'DELETE', + '/api/queues/name/{queueName}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='Queue', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_tenant_queues_by_service_type_using_get(self, service_type, page_size, page, **kwargs): # noqa: E501 + """Get Queues (getTenantQueuesByServiceType) # noqa: E501 + + Returns a page of queues registered in the platform. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_queues_by_service_type_using_get(service_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str service_type: Service type (implemented only for the TB-RULE-ENGINE) (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the queue name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataQueue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, page_size, page, **kwargs) # noqa: E501 + return data + + def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_type, page_size, page, **kwargs): # noqa: E501 + """Get Queues (getTenantQueuesByServiceType) # noqa: E501 + + Returns a page of queues registered in the platform. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str service_type: Service type (implemented only for the TB-RULE-ENGINE) (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the queue name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataQueue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['service_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_queues_by_service_type_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'service_type' is set + if ('service_type' not in params or + params['service_type'] is None): + raise ValueError("Missing the required parameter `service_type` when calling `get_tenant_queues_by_service_type_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_queues_by_service_type_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_tenant_queues_by_service_type_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'service_type' in params: + query_params.append(('serviceType', params['service_type'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/queues{?page,pageSize,serviceType,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataQueue', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - + def save_queue_using_post(self, service_type, **kwargs): # noqa: E501 - """saveQueue # noqa: E501 + """Create Or Update Queue (saveQueue) # noqa: E501 + Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error. Queue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_queue_using_post(service_type, async_req=True) >>> result = thread.get() :param async_req bool - :param str service_type: serviceType (required) + :param str service_type: Service type (implemented only for the TB-RULE-ENGINE) (required) :param Queue body: :return: Queue If the method is called asynchronously, @@ -334,17 +462,18 @@ def save_queue_using_post(self, service_type, **kwargs): # noqa: E501 else: (data) = self.save_queue_using_post_with_http_info(service_type, **kwargs) # noqa: E501 return data - + def save_queue_using_post_with_http_info(self, service_type, **kwargs): # noqa: E501 - """saveQueue # noqa: E501 + """Create Or Update Queue (saveQueue) # noqa: E501 + Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error. Queue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_queue_using_post_with_http_info(service_type, async_req=True) >>> result = thread.get() :param async_req bool - :param str service_type: serviceType (required) + :param str service_type: Service type (implemented only for the TB-RULE-ENGINE) (required) :param Queue body: :return: Queue If the method is called asynchronously, diff --git a/tb_rest_client/api/api_ce/rpc_v_1_controller_api.py b/tb_rest_client/api/api_ce/rpc_v_1_controller_api.py index 2c47d645..ea90b2b0 100644 --- a/tb_rest_client/api/api_ce/rpc_v_1_controller_api.py +++ b/tb_rest_client/api/api_ce/rpc_v_1_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_ce/rpc_v_2_controller_api.py b/tb_rest_client/api/api_ce/rpc_v_2_controller_api.py index b27ea7d1..51e0dc0c 100644 --- a/tb_rest_client/api/api_ce/rpc_v_2_controller_api.py +++ b/tb_rest_client/api/api_ce/rpc_v_2_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,101 +32,6 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def delete_resource_using_delete(self, rpc_id, **kwargs): # noqa: E501 - """Delete persistent RPC # noqa: E501 - - Deletes the persistent RPC request. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_using_delete(rpc_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rpc_id: A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_resource_using_delete_with_http_info(rpc_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_resource_using_delete_with_http_info(rpc_id, **kwargs) # noqa: E501 - return data - - def delete_resource_using_delete_with_http_info(self, rpc_id, **kwargs): # noqa: E501 - """Delete persistent RPC # noqa: E501 - - Deletes the persistent RPC request. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_using_delete_with_http_info(rpc_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rpc_id: A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['rpc_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_resource_using_delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'rpc_id' is set - if ('rpc_id' not in params or - params['rpc_id'] is None): - raise ValueError("Missing the required parameter `rpc_id` when calling `delete_resource_using_delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'rpc_id' in params: - path_params['rpcId'] = params['rpc_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/rpc/persistent/{rpcId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def delete_rpc_using_delete(self, rpc_id, **kwargs): # noqa: E501 """Delete persistent RPC # noqa: E501 @@ -204,7 +109,7 @@ def delete_rpc_using_delete_with_http_info(self, rpc_id, **kwargs): # noqa: E50 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/rpc/persistent/{rpcId}', 'DELETE', @@ -222,20 +127,20 @@ def delete_rpc_using_delete_with_http_info(self, rpc_id, **kwargs): # noqa: E50 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_persisted_rpc_by_device_using_get(self, device_id, page_size, page, rpc_status, **kwargs): # noqa: E501 + def get_persisted_rpc_by_device_using_get(self, device_id, page_size, page, **kwargs): # noqa: E501 """Get persistent RPC requests # noqa: E501 Allows to query RPC calls for specific device using pagination. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_persisted_rpc_by_device_using_get(device_id, page_size, page, rpc_status, async_req=True) + >>> thread = api.get_persisted_rpc_by_device_using_get(device_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str rpc_status: Status of the RPC (required) + :param str rpc_status: Status of the RPC :param str text_search: Not implemented. Leave empty. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) @@ -245,25 +150,25 @@ def get_persisted_rpc_by_device_using_get(self, device_id, page_size, page, rpc_ """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, rpc_status, **kwargs) # noqa: E501 + return self.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, rpc_status, **kwargs) # noqa: E501 + (data) = self.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, **kwargs) # noqa: E501 return data - def get_persisted_rpc_by_device_using_get_with_http_info(self, device_id, page_size, page, rpc_status, **kwargs): # noqa: E501 + def get_persisted_rpc_by_device_using_get_with_http_info(self, device_id, page_size, page, **kwargs): # noqa: E501 """Get persistent RPC requests # noqa: E501 Allows to query RPC calls for specific device using pagination. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, rpc_status, async_req=True) + >>> thread = api.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str rpc_status: Status of the RPC (required) + :param str rpc_status: Status of the RPC :param str text_search: Not implemented. Leave empty. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) @@ -299,10 +204,6 @@ def get_persisted_rpc_by_device_using_get_with_http_info(self, device_id, page_s if ('page' not in params or params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_persisted_rpc_by_device_using_get`") # noqa: E501 - # verify the required parameter 'rpc_status' is set - if ('rpc_status' not in params or - params['rpc_status'] is None): - raise ValueError("Missing the required parameter `rpc_status` when calling `get_persisted_rpc_by_device_using_get`") # noqa: E501 collection_formats = {} diff --git a/tb_rest_client/api/api_ce/rule_chain_controller_api.py b/tb_rest_client/api/api_ce/rule_chain_controller_api.py index cfd5d205..a8be8b5e 100644 --- a/tb_rest_client/api/api_ce/rule_chain_controller_api.py +++ b/tb_rest_client/api/api_ce/rule_chain_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -425,7 +425,7 @@ def get_edge_rule_chains_using_get(self, edge_id, page_size, page, **kwargs): # :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the rule chain name. + :param str text_search: The case insensitive 'substring' filter based on the rule chain name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataRuleChain @@ -452,7 +452,7 @@ def get_edge_rule_chains_using_get_with_http_info(self, edge_id, page_size, page :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the rule chain name. + :param str text_search: The case insensitive 'substring' filter based on the rule chain name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataRuleChain @@ -1023,7 +1023,7 @@ def get_rule_chains_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Rule chain type (CORE or EDGE) - :param str text_search: The case insensitive 'startsWith' filter based on the rule chain name. + :param str text_search: The case insensitive 'substring' filter based on the rule chain name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataRuleChain @@ -1050,7 +1050,7 @@ def get_rule_chains_using_get_with_http_info(self, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Rule chain type (CORE or EDGE) - :param str text_search: The case insensitive 'startsWith' filter based on the rule chain name. + :param str text_search: The case insensitive 'substring' filter based on the rule chain name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataRuleChain @@ -1228,6 +1228,93 @@ def import_rule_chains_using_post_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def is_tbel_enabled_using_get(self, **kwargs): # noqa: E501 + """Is TBEL script executor enabled # noqa: E501 + + Returns 'True' if the TBEL script execution is enabled Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.is_tbel_enabled_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: bool + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.is_tbel_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.is_tbel_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def is_tbel_enabled_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Is TBEL script executor enabled # noqa: E501 + + Returns 'True' if the TBEL script execution is enabled Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.is_tbel_enabled_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: bool + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method is_tbel_enabled_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/ruleChain/tbelEnabled', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='bool', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def save_rule_chain_meta_data_using_post(self, **kwargs): # noqa: E501 """Update Rule Chain Metadata # noqa: E501 @@ -1425,7 +1512,7 @@ def save_rule_chain_using_post_with_http_info(self, **kwargs): # noqa: E501 def save_rule_chain_using_post1(self, **kwargs): # noqa: E501 """Create Or Update Rule Chain (saveRuleChain) # noqa: E501 - Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_rule_chain_using_post1(async_req=True) @@ -1447,7 +1534,7 @@ def save_rule_chain_using_post1(self, **kwargs): # noqa: E501 def save_rule_chain_using_post1_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Rule Chain (saveRuleChain) # noqa: E501 - Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_rule_chain_using_post1_with_http_info(async_req=True) @@ -1803,9 +1890,9 @@ def set_root_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs) collection_formats=collection_formats) def test_script_using_post(self, **kwargs): # noqa: E501 - """Test JavaScript function # noqa: E501 + """Test Script function # noqa: E501 - Execute the JavaScript function and return the result. The format of request: ```json { \"script\": \"Your JS Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_script_using_post(async_req=True) @@ -1813,6 +1900,7 @@ def test_script_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param JsonNode body: + :param str script_lang: Script language: JS or TBEL :return: JsonNode If the method is called asynchronously, returns the request thread. @@ -1825,9 +1913,9 @@ def test_script_using_post(self, **kwargs): # noqa: E501 return data def test_script_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Test JavaScript function # noqa: E501 + """Test Script function # noqa: E501 - Execute the JavaScript function and return the result. The format of request: ```json { \"script\": \"Your JS Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_script_using_post_with_http_info(async_req=True) @@ -1835,12 +1923,13 @@ def test_script_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param JsonNode body: + :param str script_lang: Script language: JS or TBEL :return: JsonNode If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['body', 'script_lang'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1861,6 +1950,8 @@ def test_script_using_post_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'script_lang' in params: + query_params.append(('scriptLang', params['script_lang'])) # noqa: E501 header_params = {} @@ -1882,7 +1973,7 @@ def test_script_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/ruleChain/testScript', 'POST', + '/api/ruleChain/testScript{?scriptLang}', 'POST', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_ce/sign_up_controller_api.py b/tb_rest_client/api/api_ce/sign_up_controller_api.py deleted file mode 100644 index 650633d8..00000000 --- a/tb_rest_client/api/api_ce/sign_up_controller_api.py +++ /dev/null @@ -1,850 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.3.3-SNAPSHOT - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from tb_rest_client.api_client import ApiClient - - -class SignUpControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def accept_privacy_policy_using_post(self, **kwargs): # noqa: E501 - """acceptPrivacyPolicy # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.accept_privacy_policy_using_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: JsonNode - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.accept_privacy_policy_using_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.accept_privacy_policy_using_post_with_http_info(**kwargs) # noqa: E501 - return data - - def accept_privacy_policy_using_post_with_http_info(self, **kwargs): # noqa: E501 - """acceptPrivacyPolicy # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.accept_privacy_policy_using_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: JsonNode - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method accept_privacy_policy_using_post" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/signup/acceptPrivacyPolicy', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JsonNode', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def activate_email_using_get(self, email_code, **kwargs): # noqa: E501 - """activateEmail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_email_using_get(email_code, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str email_code: emailCode (required) - :param str pkg_name: pkgName - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.activate_email_using_get_with_http_info(email_code, **kwargs) # noqa: E501 - else: - (data) = self.activate_email_using_get_with_http_info(email_code, **kwargs) # noqa: E501 - return data - - def activate_email_using_get_with_http_info(self, email_code, **kwargs): # noqa: E501 - """activateEmail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_email_using_get_with_http_info(email_code, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str email_code: emailCode (required) - :param str pkg_name: pkgName - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['email_code', 'pkg_name'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method activate_email_using_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'email_code' is set - if ('email_code' not in params or - params['email_code'] is None): - raise ValueError("Missing the required parameter `email_code` when calling `activate_email_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'email_code' in params: - query_params.append(('emailCode', params['email_code'])) # noqa: E501 - if 'pkg_name' in params: - query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/noauth/activateEmail{?emailCode,pkgName}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def activate_user_by_email_code_using_post(self, email_code, **kwargs): # noqa: E501 - """activateUserByEmailCode # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_user_by_email_code_using_post(email_code, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str email_code: emailCode (required) - :param str pkg_name: pkgName - :return: JsonNode - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.activate_user_by_email_code_using_post_with_http_info(email_code, **kwargs) # noqa: E501 - else: - (data) = self.activate_user_by_email_code_using_post_with_http_info(email_code, **kwargs) # noqa: E501 - return data - - def activate_user_by_email_code_using_post_with_http_info(self, email_code, **kwargs): # noqa: E501 - """activateUserByEmailCode # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_user_by_email_code_using_post_with_http_info(email_code, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str email_code: emailCode (required) - :param str pkg_name: pkgName - :return: JsonNode - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['email_code', 'pkg_name'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method activate_user_by_email_code_using_post" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'email_code' is set - if ('email_code' not in params or - params['email_code'] is None): - raise ValueError("Missing the required parameter `email_code` when calling `activate_user_by_email_code_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'email_code' in params: - query_params.append(('emailCode', params['email_code'])) # noqa: E501 - if 'pkg_name' in params: - query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/noauth/activateByEmailCode{?emailCode,pkgName}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JsonNode', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_tenant_account_using_delete(self, **kwargs): # noqa: E501 - """deleteTenantAccount # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_tenant_account_using_delete(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_tenant_account_using_delete_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.delete_tenant_account_using_delete_with_http_info(**kwargs) # noqa: E501 - return data - - def delete_tenant_account_using_delete_with_http_info(self, **kwargs): # noqa: E501 - """deleteTenantAccount # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_tenant_account_using_delete_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_tenant_account_using_delete" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/signup/tenantAccount', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_recaptcha_public_key_using_get(self, **kwargs): # noqa: E501 - """getRecaptchaPublicKey # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_recaptcha_public_key_using_get(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_recaptcha_public_key_using_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_recaptcha_public_key_using_get_with_http_info(**kwargs) # noqa: E501 - return data - - def get_recaptcha_public_key_using_get_with_http_info(self, **kwargs): # noqa: E501 - """getRecaptchaPublicKey # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_recaptcha_public_key_using_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_recaptcha_public_key_using_get" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/noauth/signup/recaptchaPublicKey', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def mobile_login_using_get(self, pkg_name, **kwargs): # noqa: E501 - """mobileLogin # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.mobile_login_using_get(pkg_name, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str pkg_name: pkgName (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.mobile_login_using_get_with_http_info(pkg_name, **kwargs) # noqa: E501 - else: - (data) = self.mobile_login_using_get_with_http_info(pkg_name, **kwargs) # noqa: E501 - return data - - def mobile_login_using_get_with_http_info(self, pkg_name, **kwargs): # noqa: E501 - """mobileLogin # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.mobile_login_using_get_with_http_info(pkg_name, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str pkg_name: pkgName (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['pkg_name'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method mobile_login_using_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'pkg_name' is set - if ('pkg_name' not in params or - params['pkg_name'] is None): - raise ValueError("Missing the required parameter `pkg_name` when calling `mobile_login_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pkg_name' in params: - query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/noauth/login{?pkgName}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def privacy_policy_accepted_using_get(self, **kwargs): # noqa: E501 - """privacyPolicyAccepted # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.privacy_policy_accepted_using_get(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: bool - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.privacy_policy_accepted_using_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.privacy_policy_accepted_using_get_with_http_info(**kwargs) # noqa: E501 - return data - - def privacy_policy_accepted_using_get_with_http_info(self, **kwargs): # noqa: E501 - """privacyPolicyAccepted # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.privacy_policy_accepted_using_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: bool - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method privacy_policy_accepted_using_get" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/signup/privacyPolicyAccepted', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='bool', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def resend_email_activation_using_post(self, email, **kwargs): # noqa: E501 - """resendEmailActivation # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.resend_email_activation_using_post(email, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str email: email (required) - :param str pkg_name: pkgName - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.resend_email_activation_using_post_with_http_info(email, **kwargs) # noqa: E501 - else: - (data) = self.resend_email_activation_using_post_with_http_info(email, **kwargs) # noqa: E501 - return data - - def resend_email_activation_using_post_with_http_info(self, email, **kwargs): # noqa: E501 - """resendEmailActivation # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.resend_email_activation_using_post_with_http_info(email, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str email: email (required) - :param str pkg_name: pkgName - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['email', 'pkg_name'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method resend_email_activation_using_post" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'email' is set - if ('email' not in params or - params['email'] is None): - raise ValueError("Missing the required parameter `email` when calling `resend_email_activation_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'email' in params: - query_params.append(('email', params['email'])) # noqa: E501 - if 'pkg_name' in params: - query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/noauth/resendEmailActivation{?email,pkgName}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def sign_up_using_post(self, **kwargs): # noqa: E501 - """signUp # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.sign_up_using_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SignUpRequest body: - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.sign_up_using_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.sign_up_using_post_with_http_info(**kwargs) # noqa: E501 - return data - - def sign_up_using_post_with_http_info(self, **kwargs): # noqa: E501 - """signUp # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.sign_up_using_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SignUpRequest body: - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method sign_up_using_post" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/noauth/signup', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_ce/tb_resource_controller_api.py b/tb_rest_client/api/api_ce/tb_resource_controller_api.py index 83c06b5d..23091bf7 100644 --- a/tb_rest_client/api/api_ce/tb_resource_controller_api.py +++ b/tb_rest_client/api/api_ce/tb_resource_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,13 +32,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def delete_resource_using_delete1(self, resource_id, **kwargs): # noqa: E501 + def delete_resource_using_delete(self, resource_id, **kwargs): # noqa: E501 """Delete Resource (deleteResource) # noqa: E501 Deletes the Resource. Referencing non-existing Resource Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_using_delete1(resource_id, async_req=True) + >>> thread = api.delete_resource_using_delete(resource_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -49,18 +49,18 @@ def delete_resource_using_delete1(self, resource_id, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_resource_using_delete1_with_http_info(resource_id, **kwargs) # noqa: E501 + return self.delete_resource_using_delete_with_http_info(resource_id, **kwargs) # noqa: E501 else: - (data) = self.delete_resource_using_delete1_with_http_info(resource_id, **kwargs) # noqa: E501 + (data) = self.delete_resource_using_delete_with_http_info(resource_id, **kwargs) # noqa: E501 return data - def delete_resource_using_delete1_with_http_info(self, resource_id, **kwargs): # noqa: E501 + def delete_resource_using_delete_with_http_info(self, resource_id, **kwargs): # noqa: E501 """Delete Resource (deleteResource) # noqa: E501 Deletes the Resource. Referencing non-existing Resource Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_using_delete1_with_http_info(resource_id, async_req=True) + >>> thread = api.delete_resource_using_delete_with_http_info(resource_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -81,14 +81,14 @@ def delete_resource_using_delete1_with_http_info(self, resource_id, **kwargs): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_resource_using_delete1" % key + " to method delete_resource_using_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'resource_id' is set if ('resource_id' not in params or params['resource_id'] is None): - raise ValueError("Missing the required parameter `resource_id` when calling `delete_resource_using_delete1`") # noqa: E501 + raise ValueError("Missing the required parameter `resource_id` when calling `delete_resource_using_delete`") # noqa: E501 collection_formats = {} @@ -234,7 +234,7 @@ def get_lwm2m_list_objects_page_using_get(self, page_size, page, **kwargs): # n :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the resource title. + :param str text_search: The case insensitive 'substring' filter based on the resource title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: list[LwM2mObject] @@ -260,7 +260,7 @@ def get_lwm2m_list_objects_page_using_get_with_http_info(self, page_size, page, :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the resource title. + :param str text_search: The case insensitive 'substring' filter based on the resource title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: list[LwM2mObject] @@ -650,7 +650,7 @@ def get_resources_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the resource title. + :param str text_search: The case insensitive 'substring' filter based on the resource title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTbResourceInfo @@ -676,7 +676,7 @@ def get_resources_using_get_with_http_info(self, page_size, page, **kwargs): # :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the resource title. + :param str text_search: The case insensitive 'substring' filter based on the resource title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTbResourceInfo @@ -756,7 +756,7 @@ def get_resources_using_get_with_http_info(self, page_size, page, **kwargs): # def save_resource_using_post(self, **kwargs): # noqa: E501 """Create Or Update Resource (saveResource) # noqa: E501 - Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. Resource combination of the title with the key is unique in the scope of tenant. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. Resource combination of the title with the key is unique in the scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Resource entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_resource_using_post(async_req=True) @@ -778,7 +778,7 @@ def save_resource_using_post(self, **kwargs): # noqa: E501 def save_resource_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Resource (saveResource) # noqa: E501 - Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. Resource combination of the title with the key is unique in the scope of tenant. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. Resource combination of the title with the key is unique in the scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Resource entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_resource_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_ce/telemetry_controller_api.py b/tb_rest_client/api/api_ce/telemetry_controller_api.py index bbd93d8a..cd4c48a8 100644 --- a/tb_rest_client/api/api_ce/telemetry_controller_api.py +++ b/tb_rest_client/api/api_ce/telemetry_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -606,7 +606,7 @@ def get_attribute_keys_using_get_with_http_info(self, entity_type, entity_id, ** def get_attributes_by_scope_using_get(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Get attributes by scope (getAttributesByScope) # noqa: E501 - Returns all attributes of a specified scope that belong to specified entity. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. Use optional 'keys' parameter to return specific attributes. Example of the result: ```json [ {\"key\": \"stringAttributeKey\", \"value\": \"value\", \"lastUpdateTs\": 1609459200000}, {\"key\": \"booleanAttributeKey\", \"value\": false, \"lastUpdateTs\": 1609459200001}, {\"key\": \"doubleAttributeKey\", \"value\": 42.2, \"lastUpdateTs\": 1609459200002}, {\"key\": \"longKeyExample\", \"value\": 73, \"lastUpdateTs\": 1609459200003}, {\"key\": \"jsonKeyExample\", \"value\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} }, \"lastUpdateTs\": 1609459200004 } ] ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Returns all attributes of a specified scope that belong to specified entity. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices; * CLIENT_SCOPE - supported for devices. Use optional 'keys' parameter to return specific attributes. Example of the result: ```json [ {\"key\": \"stringAttributeKey\", \"value\": \"value\", \"lastUpdateTs\": 1609459200000}, {\"key\": \"booleanAttributeKey\", \"value\": false, \"lastUpdateTs\": 1609459200001}, {\"key\": \"doubleAttributeKey\", \"value\": 42.2, \"lastUpdateTs\": 1609459200002}, {\"key\": \"longKeyExample\", \"value\": 73, \"lastUpdateTs\": 1609459200003}, {\"key\": \"jsonKeyExample\", \"value\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} }, \"lastUpdateTs\": 1609459200004 } ] ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attributes_by_scope_using_get(entity_type, entity_id, scope, async_req=True) @@ -631,7 +631,7 @@ def get_attributes_by_scope_using_get(self, entity_type, entity_id, scope, **kwa def get_attributes_by_scope_using_get_with_http_info(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Get attributes by scope (getAttributesByScope) # noqa: E501 - Returns all attributes of a specified scope that belong to specified entity. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. Use optional 'keys' parameter to return specific attributes. Example of the result: ```json [ {\"key\": \"stringAttributeKey\", \"value\": \"value\", \"lastUpdateTs\": 1609459200000}, {\"key\": \"booleanAttributeKey\", \"value\": false, \"lastUpdateTs\": 1609459200001}, {\"key\": \"doubleAttributeKey\", \"value\": 42.2, \"lastUpdateTs\": 1609459200002}, {\"key\": \"longKeyExample\", \"value\": 73, \"lastUpdateTs\": 1609459200003}, {\"key\": \"jsonKeyExample\", \"value\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} }, \"lastUpdateTs\": 1609459200004 } ] ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Returns all attributes of a specified scope that belong to specified entity. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices; * CLIENT_SCOPE - supported for devices. Use optional 'keys' parameter to return specific attributes. Example of the result: ```json [ {\"key\": \"stringAttributeKey\", \"value\": \"value\", \"lastUpdateTs\": 1609459200000}, {\"key\": \"booleanAttributeKey\", \"value\": false, \"lastUpdateTs\": 1609459200001}, {\"key\": \"doubleAttributeKey\", \"value\": 42.2, \"lastUpdateTs\": 1609459200002}, {\"key\": \"longKeyExample\", \"value\": 73, \"lastUpdateTs\": 1609459200003}, {\"key\": \"jsonKeyExample\", \"value\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} }, \"lastUpdateTs\": 1609459200004 } ] ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attributes_by_scope_using_get_with_http_info(entity_type, entity_id, scope, async_req=True) @@ -1300,7 +1300,7 @@ def save_device_attributes_using_post_with_http_info(self, device_id, scope, **k def save_entity_attributes_v1_using_post(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Save entity attributes (saveEntityAttributesV1) # noqa: E501 - Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_attributes_v1_using_post(entity_type, entity_id, scope, async_req=True) @@ -1325,7 +1325,7 @@ def save_entity_attributes_v1_using_post(self, entity_type, entity_id, scope, ** def save_entity_attributes_v1_using_post_with_http_info(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Save entity attributes (saveEntityAttributesV1) # noqa: E501 - Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_attributes_v1_using_post_with_http_info(entity_type, entity_id, scope, async_req=True) @@ -1419,7 +1419,7 @@ def save_entity_attributes_v1_using_post_with_http_info(self, entity_type, entit def save_entity_attributes_v2_using_post(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Save entity attributes (saveEntityAttributesV2) # noqa: E501 - Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_attributes_v2_using_post(entity_type, entity_id, scope, async_req=True) @@ -1444,7 +1444,7 @@ def save_entity_attributes_v2_using_post(self, entity_type, entity_id, scope, ** def save_entity_attributes_v2_using_post_with_http_info(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Save entity attributes (saveEntityAttributesV2) # noqa: E501 - Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_attributes_v2_using_post_with_http_info(entity_type, entity_id, scope, async_req=True) @@ -1667,7 +1667,7 @@ def save_entity_telemetry_with_ttl_using_post(self, entity_type, entity_id, scop :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str scope: Value is deprecated, reserved for backward compatibility and not used in the API call implementation. Specify any scope for compatibility (required) - :param str ttl: A long value representing TTL (Time to Live) parameter. (required) + :param int ttl: A long value representing TTL (Time to Live) parameter. (required) :param str body: :return: DeferredResultResponseEntity If the method is called asynchronously, diff --git a/tb_rest_client/api/api_ce/tenant_controller_api.py b/tb_rest_client/api/api_ce/tenant_controller_api.py index 8e8e151d..0c05b023 100644 --- a/tb_rest_client/api/api_ce/tenant_controller_api.py +++ b/tb_rest_client/api/api_ce/tenant_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -329,7 +329,7 @@ def get_tenant_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant name. + :param str text_search: The case insensitive 'substring' filter based on the tenant name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenantInfo @@ -355,7 +355,7 @@ def get_tenant_infos_using_get_with_http_info(self, page_size, page, **kwargs): :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant name. + :param str text_search: The case insensitive 'substring' filter based on the tenant name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenantInfo @@ -444,7 +444,7 @@ def get_tenants_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant name. + :param str text_search: The case insensitive 'substring' filter based on the tenant name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenant @@ -470,7 +470,7 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant name. + :param str text_search: The case insensitive 'substring' filter based on the tenant name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenant @@ -550,7 +550,7 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no def save_tenant_using_post(self, **kwargs): # noqa: E501 """Create Or update Tenant (saveTenant) # noqa: E501 - Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Default Rule Chain and Device profile are also generated for the new tenants automatically. The newly created Tenant Id will be present in the response. Specify existing Tenant Id id to update the Tenant. Referencing non-existing Tenant Id will cause 'Not Found' error. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Default Rule Chain and Device profile are also generated for the new tenants automatically. The newly created Tenant Id will be present in the response. Specify existing Tenant Id id to update the Tenant. Referencing non-existing Tenant Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Tenant entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_tenant_using_post(async_req=True) @@ -572,7 +572,7 @@ def save_tenant_using_post(self, **kwargs): # noqa: E501 def save_tenant_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or update Tenant (saveTenant) # noqa: E501 - Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Default Rule Chain and Device profile are also generated for the new tenants automatically. The newly created Tenant Id will be present in the response. Specify existing Tenant Id id to update the Tenant. Referencing non-existing Tenant Id will cause 'Not Found' error. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Default Rule Chain and Device profile are also generated for the new tenants automatically. The newly created Tenant Id will be present in the response. Specify existing Tenant Id id to update the Tenant. Referencing non-existing Tenant Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Tenant entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_tenant_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_ce/tenant_profile_controller_api.py b/tb_rest_client/api/api_ce/tenant_profile_controller_api.py index 2d35203f..a5355fad 100644 --- a/tb_rest_client/api/api_ce/tenant_profile_controller_api.py +++ b/tb_rest_client/api/api_ce/tenant_profile_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -416,7 +416,7 @@ def get_tenant_profile_infos_using_get(self, page_size, page, **kwargs): # noqa :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant profile name. + :param str text_search: The case insensitive 'substring' filter based on the tenant profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityInfo @@ -442,7 +442,7 @@ def get_tenant_profile_infos_using_get_with_http_info(self, page_size, page, **k :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant profile name. + :param str text_search: The case insensitive 'substring' filter based on the tenant profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityInfo @@ -519,6 +519,99 @@ def get_tenant_profile_infos_using_get_with_http_info(self, page_size, page, **k _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_tenant_profiles_by_ids_using_get(self, ids, **kwargs): # noqa: E501 + """getTenantProfilesByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_profiles_by_ids_using_get(ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ids: ids (required) + :return: list[TenantProfile] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_tenant_profiles_by_ids_using_get_with_http_info(ids, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_profiles_by_ids_using_get_with_http_info(ids, **kwargs) # noqa: E501 + return data + + def get_tenant_profiles_by_ids_using_get_with_http_info(self, ids, **kwargs): # noqa: E501 + """getTenantProfilesByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_profiles_by_ids_using_get_with_http_info(ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ids: ids (required) + :return: list[TenantProfile] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ids'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_profiles_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ids' is set + if ('ids' not in params or + params['ids'] is None): + raise ValueError("Missing the required parameter `ids` when calling `get_tenant_profiles_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenantProfiles{?ids}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TenantProfile]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_tenant_profiles_using_get(self, page_size, page, **kwargs): # noqa: E501 """Get Tenant Profiles (getTenantProfiles) # noqa: E501 @@ -531,7 +624,7 @@ def get_tenant_profiles_using_get(self, page_size, page, **kwargs): # noqa: E50 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant profile name. + :param str text_search: The case insensitive 'substring' filter based on the tenant profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenantProfile @@ -557,7 +650,7 @@ def get_tenant_profiles_using_get_with_http_info(self, page_size, page, **kwargs :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant profile name. + :param str text_search: The case insensitive 'substring' filter based on the tenant profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenantProfile @@ -637,7 +730,7 @@ def get_tenant_profiles_using_get_with_http_info(self, page_size, page, **kwargs def save_tenant_profile_using_post(self, **kwargs): # noqa: E501 """Create Or update Tenant Profile (saveTenantProfile) # noqa: E501 - Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Tenant Profile Id will be present in the response. Specify existing Tenant Profile Id id to update the Tenant Profile. Referencing non-existing Tenant Profile Id will cause 'Not Found' error. Update of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. The **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. You have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. Let's review the example of tenant profile data below: ```json { \"name\": \"Default\", \"description\": \"Default tenant profile\", \"isolatedTbCore\": false, \"isolatedTbRuleEngine\": false, \"profileData\": { \"configuration\": { \"type\": \"DEFAULT\", \"maxDevices\": 0, \"maxAssets\": 0, \"maxCustomers\": 0, \"maxUsers\": 0, \"maxDashboards\": 0, \"maxRuleChains\": 0, \"maxResourcesInBytes\": 0, \"maxOtaPackagesInBytes\": 0, \"transportTenantMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\", \"transportDeviceMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\", \"maxTransportMessages\": 10000000, \"maxTransportDataPoints\": 10000000, \"maxREExecutions\": 4000000, \"maxJSExecutions\": 5000000, \"maxDPStorageDays\": 0, \"maxRuleNodeExecutionsPerMessage\": 50, \"maxEmails\": 0, \"maxSms\": 0, \"maxCreatedAlarms\": 1000, \"defaultStorageTtlDays\": 0, \"alarmsTtlDays\": 0, \"rpcTtlDays\": 0, \"warnThreshold\": 0 } }, \"default\": true } ``` Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Tenant Profile Id will be present in the response. Specify existing Tenant Profile Id id to update the Tenant Profile. Referencing non-existing Tenant Profile Id will cause 'Not Found' error. Update of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. The **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. You have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. Let's review the example of tenant profile data below: ```json { \"name\": \"Default\", \"description\": \"Default tenant profile\", \"isolatedTbRuleEngine\": false, \"profileData\": { \"configuration\": { \"type\": \"DEFAULT\", \"maxDevices\": 0, \"maxAssets\": 0, \"maxCustomers\": 0, \"maxUsers\": 0, \"maxDashboards\": 0, \"maxRuleChains\": 0, \"maxResourcesInBytes\": 0, \"maxOtaPackagesInBytes\": 0, \"transportTenantMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\", \"transportDeviceMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\", \"maxTransportMessages\": 10000000, \"maxTransportDataPoints\": 10000000, \"maxREExecutions\": 4000000, \"maxJSExecutions\": 5000000, \"maxDPStorageDays\": 0, \"maxRuleNodeExecutionsPerMessage\": 50, \"maxEmails\": 0, \"maxSms\": 0, \"maxCreatedAlarms\": 1000, \"defaultStorageTtlDays\": 0, \"alarmsTtlDays\": 0, \"rpcTtlDays\": 0, \"warnThreshold\": 0 } }, \"default\": true } ```Remove 'id', from the request body example (below) to create new Tenant Profile entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_tenant_profile_using_post(async_req=True) @@ -659,7 +752,7 @@ def save_tenant_profile_using_post(self, **kwargs): # noqa: E501 def save_tenant_profile_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or update Tenant Profile (saveTenantProfile) # noqa: E501 - Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Tenant Profile Id will be present in the response. Specify existing Tenant Profile Id id to update the Tenant Profile. Referencing non-existing Tenant Profile Id will cause 'Not Found' error. Update of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. The **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. You have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. Let's review the example of tenant profile data below: ```json { \"name\": \"Default\", \"description\": \"Default tenant profile\", \"isolatedTbCore\": false, \"isolatedTbRuleEngine\": false, \"profileData\": { \"configuration\": { \"type\": \"DEFAULT\", \"maxDevices\": 0, \"maxAssets\": 0, \"maxCustomers\": 0, \"maxUsers\": 0, \"maxDashboards\": 0, \"maxRuleChains\": 0, \"maxResourcesInBytes\": 0, \"maxOtaPackagesInBytes\": 0, \"transportTenantMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\", \"transportDeviceMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\", \"maxTransportMessages\": 10000000, \"maxTransportDataPoints\": 10000000, \"maxREExecutions\": 4000000, \"maxJSExecutions\": 5000000, \"maxDPStorageDays\": 0, \"maxRuleNodeExecutionsPerMessage\": 50, \"maxEmails\": 0, \"maxSms\": 0, \"maxCreatedAlarms\": 1000, \"defaultStorageTtlDays\": 0, \"alarmsTtlDays\": 0, \"rpcTtlDays\": 0, \"warnThreshold\": 0 } }, \"default\": true } ``` Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Tenant Profile Id will be present in the response. Specify existing Tenant Profile Id id to update the Tenant Profile. Referencing non-existing Tenant Profile Id will cause 'Not Found' error. Update of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. The **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. You have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. Let's review the example of tenant profile data below: ```json { \"name\": \"Default\", \"description\": \"Default tenant profile\", \"isolatedTbRuleEngine\": false, \"profileData\": { \"configuration\": { \"type\": \"DEFAULT\", \"maxDevices\": 0, \"maxAssets\": 0, \"maxCustomers\": 0, \"maxUsers\": 0, \"maxDashboards\": 0, \"maxRuleChains\": 0, \"maxResourcesInBytes\": 0, \"maxOtaPackagesInBytes\": 0, \"transportTenantMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\", \"transportDeviceMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\", \"maxTransportMessages\": 10000000, \"maxTransportDataPoints\": 10000000, \"maxREExecutions\": 4000000, \"maxJSExecutions\": 5000000, \"maxDPStorageDays\": 0, \"maxRuleNodeExecutionsPerMessage\": 50, \"maxEmails\": 0, \"maxSms\": 0, \"maxCreatedAlarms\": 1000, \"defaultStorageTtlDays\": 0, \"alarmsTtlDays\": 0, \"rpcTtlDays\": 0, \"warnThreshold\": 0 } }, \"default\": true } ```Remove 'id', from the request body example (below) to create new Tenant Profile entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_tenant_profile_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_ce/two_fa_config_controller_api.py b/tb_rest_client/api/api_ce/two_factor_auth_config_controller_api.py similarity index 99% rename from tb_rest_client/api/api_ce/two_fa_config_controller_api.py rename to tb_rest_client/api/api_ce/two_factor_auth_config_controller_api.py index 1dbb5791..366ec4f5 100644 --- a/tb_rest_client/api/api_ce/two_fa_config_controller_api.py +++ b/tb_rest_client/api/api_ce/two_factor_auth_config_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -20,7 +20,7 @@ from tb_rest_client.api_client import ApiClient -class TwoFaConfigControllerApi(object): +class TwoFactorAuthConfigControllerApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. diff --git a/tb_rest_client/api/api_ce/two_factor_auth_controller_api.py b/tb_rest_client/api/api_ce/two_factor_auth_controller_api.py index f9e272e4..088fbba8 100644 --- a/tb_rest_client/api/api_ce/two_factor_auth_controller_api.py +++ b/tb_rest_client/api/api_ce/two_factor_auth_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -44,7 +44,7 @@ def check_two_fa_verification_code_using_post(self, provider_type, verification_ :param async_req bool :param str provider_type: providerType (required) :param str verification_code: verificationCode (required) - :return: JWTTokenPair + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -67,7 +67,7 @@ def check_two_fa_verification_code_using_post_with_http_info(self, provider_type :param async_req bool :param str provider_type: providerType (required) :param str verification_code: verificationCode (required) - :return: JWTTokenPair + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -127,7 +127,7 @@ def check_two_fa_verification_code_using_post_with_http_info(self, provider_type body=body_params, post_params=form_params, files=local_var_files, - response_type='JWTTokenPair', # noqa: E501 + response_type='JWTPair', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_ce/ui_settings_controller_api.py b/tb_rest_client/api/api_ce/ui_settings_controller_api.py index fcf97e26..b0212929 100644 --- a/tb_rest_client/api/api_ce/ui_settings_controller_api.py +++ b/tb_rest_client/api/api_ce/ui_settings_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_ce/usage_info_controller_api.py b/tb_rest_client/api/api_ce/usage_info_controller_api.py new file mode 100644 index 00000000..b863ca20 --- /dev/null +++ b/tb_rest_client/api/api_ce/usage_info_controller_api.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class UsageInfoControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_tenant_usage_info_using_get(self, **kwargs): # noqa: E501 + """getTenantUsageInfo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_usage_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: UsageInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_tenant_usage_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_tenant_usage_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_tenant_usage_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getTenantUsageInfo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_usage_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: UsageInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_usage_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/usage', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UsageInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_ce/user_controller_api.py b/tb_rest_client/api/api_ce/user_controller_api.py index 7a5e605d..6569845c 100644 --- a/tb_rest_client/api/api_ce/user_controller_api.py +++ b/tb_rest_client/api/api_ce/user_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,6 +32,204 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def delete_user_settings_using_delete(self, paths, type, **kwargs): # noqa: E501 + """Delete user settings (deleteUserSettings) # noqa: E501 + + Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_settings_using_delete(paths, type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str paths: paths (required) + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_user_settings_using_delete_with_http_info(paths, type, **kwargs) # noqa: E501 + else: + (data) = self.delete_user_settings_using_delete_with_http_info(paths, type, **kwargs) # noqa: E501 + return data + + def delete_user_settings_using_delete_with_http_info(self, paths, type, **kwargs): # noqa: E501 + """Delete user settings (deleteUserSettings) # noqa: E501 + + Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_settings_using_delete_with_http_info(paths, type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str paths: paths (required) + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['paths', 'type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_user_settings_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'paths' is set + if ('paths' not in params or + params['paths'] is None): + raise ValueError("Missing the required parameter `paths` when calling `delete_user_settings_using_delete`") # noqa: E501 + # verify the required parameter 'type' is set + if ('type' not in params or + params['type'] is None): + raise ValueError("Missing the required parameter `type` when calling `delete_user_settings_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'paths' in params: + path_params['paths'] = params['paths'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/settings/{type}/{paths}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_user_settings_using_delete1(self, paths, **kwargs): # noqa: E501 + """Delete user settings (deleteUserSettings) # noqa: E501 + + Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_settings_using_delete1(paths, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str paths: paths (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_user_settings_using_delete1_with_http_info(paths, **kwargs) # noqa: E501 + else: + (data) = self.delete_user_settings_using_delete1_with_http_info(paths, **kwargs) # noqa: E501 + return data + + def delete_user_settings_using_delete1_with_http_info(self, paths, **kwargs): # noqa: E501 + """Delete user settings (deleteUserSettings) # noqa: E501 + + Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_settings_using_delete1_with_http_info(paths, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str paths: paths (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['paths'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_user_settings_using_delete1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'paths' is set + if ('paths' not in params or + params['paths'] is None): + raise ValueError("Missing the required parameter `paths` when calling `delete_user_settings_using_delete1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'paths' in params: + path_params['paths'] = params['paths'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/settings/{paths}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def delete_user_using_delete(self, user_id, **kwargs): # noqa: E501 """Delete User (deleteUser) # noqa: E501 @@ -127,6 +325,121 @@ def delete_user_using_delete_with_http_info(self, user_id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def find_users_by_query_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Find users by query (findUsersByQuery) # noqa: E501 + + Returns page of user data objects. Search is been executed by email, firstName and lastName fields. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_users_by_query_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUserEmailInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_users_by_query_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.find_users_by_query_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def find_users_by_query_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Find users by query (findUsersByQuery) # noqa: E501 + + Returns page of user data objects. Search is been executed by email, firstName and lastName fields. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_users_by_query_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUserEmailInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method find_users_by_query_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `find_users_by_query_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `find_users_by_query_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/users/info{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUserEmailInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_activation_link_using_get(self, user_id, **kwargs): # noqa: E501 """Get the activation link (getActivationLink) # noqa: E501 @@ -200,7 +513,8 @@ def get_activation_link_using_get_with_http_info(self, user_id, **kwargs): # no body_params = None # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept(['text/plain']) # noqa: E501 + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain', 'application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 @@ -234,7 +548,7 @@ def get_customer_users_using_get(self, customer_id, page_size, page, **kwargs): :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. + :param str text_search: The case insensitive 'substring' filter based on the user email. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataUser @@ -261,7 +575,7 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. + :param str text_search: The case insensitive 'substring' filter based on the user email. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataUser @@ -357,7 +671,7 @@ def get_tenant_admins_using_get(self, tenant_id, page_size, page, **kwargs): # :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. + :param str text_search: The case insensitive 'substring' filter based on the user email. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataUser @@ -384,7 +698,7 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. + :param str text_search: The case insensitive 'substring' filter based on the user email. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataUser @@ -562,45 +876,645 @@ def get_user_by_id_using_get_with_http_info(self, user_id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_user_token_using_get(self, user_id, **kwargs): # noqa: E501 - """Get User Token (getUserToken) # noqa: E501 + def get_user_dashboards_info_using_get(self, **kwargs): # noqa: E501 + """Get information about last visited and starred dashboards (getLastVisitedDashboards) # noqa: E501 - Returns the token of the User based on the provided User Id. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant. # noqa: E501 + Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_token_using_get(user_id, async_req=True) + >>> thread = api.get_user_dashboards_info_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: JWTPair + :return: UserDashboardsInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_user_token_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + return self.get_user_dashboards_info_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_user_token_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + (data) = self.get_user_dashboards_info_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Get User Token (getUserToken) # noqa: E501 + def get_user_dashboards_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get information about last visited and starred dashboards (getLastVisitedDashboards) # noqa: E501 - Returns the token of the User based on the provided User Id. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant. # noqa: E501 + Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_dashboards_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: UserDashboardsInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_dashboards_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/dashboards', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserDashboardsInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_settings_using_get(self, **kwargs): # noqa: E501 + """Get user settings (getUserSettings) # noqa: E501 + + Fetch the User settings based on authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_settings_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: JsonNode + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_settings_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_user_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_user_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get user settings (getUserSettings) # noqa: E501 + + Fetch the User settings based on authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_settings_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: JsonNode + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_settings_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JsonNode', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_settings_using_get1(self, type, **kwargs): # noqa: E501 + """Get user settings (getUserSettings) # noqa: E501 + + Fetch the User settings based on authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_settings_using_get1(type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) + :return: JsonNode + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_settings_using_get1_with_http_info(type, **kwargs) # noqa: E501 + else: + (data) = self.get_user_settings_using_get1_with_http_info(type, **kwargs) # noqa: E501 + return data + + def get_user_settings_using_get1_with_http_info(self, type, **kwargs): # noqa: E501 + """Get user settings (getUserSettings) # noqa: E501 + + Fetch the User settings based on authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_settings_using_get1_with_http_info(type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) + :return: JsonNode + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_settings_using_get1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'type' is set + if ('type' not in params or + params['type'] is None): + raise ValueError("Missing the required parameter `type` when calling `get_user_settings_using_get1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/settings/{type}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JsonNode', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_token_using_get(self, user_id, **kwargs): # noqa: E501 + """Get User Token (getUserToken) # noqa: E501 + + Returns the token of the User based on the provided User Id. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_token_using_get(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: JWTPair + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_token_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + else: + (data) = self.get_user_token_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + return data + + def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Get User Token (getUserToken) # noqa: E501 + + Returns the token of the User based on the provided User Id. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_token_using_get_with_http_info(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: JWTPair + :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: JWTPair + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_token_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'user_id' is set + if ('user_id' not in params or + params['user_id'] is None): + raise ValueError("Missing the required parameter `user_id` when calling `get_user_token_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in params: + path_params['userId'] = params['user_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/{userId}/token', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JWTPair', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_users_for_assign_using_get(self, alarm_id, page_size, page, **kwargs): # noqa: E501 + """Get usersForAssign (getUsersForAssign) # noqa: E501 + + Returns page of user data objects that can be assigned to provided alarmId. Search is been executed by email, firstName and lastName fields. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_users_for_assign_using_get(alarm_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUserEmailInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_users_for_assign_using_get_with_http_info(alarm_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_users_for_assign_using_get_with_http_info(alarm_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_users_for_assign_using_get_with_http_info(self, alarm_id, page_size, page, **kwargs): # noqa: E501 + """Get usersForAssign (getUsersForAssign) # noqa: E501 + + Returns page of user data objects that can be assigned to provided alarmId. Search is been executed by email, firstName and lastName fields. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_users_for_assign_using_get_with_http_info(alarm_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUserEmailInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['alarm_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_users_for_assign_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'alarm_id' is set + if ('alarm_id' not in params or + params['alarm_id'] is None): + raise ValueError("Missing the required parameter `alarm_id` when calling `get_users_for_assign_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_users_for_assign_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_users_for_assign_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alarm_id' in params: + path_params['alarmId'] = params['alarm_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/users/assign/{alarmId}{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUserEmailInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_users_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get Users (getUsers) # noqa: E501 + + Returns a page of users owned by tenant or customer. The scope depends on authority of the user that performs the request.You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_users_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_users_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get Users (getUsers) # noqa: E501 + + Returns a page of users owned by tenant or customer. The scope depends on authority of the user that performs the request.You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_users_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_users_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_users_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_users_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUser', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def is_user_token_access_enabled_using_get(self, **kwargs): # noqa: E501 + """Check Token Access Enabled (isUserTokenAccessEnabled) # noqa: E501 + + Checks that the system is configured to allow administrators to impersonate themself as other users. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to login as any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to login as any customer user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.is_user_token_access_enabled_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: bool If the method is called asynchronously, returns the request thread. """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.is_user_token_access_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.is_user_token_access_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + return data - all_params = ['user_id'] # noqa: E501 + def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Check Token Access Enabled (isUserTokenAccessEnabled) # noqa: E501 + + Checks that the system is configured to allow administrators to impersonate themself as other users. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to login as any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to login as any customer user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.is_user_token_access_enabled_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: bool + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -611,20 +1525,14 @@ def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_user_token_using_get" % key + " to method is_user_token_access_enabled_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in params or - params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `get_user_token_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'user_id' in params: - path_params['userId'] = params['user_id'] # noqa: E501 query_params = [] @@ -642,14 +1550,14 @@ def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/{userId}/token', 'GET', + '/api/user/tokenAccessEnabled', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='JWTPair', # noqa: E501 + response_type='bool', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -657,53 +1565,45 @@ def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_users_using_get(self, page_size, page, **kwargs): # noqa: E501 - """Get Users (getUsers) # noqa: E501 + def put_user_settings_using_put(self, **kwargs): # noqa: E501 + """Update user settings (saveUserSettings) # noqa: E501 - Returns a page of users owned by tenant or customer. The scope depends on authority of the user that performs the request.You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_using_get(page_size, page, async_req=True) + >>> thread = api.put_user_settings_using_put(async_req=True) >>> result = thread.get() :param async_req bool - :param int page_size: Maximum amount of entities in a one page (required) - :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. - :param str sort_property: Property of entity to sort by - :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataUser + :param JsonNode body: + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.put_user_settings_using_put_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.put_user_settings_using_put_with_http_info(**kwargs) # noqa: E501 return data - def get_users_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """Get Users (getUsers) # noqa: E501 + def put_user_settings_using_put_with_http_info(self, **kwargs): # noqa: E501 + """Update user settings (saveUserSettings) # noqa: E501 - Returns a page of users owned by tenant or customer. The scope depends on authority of the user that performs the request.You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.put_user_settings_using_put_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param int page_size: Maximum amount of entities in a one page (required) - :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. - :param str sort_property: Property of entity to sort by - :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataUser + :param JsonNode body: + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -714,34 +1614,220 @@ def get_users_using_get_with_http_info(self, page_size, page, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_users_using_get" % key + " to method put_user_settings_using_put" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'page_size' is set - if ('page_size' not in params or - params['page_size'] is None): - raise ValueError("Missing the required parameter `page_size` when calling `get_users_using_get`") # noqa: E501 - # verify the required parameter 'page' is set - if ('page' not in params or - params['page'] is None): - raise ValueError("Missing the required parameter `page` when calling `get_users_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'page_size' in params: - query_params.append(('pageSize', params['page_size'])) # noqa: E501 - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'text_search' in params: - query_params.append(('textSearch', params['text_search'])) # noqa: E501 - if 'sort_property' in params: - query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 - if 'sort_order' in params: - query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/settings', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def put_user_settings_using_put1(self, type, **kwargs): # noqa: E501 + """Update user settings (saveUserSettings) # noqa: E501 + + Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.put_user_settings_using_put1(type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) + :param JsonNode body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.put_user_settings_using_put1_with_http_info(type, **kwargs) # noqa: E501 + else: + (data) = self.put_user_settings_using_put1_with_http_info(type, **kwargs) # noqa: E501 + return data + + def put_user_settings_using_put1_with_http_info(self, type, **kwargs): # noqa: E501 + """Update user settings (saveUserSettings) # noqa: E501 + + Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.put_user_settings_using_put1_with_http_info(type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) + :param JsonNode body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['type', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method put_user_settings_using_put1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'type' is set + if ('type' not in params or + params['type'] is None): + raise ValueError("Missing the required parameter `type` when calling `put_user_settings_using_put1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/settings/{type}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def report_user_dashboard_action_using_get(self, dashboard_id, action, **kwargs): # noqa: E501 + """Report action of User over the dashboard (reportUserDashboardAction) # noqa: E501 + + Report action of User over the dashboard. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.report_user_dashboard_action_using_get(dashboard_id, action, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str action: Dashboard action, one of: \"visit\", \"star\" or \"unstar\". (required) + :return: UserDashboardsInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.report_user_dashboard_action_using_get_with_http_info(dashboard_id, action, **kwargs) # noqa: E501 + else: + (data) = self.report_user_dashboard_action_using_get_with_http_info(dashboard_id, action, **kwargs) # noqa: E501 + return data + + def report_user_dashboard_action_using_get_with_http_info(self, dashboard_id, action, **kwargs): # noqa: E501 + """Report action of User over the dashboard (reportUserDashboardAction) # noqa: E501 + + Report action of User over the dashboard. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.report_user_dashboard_action_using_get_with_http_info(dashboard_id, action, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str action: Dashboard action, one of: \"visit\", \"star\" or \"unstar\". (required) + :return: UserDashboardsInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['dashboard_id', 'action'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method report_user_dashboard_action_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'dashboard_id' is set + if ('dashboard_id' not in params or + params['dashboard_id'] is None): + raise ValueError("Missing the required parameter `dashboard_id` when calling `report_user_dashboard_action_using_get`") # noqa: E501 + # verify the required parameter 'action' is set + if ('action' not in params or + params['action'] is None): + raise ValueError("Missing the required parameter `action` when calling `report_user_dashboard_action_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'dashboard_id' in params: + path_params['dashboardId'] = params['dashboard_id'] # noqa: E501 + if 'action' in params: + path_params['action'] = params['action'] # noqa: E501 + + query_params = [] header_params = {} @@ -757,14 +1843,14 @@ def get_users_using_get_with_http_info(self, page_size, page, **kwargs): # noqa auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + '/api/user/dashboards/{dashboardId}/{action}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataUser', # noqa: E501 + response_type='UserDashboardsInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -772,43 +1858,45 @@ def get_users_using_get_with_http_info(self, page_size, page, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def is_user_token_access_enabled_using_get(self, **kwargs): # noqa: E501 - """Check Token Access Enabled (isUserTokenAccessEnabled) # noqa: E501 + def save_user_settings_using_post(self, **kwargs): # noqa: E501 + """Save user settings (saveUserSettings) # noqa: E501 - Checks that the system is configured to allow administrators to impersonate themself as other users. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to login as any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to login as any customer user. # noqa: E501 + Save user settings represented in json format for authorized user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.is_user_token_access_enabled_using_get(async_req=True) + >>> thread = api.save_user_settings_using_post(async_req=True) >>> result = thread.get() :param async_req bool - :return: bool + :param JsonNode body: + :return: JsonNode If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.is_user_token_access_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + return self.save_user_settings_using_post_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.is_user_token_access_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.save_user_settings_using_post_with_http_info(**kwargs) # noqa: E501 return data - def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Check Token Access Enabled (isUserTokenAccessEnabled) # noqa: E501 + def save_user_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save user settings (saveUserSettings) # noqa: E501 - Checks that the system is configured to allow administrators to impersonate themself as other users. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to login as any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to login as any customer user. # noqa: E501 + Save user settings represented in json format for authorized user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.is_user_token_access_enabled_using_get_with_http_info(async_req=True) + >>> thread = api.save_user_settings_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: bool + :param JsonNode body: + :return: JsonNode If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -819,7 +1907,7 @@ def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # no if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method is_user_token_access_enabled_using_get" % key + " to method save_user_settings_using_post" % key ) params[key] = val del params['kwargs'] @@ -836,22 +1924,28 @@ def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # no local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/tokenAccessEnabled', 'GET', + '/api/user/settings', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='bool', # noqa: E501 + response_type='JsonNode', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -862,7 +1956,7 @@ def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # no def save_user_using_post(self, **kwargs): # noqa: E501 """Save Or update User (saveUser) # noqa: E501 - Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created User Id will be present in the response. Specify existing User Id to update the device. Referencing non-existing User Id will cause 'Not Found' error. Device email is unique for entire platform setup. # noqa: E501 + Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created User Id will be present in the response. Specify existing User Id to update the device. Referencing non-existing User Id will cause 'Not Found' error. Device email is unique for entire platform setup.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new User entity. Available for users with 'SYS_ADMIN', 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_user_using_post(async_req=True) @@ -885,7 +1979,7 @@ def save_user_using_post(self, **kwargs): # noqa: E501 def save_user_using_post_with_http_info(self, **kwargs): # noqa: E501 """Save Or update User (saveUser) # noqa: E501 - Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created User Id will be present in the response. Specify existing User Id to update the device. Referencing non-existing User Id will cause 'Not Found' error. Device email is unique for entire platform setup. # noqa: E501 + Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created User Id will be present in the response. Specify existing User Id to update the device. Referencing non-existing User Id will cause 'Not Found' error. Device email is unique for entire platform setup.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new User entity. Available for users with 'SYS_ADMIN', 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_user_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_ce/widget_type_controller_api.py b/tb_rest_client/api/api_ce/widget_type_controller_api.py index 98cc9f29..564ec08a 100644 --- a/tb_rest_client/api/api_ce/widget_type_controller_api.py +++ b/tb_rest_client/api/api_ce/widget_type_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -645,7 +645,7 @@ def get_widget_type_using_get_with_http_info(self, is_system, bundle_alias, alia def save_widget_type_using_post(self, **kwargs): # noqa: E501 """Create Or Update Widget Type (saveWidgetType) # noqa: E501 - Create or update the Widget Type. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Type Id will be present in the response. Specify existing Widget Type id to update the Widget Type. Referencing non-existing Widget Type Id will cause 'Not Found' error. Widget Type alias is unique in the scope of Widget Bundle. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Widget Type. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Type Id will be present in the response. Specify existing Widget Type id to update the Widget Type. Referencing non-existing Widget Type Id will cause 'Not Found' error. Widget Type alias is unique in the scope of Widget Bundle. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' rom the request body example (below) to create new Widget Type entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_widget_type_using_post(async_req=True) @@ -667,7 +667,7 @@ def save_widget_type_using_post(self, **kwargs): # noqa: E501 def save_widget_type_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Widget Type (saveWidgetType) # noqa: E501 - Create or update the Widget Type. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Type Id will be present in the response. Specify existing Widget Type id to update the Widget Type. Referencing non-existing Widget Type Id will cause 'Not Found' error. Widget Type alias is unique in the scope of Widget Bundle. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Widget Type. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Type Id will be present in the response. Specify existing Widget Type id to update the Widget Type. Referencing non-existing Widget Type Id will cause 'Not Found' error. Widget Type alias is unique in the scope of Widget Bundle. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' rom the request body example (below) to create new Widget Type entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_widget_type_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_ce/widgets_bundle_controller_api.py b/tb_rest_client/api/api_ce/widgets_bundle_controller_api.py index 0c9b31e1..ba3cd06d 100644 --- a/tb_rest_client/api/api_ce/widgets_bundle_controller_api.py +++ b/tb_rest_client/api/api_ce/widgets_bundle_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -321,7 +321,7 @@ def get_widgets_bundles_using_get1(self, page_size, page, **kwargs): # noqa: E5 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the widget bundle title. + :param str text_search: The case insensitive 'substring' filter based on the widget bundle title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataWidgetsBundle @@ -347,7 +347,7 @@ def get_widgets_bundles_using_get1_with_http_info(self, page_size, page, **kwarg :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the widget bundle title. + :param str text_search: The case insensitive 'substring' filter based on the widget bundle title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataWidgetsBundle @@ -427,7 +427,7 @@ def get_widgets_bundles_using_get1_with_http_info(self, page_size, page, **kwarg def save_widgets_bundle_using_post(self, **kwargs): # noqa: E501 """Create Or Update Widget Bundle (saveWidgetsBundle) # noqa: E501 - Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error. Widget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error. Widget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_widgets_bundle_using_post(async_req=True) @@ -449,7 +449,7 @@ def save_widgets_bundle_using_post(self, **kwargs): # noqa: E501 def save_widgets_bundle_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Widget Bundle (saveWidgetsBundle) # noqa: E501 - Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error. Widget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error. Widget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_widgets_bundle_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_pe/__init__.py b/tb_rest_client/api/api_pe/__init__.py index 6cc5cca8..9b23d577 100644 --- a/tb_rest_client/api/api_pe/__init__.py +++ b/tb_rest_client/api/api_pe/__init__.py @@ -39,3 +39,5 @@ from .subscription_controller_api import SubscriptionControllerApi from .solution_controller_api import SolutionControllerApi from .device_profile_controller_api import DeviceProfileControllerApi +from .asset_profile_controller_api import AssetProfileControllerApi +from .two_factor_auth_controller_api import TwoFactorAuthControllerApi diff --git a/tb_rest_client/api/api_pe/admin_controller_api.py b/tb_rest_client/api/api_pe/admin_controller_api.py index 95218bac..b5a4f950 100644 --- a/tb_rest_client/api/api_pe/admin_controller_api.py +++ b/tb_rest_client/api/api_pe/admin_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -101,7 +101,7 @@ def auto_commit_settings_exists_using_get_with_http_info(self, **kwargs): # noq ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/autoCommitSettings/exists', 'GET', @@ -196,7 +196,7 @@ def check_repository_access_using_post_with_http_info(self, **kwargs): # noqa: ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/repositorySettings/checkAccess', 'POST', @@ -283,7 +283,7 @@ def check_updates_using_get_with_http_info(self, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/updates', 'GET', @@ -370,7 +370,7 @@ def delete_auto_commit_settings_using_delete_with_http_info(self, **kwargs): # ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/autoCommitSettings', 'DELETE', @@ -457,7 +457,7 @@ def delete_repository_settings_using_delete_with_http_info(self, **kwargs): # n ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/repositorySettings', 'DELETE', @@ -556,7 +556,7 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/settings/{key}{?systemByDefault}', 'GET', @@ -643,7 +643,7 @@ def get_auto_commit_settings_using_get_with_http_info(self, **kwargs): # noqa: ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/autoCommitSettings', 'GET', @@ -661,6 +661,352 @@ def get_auto_commit_settings_using_get_with_http_info(self, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_features_info_using_get(self, **kwargs): # noqa: E501 + """Get features info (getFeaturesInfo) # noqa: E501 + + Get information about enabled/disabled features. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_features_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: FeaturesInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_features_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_features_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_features_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get features info (getFeaturesInfo) # noqa: E501 + + Get information about enabled/disabled features. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_features_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: FeaturesInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_features_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/featuresInfo', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FeaturesInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_jwt_settings_using_get(self, **kwargs): # noqa: E501 + """Get the JWT Settings object (getJwtSettings) # noqa: E501 + + Get the JWT Settings object that contains JWT token policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_jwt_settings_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: JWTSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_jwt_settings_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_jwt_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_jwt_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get the JWT Settings object (getJwtSettings) # noqa: E501 + + Get the JWT Settings object that contains JWT token policy, etc. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_jwt_settings_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: JWTSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_jwt_settings_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/jwtSettings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JWTSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_license_usage_info_using_get(self, **kwargs): # noqa: E501 + """Get license usage info (getLicenseUsageInfo) # noqa: E501 + + Get license usage info. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_license_usage_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: LicenseUsageInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_license_usage_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_license_usage_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_license_usage_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get license usage info (getLicenseUsageInfo) # noqa: E501 + + Get license usage info. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_license_usage_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: LicenseUsageInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_license_usage_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/licenseUsageInfo', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LicenseUsageInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_repository_settings_info_using_get(self, **kwargs): # noqa: E501 + """getRepositorySettingsInfo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_repository_settings_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: RepositorySettingsInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_repository_settings_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_repository_settings_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_repository_settings_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getRepositorySettingsInfo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_repository_settings_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: RepositorySettingsInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_repository_settings_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/repositorySettings/info', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RepositorySettingsInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_repository_settings_using_get(self, **kwargs): # noqa: E501 """Get repository settings (getRepositorySettings) # noqa: E501 @@ -730,7 +1076,7 @@ def get_repository_settings_using_get_with_http_info(self, **kwargs): # noqa: E ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/repositorySettings', 'GET', @@ -817,7 +1163,7 @@ def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E50 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/securitySettings', 'GET', @@ -835,6 +1181,93 @@ def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E50 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_system_info_using_get(self, **kwargs): # noqa: E501 + """Get system info (getSystemInfo) # noqa: E501 + + Get main information about system. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_system_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: SystemInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_system_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_system_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_system_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get system info (getSystemInfo) # noqa: E501 + + Get main information about system. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_system_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: SystemInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_system_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/systemInfo', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SystemInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def repository_settings_exists_using_get(self, **kwargs): # noqa: E501 """Check repository settings exists (repositorySettingsExists) # noqa: E501 @@ -904,7 +1337,7 @@ def repository_settings_exists_using_get_with_http_info(self, **kwargs): # noqa ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/repositorySettings/exists', 'GET', @@ -999,7 +1432,7 @@ def save_admin_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/settings', 'POST', @@ -1094,7 +1527,7 @@ def save_auto_commit_settings_using_post_with_http_info(self, **kwargs): # noqa ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/autoCommitSettings', 'POST', @@ -1112,6 +1545,101 @@ def save_auto_commit_settings_using_post_with_http_info(self, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def save_jwt_settings_using_post(self, **kwargs): # noqa: E501 + """Update JWT Settings (saveJwtSettings) # noqa: E501 + + Updates the JWT Settings object that contains JWT token policy, etc. The tokenSigningKey field is a Base64 encoded string. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_jwt_settings_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param JWTSettings body: + :return: JWTPair + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_jwt_settings_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_jwt_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_jwt_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Update JWT Settings (saveJwtSettings) # noqa: E501 + + Updates the JWT Settings object that contains JWT token policy, etc. The tokenSigningKey field is a Base64 encoded string. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_jwt_settings_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param JWTSettings body: + :return: JWTPair + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_jwt_settings_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/jwtSettings', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JWTPair', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def save_repository_settings_using_post(self, **kwargs): # noqa: E501 """Creates or Updates the repository settings (saveRepositorySettings) # noqa: E501 @@ -1189,7 +1717,7 @@ def save_repository_settings_using_post_with_http_info(self, **kwargs): # noqa: ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/repositorySettings', 'POST', @@ -1284,7 +1812,7 @@ def save_security_settings_using_post_with_http_info(self, **kwargs): # noqa: E ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/securitySettings', 'POST', @@ -1379,7 +1907,7 @@ def send_test_mail_using_post_with_http_info(self, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/settings/testMail', 'POST', @@ -1474,7 +2002,7 @@ def send_test_sms_using_post_with_http_info(self, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['HTTP login form'] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( '/api/admin/settings/testSms', 'POST', @@ -1490,4 +2018,4 @@ def send_test_sms_using_post_with_http_info(self, **kwargs): # noqa: E501 _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) \ No newline at end of file + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/alarm_comment_controller_api.py b/tb_rest_client/api/api_pe/alarm_comment_controller_api.py new file mode 100644 index 00000000..638f40db --- /dev/null +++ b/tb_rest_client/api/api_pe/alarm_comment_controller_api.py @@ -0,0 +1,358 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class AlarmCommentControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_alarm_comment_using_delete(self, alarm_id, comment_id, **kwargs): # noqa: E501 + """Delete Alarm comment (deleteAlarmComment) # noqa: E501 + + Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_alarm_comment_using_delete(alarm_id, comment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str comment_id: A string value representing the alarm comment id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_alarm_comment_using_delete_with_http_info(alarm_id, comment_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_alarm_comment_using_delete_with_http_info(alarm_id, comment_id, **kwargs) # noqa: E501 + return data + + def delete_alarm_comment_using_delete_with_http_info(self, alarm_id, comment_id, **kwargs): # noqa: E501 + """Delete Alarm comment (deleteAlarmComment) # noqa: E501 + + Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_alarm_comment_using_delete_with_http_info(alarm_id, comment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str comment_id: A string value representing the alarm comment id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['alarm_id', 'comment_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_alarm_comment_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'alarm_id' is set + if ('alarm_id' not in params or + params['alarm_id'] is None): + raise ValueError("Missing the required parameter `alarm_id` when calling `delete_alarm_comment_using_delete`") # noqa: E501 + # verify the required parameter 'comment_id' is set + if ('comment_id' not in params or + params['comment_id'] is None): + raise ValueError("Missing the required parameter `comment_id` when calling `delete_alarm_comment_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alarm_id' in params: + path_params['alarmId'] = params['alarm_id'] # noqa: E501 + if 'comment_id' in params: + path_params['commentId'] = params['comment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/alarm/{alarmId}/comment/{commentId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_alarm_comments_using_get(self, alarm_id, page_size, page, **kwargs): # noqa: E501 + """Get Alarm comments (getAlarmComments) # noqa: E501 + + Returns a page of alarm comments for specified alarm. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alarm_comments_using_get(alarm_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAlarmCommentInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_alarm_comments_using_get_with_http_info(alarm_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_alarm_comments_using_get_with_http_info(alarm_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_alarm_comments_using_get_with_http_info(self, alarm_id, page_size, page, **kwargs): # noqa: E501 + """Get Alarm comments (getAlarmComments) # noqa: E501 + + Returns a page of alarm comments for specified alarm. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alarm_comments_using_get_with_http_info(alarm_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAlarmCommentInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['alarm_id', 'page_size', 'page', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_alarm_comments_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'alarm_id' is set + if ('alarm_id' not in params or + params['alarm_id'] is None): + raise ValueError("Missing the required parameter `alarm_id` when calling `get_alarm_comments_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_alarm_comments_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_alarm_comments_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alarm_id' in params: + path_params['alarmId'] = params['alarm_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/alarm/{alarmId}/comment{?page,pageSize,sortOrder,sortProperty}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAlarmCommentInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_alarm_comment_using_post(self, alarm_id, **kwargs): # noqa: E501 + """Create or update Alarm Comment # noqa: E501 + + Creates or Updates the Alarm Comment. When creating comment, platform generates Alarm Comment Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Comment id will be present in the response. Specify existing Alarm Comment id to update the alarm. Referencing non-existing Alarm Comment Id will cause 'Not Found' error. To create new Alarm comment entity it is enough to specify 'comment' json element with 'text' node, for example: {\"comment\": { \"text\": \"my comment\"}}. If comment type is not specified the default value 'OTHER' will be saved. If 'alarmId' or 'userId' specified in body it will be ignored. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_alarm_comment_using_post(alarm_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param AlarmComment body: + :return: AlarmComment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_alarm_comment_using_post_with_http_info(alarm_id, **kwargs) # noqa: E501 + else: + (data) = self.save_alarm_comment_using_post_with_http_info(alarm_id, **kwargs) # noqa: E501 + return data + + def save_alarm_comment_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E501 + """Create or update Alarm Comment # noqa: E501 + + Creates or Updates the Alarm Comment. When creating comment, platform generates Alarm Comment Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Comment id will be present in the response. Specify existing Alarm Comment id to update the alarm. Referencing non-existing Alarm Comment Id will cause 'Not Found' error. To create new Alarm comment entity it is enough to specify 'comment' json element with 'text' node, for example: {\"comment\": { \"text\": \"my comment\"}}. If comment type is not specified the default value 'OTHER' will be saved. If 'alarmId' or 'userId' specified in body it will be ignored. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_alarm_comment_using_post_with_http_info(alarm_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param AlarmComment body: + :return: AlarmComment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['alarm_id', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_alarm_comment_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'alarm_id' is set + if ('alarm_id' not in params or + params['alarm_id'] is None): + raise ValueError("Missing the required parameter `alarm_id` when calling `save_alarm_comment_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alarm_id' in params: + path_params['alarmId'] = params['alarm_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/alarm/{alarmId}/comment', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AlarmComment', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/alarm_controller_api.py b/tb_rest_client/api/api_pe/alarm_controller_api.py index 4211c939..1c3069d6 100644 --- a/tb_rest_client/api/api_pe/alarm_controller_api.py +++ b/tb_rest_client/api/api_pe/alarm_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -43,7 +43,7 @@ def ack_alarm_using_post(self, alarm_id, **kwargs): # noqa: E501 :param async_req bool :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: AlarmInfo If the method is called asynchronously, returns the request thread. """ @@ -65,7 +65,7 @@ def ack_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E501 :param async_req bool :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: AlarmInfo If the method is called asynchronously, returns the request thread. """ @@ -88,8 +88,7 @@ def ack_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E501 # verify the required parameter 'alarm_id' is set if ('alarm_id' not in params or params['alarm_id'] is None): - raise ValueError( - "Missing the required parameter `alarm_id` when calling `ack_alarm_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `ack_alarm_using_post`") # noqa: E501 collection_formats = {} @@ -120,7 +119,110 @@ def ack_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='AlarmInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def assign_alarm_using_post(self, alarm_id, assignee_id, **kwargs): # noqa: E501 + """Assign/Reassign Alarm (assignAlarm) # noqa: E501 + + 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assign_alarm_using_post(alarm_id, assignee_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str assignee_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: Alarm + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assign_alarm_using_post_with_http_info(alarm_id, assignee_id, **kwargs) # noqa: E501 + else: + (data) = self.assign_alarm_using_post_with_http_info(alarm_id, assignee_id, **kwargs) # noqa: E501 + return data + + def assign_alarm_using_post_with_http_info(self, alarm_id, assignee_id, **kwargs): # noqa: E501 + """Assign/Reassign Alarm (assignAlarm) # noqa: E501 + + 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.assign_alarm_using_post_with_http_info(alarm_id, assignee_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str assignee_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: Alarm + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['alarm_id', 'assignee_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method assign_alarm_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'alarm_id' is set + if ('alarm_id' not in params or + params['alarm_id'] is None): + raise ValueError("Missing the required parameter `alarm_id` when calling `assign_alarm_using_post`") # noqa: E501 + # verify the required parameter 'assignee_id' is set + if ('assignee_id' not in params or + params['assignee_id'] is None): + raise ValueError("Missing the required parameter `assignee_id` when calling `assign_alarm_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alarm_id' in params: + path_params['alarmId'] = params['alarm_id'] # noqa: E501 + if 'assignee_id' in params: + path_params['assigneeId'] = params['assignee_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/alarm/{alarmId}/assign/{assigneeId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Alarm', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -139,7 +241,7 @@ def clear_alarm_using_post(self, alarm_id, **kwargs): # noqa: E501 :param async_req bool :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: AlarmInfo If the method is called asynchronously, returns the request thread. """ @@ -161,7 +263,7 @@ def clear_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E5 :param async_req bool :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: AlarmInfo If the method is called asynchronously, returns the request thread. """ @@ -184,8 +286,7 @@ def clear_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E5 # verify the required parameter 'alarm_id' is set if ('alarm_id' not in params or params['alarm_id'] is None): - raise ValueError( - "Missing the required parameter `alarm_id` when calling `clear_alarm_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `clear_alarm_using_post`") # noqa: E501 collection_formats = {} @@ -216,7 +317,7 @@ def clear_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='AlarmInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -280,8 +381,7 @@ def delete_alarm_using_delete_with_http_info(self, alarm_id, **kwargs): # noqa: # verify the required parameter 'alarm_id' is set if ('alarm_id' not in params or params['alarm_id'] is None): - raise ValueError( - "Missing the required parameter `alarm_id` when calling `delete_alarm_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `delete_alarm_using_delete`") # noqa: E501 collection_formats = {} @@ -376,8 +476,7 @@ def get_alarm_by_id_using_get_with_http_info(self, alarm_id, **kwargs): # noqa: # verify the required parameter 'alarm_id' is set if ('alarm_id' not in params or params['alarm_id'] is None): - raise ValueError( - "Missing the required parameter `alarm_id` when calling `get_alarm_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `get_alarm_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -472,8 +571,7 @@ def get_alarm_info_by_id_using_get_with_http_info(self, alarm_id, **kwargs): # # verify the required parameter 'alarm_id' is set if ('alarm_id' not in params or params['alarm_id'] is None): - raise ValueError( - "Missing the required parameter `alarm_id` when calling `get_alarm_info_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `get_alarm_info_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -528,7 +626,8 @@ def get_alarms_using_get(self, entity_type, entity_id, page_size, page, **kwargs :param int page: Sequence number of page starting from 0 (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value - :param str text_search: The case insensitive 'startsWith' filter based on of next alarm fields: type, severity or status + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. @@ -540,11 +639,9 @@ def get_alarms_using_get(self, entity_type, entity_id, page_size, page, **kwargs """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_alarms_using_get_with_http_info(entity_type, entity_id, page_size, page, - **kwargs) # noqa: E501 + return self.get_alarms_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_alarms_using_get_with_http_info(entity_type, entity_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.get_alarms_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 return data def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 @@ -563,7 +660,8 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, :param int page: Sequence number of page starting from 0 (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value - :param str text_search: The case insensitive 'startsWith' filter based on of next alarm fields: type, severity or status + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. @@ -574,8 +672,7 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'page_size', 'page', 'search_status', 'status', 'text_search', - 'sort_property', 'sort_order', 'start_time', 'end_time', 'fetch_originator'] # noqa: E501 + all_params = ['entity_type', 'entity_id', 'page_size', 'page', 'search_status', 'status', 'assignee_id', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'fetch_originator'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -593,18 +690,15 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): - raise ValueError( - "Missing the required parameter `entity_type` when calling `get_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_type` when calling `get_alarms_using_get`") # noqa: E501 # verify the required parameter 'entity_id' is set if ('entity_id' not in params or params['entity_id'] is None): - raise ValueError( - "Missing the required parameter `entity_id` when calling `get_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_id` when calling `get_alarms_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_alarms_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): @@ -623,6 +717,8 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, query_params.append(('searchStatus', params['search_status'])) # noqa: E501 if 'status' in params: query_params.append(('status', params['status'])) # noqa: E501 + if 'assignee_id' in params: + query_params.append(('assigneeId', params['assignee_id'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: @@ -654,8 +750,162 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/alarm/{entityType}/{entityId}{?endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}', - 'GET', + '/api/alarm/{entityType}/{entityId}{?assigneeId,endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAlarmInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_alarms_v2_using_get(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 + """Get Alarms (getAlarmsV2) # noqa: E501 + + Returns a page of alarms for the selected entity. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alarms_v2_using_get(entity_type, entity_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str status_list: A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value + :param str severity_list: A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value + :param str type_list: A list of string values separated by comma ',' representing alarm types + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :param int end_time: The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :return: PageDataAlarmInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_alarms_v2_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_alarms_v2_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_alarms_v2_using_get_with_http_info(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 + """Get Alarms (getAlarmsV2) # noqa: E501 + + Returns a page of alarms for the selected entity. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alarms_v2_using_get_with_http_info(entity_type, entity_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str status_list: A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value + :param str severity_list: A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value + :param str type_list: A list of string values separated by comma ',' representing alarm types + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :param int end_time: The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :return: PageDataAlarmInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_type', 'entity_id', 'page_size', 'page', 'status_list', 'severity_list', 'type_list', 'assignee_id', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_alarms_v2_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `get_alarms_v2_using_get`") # noqa: E501 + # verify the required parameter 'entity_id' is set + if ('entity_id' not in params or + params['entity_id'] is None): + raise ValueError("Missing the required parameter `entity_id` when calling `get_alarms_v2_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_alarms_v2_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_alarms_v2_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + if 'entity_id' in params: + path_params['entityId'] = params['entity_id'] # noqa: E501 + + query_params = [] + if 'status_list' in params: + query_params.append(('statusList', params['status_list'])) # noqa: E501 + if 'severity_list' in params: + query_params.append(('severityList', params['severity_list'])) # noqa: E501 + if 'type_list' in params: + query_params.append(('typeList', params['type_list'])) # noqa: E501 + if 'assignee_id' in params: + query_params.append(('assigneeId', params['assignee_id'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alarm/{entityType}/{entityId}{?assigneeId,endTime,page,pageSize,severityList,sortOrder,sortProperty,startTime,statusList,textSearch,typeList}', 'GET', path_params, query_params, header_params, @@ -684,7 +934,8 @@ def get_all_alarms_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page: Sequence number of page starting from 0 (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value - :param str text_search: The case insensitive 'startsWith' filter based on of next alarm fields: type, severity or status + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. @@ -715,7 +966,8 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # :param int page: Sequence number of page starting from 0 (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value - :param str text_search: The case insensitive 'startsWith' filter based on of next alarm fields: type, severity or status + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. @@ -726,8 +978,7 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # returns the request thread. """ - all_params = ['page_size', 'page', 'search_status', 'status', 'text_search', 'sort_property', 'sort_order', - 'start_time', 'end_time', 'fetch_originator'] # noqa: E501 + all_params = ['page_size', 'page', 'search_status', 'status', 'assignee_id', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'fetch_originator'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -745,13 +996,11 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_all_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_all_alarms_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError( - "Missing the required parameter `page` when calling `get_all_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_all_alarms_using_get`") # noqa: E501 collection_formats = {} @@ -762,6 +1011,8 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # query_params.append(('searchStatus', params['search_status'])) # noqa: E501 if 'status' in params: query_params.append(('status', params['status'])) # noqa: E501 + if 'assignee_id' in params: + query_params.append(('assigneeId', params['assignee_id'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: @@ -793,8 +1044,146 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/alarms{?endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}', - 'GET', + '/api/alarms{?assigneeId,endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAlarmInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_alarms_v2_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get All Alarms (getAllAlarmsV2) # noqa: E501 + + Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_alarms_v2_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str status_list: A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value + :param str severity_list: A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value + :param str type_list: A list of string values separated by comma ',' representing alarm types + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :param int end_time: The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :return: PageDataAlarmInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_all_alarms_v2_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_all_alarms_v2_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_all_alarms_v2_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get All Alarms (getAllAlarmsV2) # noqa: E501 + + Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_alarms_v2_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str status_list: A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value + :param str severity_list: A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value + :param str type_list: A list of string values separated by comma ',' representing alarm types + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on of next alarm fields: type, severity or status + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param int start_time: The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :param int end_time: The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. + :return: PageDataAlarmInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'status_list', 'severity_list', 'type_list', 'assignee_id', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_alarms_v2_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_all_alarms_v2_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_all_alarms_v2_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'status_list' in params: + query_params.append(('statusList', params['status_list'])) # noqa: E501 + if 'severity_list' in params: + query_params.append(('severityList', params['severity_list'])) # noqa: E501 + if 'type_list' in params: + query_params.append(('typeList', params['type_list'])) # noqa: E501 + if 'assignee_id' in params: + query_params.append(('assigneeId', params['assignee_id'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alarms{?assigneeId,endTime,page,pageSize,severityList,sortOrder,sortProperty,startTime,statusList,textSearch,typeList}', 'GET', path_params, query_params, header_params, @@ -823,17 +1212,16 @@ def get_highest_alarm_severity_using_get(self, entity_type, entity_id, **kwargs) :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_highest_alarm_severity_using_get_with_http_info(entity_type, entity_id, - **kwargs) # noqa: E501 + return self.get_highest_alarm_severity_using_get_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 else: - (data) = self.get_highest_alarm_severity_using_get_with_http_info(entity_type, entity_id, - **kwargs) # noqa: E501 + (data) = self.get_highest_alarm_severity_using_get_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 return data def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entity_id, **kwargs): # noqa: E501 @@ -850,12 +1238,13 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str search_status: A string value representing one of the AlarmSearchStatus enumeration value :param str status: A string value representing one of the AlarmStatus enumeration value + :param str assignee_id: A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'search_status', 'status'] # noqa: E501 + all_params = ['entity_type', 'entity_id', 'search_status', 'status', 'assignee_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -873,13 +1262,11 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): - raise ValueError( - "Missing the required parameter `entity_type` when calling `get_highest_alarm_severity_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_type` when calling `get_highest_alarm_severity_using_get`") # noqa: E501 # verify the required parameter 'entity_id' is set if ('entity_id' not in params or params['entity_id'] is None): - raise ValueError( - "Missing the required parameter `entity_id` when calling `get_highest_alarm_severity_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_id` when calling `get_highest_alarm_severity_using_get`") # noqa: E501 collection_formats = {} @@ -894,6 +1281,8 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit query_params.append(('searchStatus', params['search_status'])) # noqa: E501 if 'status' in params: query_params.append(('status', params['status'])) # noqa: E501 + if 'assignee_id' in params: + query_params.append(('assigneeId', params['assignee_id'])) # noqa: E501 header_params = {} @@ -909,7 +1298,7 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/alarm/highestSeverity/{entityType}/{entityId}{?searchStatus,status}', 'GET', + '/api/alarm/highestSeverity/{entityType}/{entityId}{?assigneeId,searchStatus,status}', 'GET', path_params, query_params, header_params, @@ -925,9 +1314,9 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit collection_formats=collection_formats) def save_alarm_using_post(self, **kwargs): # noqa: E501 - """Create or update Alarm (saveAlarm) # noqa: E501 + """Create or Update Alarm (saveAlarm) # noqa: E501 - Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_alarm_using_post(async_req=True) @@ -947,9 +1336,9 @@ def save_alarm_using_post(self, **kwargs): # noqa: E501 return data def save_alarm_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Create or update Alarm (saveAlarm) # noqa: E501 + """Create or Update Alarm (saveAlarm) # noqa: E501 - Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_alarm_using_post_with_http_info(async_req=True) @@ -1018,3 +1407,98 @@ def save_alarm_using_post_with_http_info(self, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def unassign_alarm_using_delete(self, alarm_id, **kwargs): # noqa: E501 + """Unassign Alarm (unassignAlarm) # noqa: E501 + + Unassign the Alarm. 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unassign_alarm_using_delete(alarm_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: Alarm + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.unassign_alarm_using_delete_with_http_info(alarm_id, **kwargs) # noqa: E501 + else: + (data) = self.unassign_alarm_using_delete_with_http_info(alarm_id, **kwargs) # noqa: E501 + return data + + def unassign_alarm_using_delete_with_http_info(self, alarm_id, **kwargs): # noqa: E501 + """Unassign Alarm (unassignAlarm) # noqa: E501 + + Unassign the Alarm. 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unassign_alarm_using_delete_with_http_info(alarm_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: Alarm + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['alarm_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method unassign_alarm_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'alarm_id' is set + if ('alarm_id' not in params or + params['alarm_id'] is None): + raise ValueError("Missing the required parameter `alarm_id` when calling `unassign_alarm_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alarm_id' in params: + path_params['alarmId'] = params['alarm_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/alarm/{alarmId}/assign', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Alarm', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/asset_controller_api.py b/tb_rest_client/api/api_pe/asset_controller_api.py index 966edcbf..d1bbc667 100644 --- a/tb_rest_client/api/api_pe/asset_controller_api.py +++ b/tb_rest_client/api/api_pe/asset_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -222,6 +222,129 @@ def find_by_query_using_post_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_all_asset_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get All Asset Infos for current user (getAllAssetInfos) # noqa: E501 + + Returns a page of asset info objects owned by the tenant or the customer of a current user. Asset Info is an extension of the default Asset object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_asset_infos_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on the asset name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_all_asset_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_all_asset_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_all_asset_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get All Asset Infos for current user (getAllAssetInfos) # noqa: E501 + + Returns a page of asset info objects owned by the tenant or the customer of a current user. Asset Info is an extension of the default Asset object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_asset_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on the asset name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'include_customers', 'asset_profile_id', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_asset_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_all_asset_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_all_asset_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'asset_profile_id' in params: + query_params.append(('assetProfileId', params['asset_profile_id'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetInfos/all{?assetProfileId,includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAssetInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_asset_by_id_using_get(self, asset_id, **kwargs): # noqa: E501 """Get Asset (getAssetById) # noqa: E501 @@ -317,6 +440,101 @@ def get_asset_by_id_using_get_with_http_info(self, asset_id, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_asset_info_by_id_using_get(self, asset_id, **kwargs): # noqa: E501 + """Get Asset Info (getAssetInfoById) # noqa: E501 + + Fetch the Asset Info object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.Asset Info is an extension of the default Asset object that contains information about the owner name. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_info_by_id_using_get(asset_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_id: A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_asset_info_by_id_using_get_with_http_info(asset_id, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_info_by_id_using_get_with_http_info(asset_id, **kwargs) # noqa: E501 + return data + + def get_asset_info_by_id_using_get_with_http_info(self, asset_id, **kwargs): # noqa: E501 + """Get Asset Info (getAssetInfoById) # noqa: E501 + + Fetch the Asset Info object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.Asset Info is an extension of the default Asset object that contains information about the owner name. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_info_by_id_using_get_with_http_info(asset_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_id: A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_asset_info_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'asset_id' is set + if ('asset_id' not in params or + params['asset_id'] is None): + raise ValueError("Missing the required parameter `asset_id` when calling `get_asset_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_id' in params: + path_params['assetId'] = params['asset_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/asset/info/{assetId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_asset_types_using_get(self, **kwargs): # noqa: E501 """Get Asset Types (getAssetTypes) # noqa: E501 @@ -622,6 +840,137 @@ def get_assets_by_ids_using_get_with_http_info(self, asset_ids, **kwargs): # no _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_customer_asset_infos_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Asset Infos (getCustomerAssetInfos) # noqa: E501 + + Returns a page of asset info objects owned by the specified customer. Asset Info is an extension of the default Asset object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_asset_infos_using_get(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on the asset name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_customer_asset_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_asset_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_customer_asset_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Asset Infos (getCustomerAssetInfos) # noqa: E501 + + Returns a page of asset info objects owned by the specified customer. Asset Info is an extension of the default Asset object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_asset_infos_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param str text_search: The case insensitive 'substring' filter based on the asset name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['customer_id', 'page_size', 'page', 'include_customers', 'asset_profile_id', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer_asset_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'customer_id' is set + if ('customer_id' not in params or + params['customer_id'] is None): + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_asset_infos_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_asset_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_customer_asset_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'asset_profile_id' in params: + query_params.append(('assetProfileId', params['asset_profile_id'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/assetInfos{?assetProfileId,includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAssetInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_customer_assets_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 """Get Customer Assets (getCustomerAssets) # noqa: E501 @@ -636,7 +985,7 @@ def get_customer_assets_using_get(self, customer_id, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAsset @@ -664,7 +1013,7 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAsset @@ -857,7 +1206,7 @@ def get_tenant_assets_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAsset @@ -884,7 +1233,7 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type - :param str text_search: The case insensitive 'startsWith' filter based on the asset name. + :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataAsset @@ -966,7 +1315,7 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): def get_user_assets_using_get(self, page_size, page, **kwargs): # noqa: E501 """Get Assets (getUserAssets) # noqa: E501 - Returns a page of assets objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Asset Info is an extension of the default Asset object that contains information about the assigned customer name. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns a page of assets objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Asset Info is an extension of the default Asset object that contains information about the owner name. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_assets_using_get(page_size, page, async_req=True) @@ -976,6 +1325,7 @@ def get_user_assets_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) @@ -993,7 +1343,7 @@ def get_user_assets_using_get(self, page_size, page, **kwargs): # noqa: E501 def get_user_assets_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 """Get Assets (getUserAssets) # noqa: E501 - Returns a page of assets objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Asset Info is an extension of the default Asset object that contains information about the assigned customer name. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns a page of assets objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Asset Info is an extension of the default Asset object that contains information about the owner name. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_assets_using_get_with_http_info(page_size, page, async_req=True) @@ -1003,6 +1353,7 @@ def get_user_assets_using_get_with_http_info(self, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Asset type + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' :param str text_search: The case insensitive 'substring' filter based on the asset name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) @@ -1011,7 +1362,7 @@ def get_user_assets_using_get_with_http_info(self, page_size, page, **kwargs): returns the request thread. """ - all_params = ['page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['page_size', 'page', 'type', 'asset_profile_id', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1046,6 +1397,8 @@ def get_user_assets_using_get_with_http_info(self, page_size, page, **kwargs): query_params.append(('page', params['page'])) # noqa: E501 if 'type' in params: query_params.append(('type', params['type'])) # noqa: E501 + if 'asset_profile_id' in params: + query_params.append(('assetProfileId', params['asset_profile_id'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: @@ -1067,7 +1420,7 @@ def get_user_assets_using_get_with_http_info(self, page_size, page, **kwargs): auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/assets{?page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', + '/api/user/assets{?assetProfileId,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', path_params, query_params, header_params, @@ -1180,7 +1533,7 @@ def process_asset_bulk_import_using_post_with_http_info(self, **kwargs): # noqa def save_asset_using_post(self, **kwargs): # noqa: E501 """Create Or Update Asset (saveAsset) # noqa: E501 - Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_asset_using_post(async_req=True) @@ -1189,6 +1542,7 @@ def save_asset_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param Asset body: :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group. + :param str entity_group_ids: A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups. :return: Asset If the method is called asynchronously, returns the request thread. @@ -1203,7 +1557,7 @@ def save_asset_using_post(self, **kwargs): # noqa: E501 def save_asset_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Asset (saveAsset) # noqa: E501 - Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_asset_using_post_with_http_info(async_req=True) @@ -1212,12 +1566,13 @@ def save_asset_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param Asset body: :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group. + :param str entity_group_ids: A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups. :return: Asset If the method is called asynchronously, returns the request thread. """ - all_params = ['body', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'entity_group_id', 'entity_group_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1240,6 +1595,8 @@ def save_asset_using_post_with_http_info(self, **kwargs): # noqa: E501 query_params = [] if 'entity_group_id' in params: query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 + if 'entity_group_ids' in params: + query_params.append(('entityGroupIds', params['entity_group_ids'])) # noqa: E501 header_params = {} @@ -1261,7 +1618,7 @@ def save_asset_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/asset{?entityGroupId}', 'POST', + '/api/asset{?entityGroupId,entityGroupIds}', 'POST', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_pe/asset_profile_controller_api.py b/tb_rest_client/api/api_pe/asset_profile_controller_api.py new file mode 100644 index 00000000..5921c878 --- /dev/null +++ b/tb_rest_client/api/api_pe/asset_profile_controller_api.py @@ -0,0 +1,920 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class AssetProfileControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_asset_profile_using_delete(self, asset_profile_id, **kwargs): # noqa: E501 + """Delete asset profile (deleteAssetProfile) # noqa: E501 + + Deletes the asset profile. Referencing non-existing asset profile Id will cause an error. Can't delete the asset profile if it is referenced by existing assets. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_asset_profile_using_delete(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_asset_profile_using_delete_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_asset_profile_using_delete_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + return data + + def delete_asset_profile_using_delete_with_http_info(self, asset_profile_id, **kwargs): # noqa: E501 + """Delete asset profile (deleteAssetProfile) # noqa: E501 + + Deletes the asset profile. Referencing non-existing asset profile Id will cause an error. Can't delete the asset profile if it is referenced by existing assets. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_asset_profile_using_delete_with_http_info(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_profile_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_asset_profile_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'asset_profile_id' is set + if ('asset_profile_id' not in params or + params['asset_profile_id'] is None): + raise ValueError("Missing the required parameter `asset_profile_id` when calling `delete_asset_profile_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_profile_id' in params: + path_params['assetProfileId'] = params['asset_profile_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfile/{assetProfileId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_asset_profile_by_id_using_get(self, asset_profile_id, **kwargs): # noqa: E501 + """Get Asset Profile (getAssetProfileById) # noqa: E501 + + Fetch the Asset Profile object based on the provided Asset Profile Id. The server checks that the asset profile is owned by the same tenant. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_by_id_using_get(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_asset_profile_by_id_using_get_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_profile_by_id_using_get_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + return data + + def get_asset_profile_by_id_using_get_with_http_info(self, asset_profile_id, **kwargs): # noqa: E501 + """Get Asset Profile (getAssetProfileById) # noqa: E501 + + Fetch the Asset Profile object based on the provided Asset Profile Id. The server checks that the asset profile is owned by the same tenant. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_by_id_using_get_with_http_info(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_profile_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_asset_profile_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'asset_profile_id' is set + if ('asset_profile_id' not in params or + params['asset_profile_id'] is None): + raise ValueError("Missing the required parameter `asset_profile_id` when calling `get_asset_profile_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_profile_id' in params: + path_params['assetProfileId'] = params['asset_profile_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfile/{assetProfileId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetProfile', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_asset_profile_info_by_id_using_get(self, asset_profile_id, **kwargs): # noqa: E501 + """Get Asset Profile Info (getAssetProfileInfoById) # noqa: E501 + + Fetch the Asset Profile Info object based on the provided Asset Profile Id. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_info_by_id_using_get(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_asset_profile_info_by_id_using_get_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_profile_info_by_id_using_get_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + return data + + def get_asset_profile_info_by_id_using_get_with_http_info(self, asset_profile_id, **kwargs): # noqa: E501 + """Get Asset Profile Info (getAssetProfileInfoById) # noqa: E501 + + Fetch the Asset Profile Info object based on the provided Asset Profile Id. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_info_by_id_using_get_with_http_info(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_profile_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_asset_profile_info_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'asset_profile_id' is set + if ('asset_profile_id' not in params or + params['asset_profile_id'] is None): + raise ValueError("Missing the required parameter `asset_profile_id` when calling `get_asset_profile_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_profile_id' in params: + path_params['assetProfileId'] = params['asset_profile_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfileInfo/{assetProfileId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetProfileInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_asset_profile_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get Asset Profile infos (getAssetProfileInfos) # noqa: E501 + + Returns a page of asset profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_infos_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the asset profile name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_asset_profile_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_profile_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_asset_profile_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get Asset Profile infos (getAssetProfileInfos) # noqa: E501 + + Returns a page of asset profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profile_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the asset profile name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_asset_profile_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_asset_profile_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_asset_profile_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfileInfos{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAssetProfileInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_asset_profiles_by_ids_using_get(self, asset_profile_ids, **kwargs): # noqa: E501 + """Get Asset Profiles By Ids (getAssetProfilesByIds) # noqa: E501 + + Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profiles_by_ids_using_get(asset_profile_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_ids: A list of asset profile ids, separated by comma ',' (required) + :return: list[AssetProfileInfo] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_asset_profiles_by_ids_using_get_with_http_info(asset_profile_ids, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_profiles_by_ids_using_get_with_http_info(asset_profile_ids, **kwargs) # noqa: E501 + return data + + def get_asset_profiles_by_ids_using_get_with_http_info(self, asset_profile_ids, **kwargs): # noqa: E501 + """Get Asset Profiles By Ids (getAssetProfilesByIds) # noqa: E501 + + Requested asset profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profiles_by_ids_using_get_with_http_info(asset_profile_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_ids: A list of asset profile ids, separated by comma ',' (required) + :return: list[AssetProfileInfo] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_profile_ids'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_asset_profiles_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'asset_profile_ids' is set + if ('asset_profile_ids' not in params or + params['asset_profile_ids'] is None): + raise ValueError("Missing the required parameter `asset_profile_ids` when calling `get_asset_profiles_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'asset_profile_ids' in params: + query_params.append(('assetProfileIds', params['asset_profile_ids'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfileInfos{?assetProfileIds}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AssetProfileInfo]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_asset_profiles_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get Asset Profiles (getAssetProfiles) # noqa: E501 + + Returns a page of asset profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profiles_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the asset profile name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetProfile + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_asset_profiles_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_profiles_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_asset_profiles_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get Asset Profiles (getAssetProfiles) # noqa: E501 + + Returns a page of asset profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_asset_profiles_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the asset profile name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataAssetProfile + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_asset_profiles_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_asset_profiles_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_asset_profiles_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfiles{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAssetProfile', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_default_asset_profile_info_using_get(self, **kwargs): # noqa: E501 + """Get Default Asset Profile (getDefaultAssetProfileInfo) # noqa: E501 + + Fetch the Default Asset Profile Info object. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_default_asset_profile_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: AssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_default_asset_profile_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_default_asset_profile_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_default_asset_profile_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get Default Asset Profile (getDefaultAssetProfileInfo) # noqa: E501 + + Fetch the Default Asset Profile Info object. Asset Profile Info is a lightweight object that includes main information about Asset Profile. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_default_asset_profile_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: AssetProfileInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_default_asset_profile_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfileInfo/default', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetProfileInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_asset_profile_using_post(self, **kwargs): # noqa: E501 + """Create Or Update Asset Profile (saveAssetProfile) # noqa: E501 + + Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. Asset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_asset_profile_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssetProfile body: + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_asset_profile_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_asset_profile_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_asset_profile_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Create Or Update Asset Profile (saveAssetProfile) # noqa: E501 + + Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. Asset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_asset_profile_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssetProfile body: + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_asset_profile_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfile', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetProfile', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_default_asset_profile_using_post(self, asset_profile_id, **kwargs): # noqa: E501 + """Make Asset Profile Default (setDefaultAssetProfile) # noqa: E501 + + Marks asset profile as default within a tenant scope. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_default_asset_profile_using_post(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.set_default_asset_profile_using_post_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + else: + (data) = self.set_default_asset_profile_using_post_with_http_info(asset_profile_id, **kwargs) # noqa: E501 + return data + + def set_default_asset_profile_using_post_with_http_info(self, asset_profile_id, **kwargs): # noqa: E501 + """Make Asset Profile Default (setDefaultAssetProfile) # noqa: E501 + + Marks asset profile as default within a tenant scope. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_default_asset_profile_using_post_with_http_info(asset_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_profile_id: A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: AssetProfile + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_profile_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method set_default_asset_profile_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'asset_profile_id' is set + if ('asset_profile_id' not in params or + params['asset_profile_id'] is None): + raise ValueError("Missing the required parameter `asset_profile_id` when calling `set_default_asset_profile_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_profile_id' in params: + path_params['assetProfileId'] = params['asset_profile_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assetProfile/{assetProfileId}/default', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AssetProfile', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/audit_log_controller_api.py b/tb_rest_client/api/api_pe/audit_log_controller_api.py index df1c22d2..d831c34a 100644 --- a/tb_rest_client/api/api_pe/audit_log_controller_api.py +++ b/tb_rest_client/api/api_pe/audit_log_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -45,7 +45,7 @@ def get_audit_logs_by_customer_id_using_get(self, customer_id, page_size, page, :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -75,7 +75,7 @@ def get_audit_logs_by_customer_id_using_get_with_http_info(self, customer_id, pa :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -181,7 +181,7 @@ def get_audit_logs_by_entity_id_using_get(self, entity_type, entity_id, page_siz :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -212,7 +212,7 @@ def get_audit_logs_by_entity_id_using_get_with_http_info(self, entity_type, enti :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -323,7 +323,7 @@ def get_audit_logs_by_user_id_using_get(self, user_id, page_size, page, **kwargs :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -353,7 +353,7 @@ def get_audit_logs_by_user_id_using_get_with_http_info(self, user_id, page_size, :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -457,7 +457,7 @@ def get_audit_logs_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. @@ -486,7 +486,7 @@ def get_audit_logs_using_get_with_http_info(self, page_size, page, **kwargs): # :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. + :param str text_search: The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus. :param str sort_property: Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged. :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'. diff --git a/tb_rest_client/api/api_pe/auth_controller_api.py b/tb_rest_client/api/api_pe/auth_controller_api.py index de678bda..4dabfac6 100644 --- a/tb_rest_client/api/api_pe/auth_controller_api.py +++ b/tb_rest_client/api/api_pe/auth_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -44,7 +44,7 @@ def activate_user_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param ActivateUserRequest body: :param bool send_activation_mail: sendActivationMail - :return: JWTTokenPair + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -67,7 +67,7 @@ def activate_user_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param ActivateUserRequest body: :param bool send_activation_mail: sendActivationMail - :return: JWTTokenPair + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -123,7 +123,7 @@ def activate_user_using_post_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='JWTTokenPair', # noqa: E501 + response_type='JWTPair', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -783,7 +783,7 @@ def reset_password_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param ResetPasswordRequest body: - :return: JWTTokenPair + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -805,7 +805,7 @@ def reset_password_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param ResetPasswordRequest body: - :return: JWTTokenPair + :return: JWTPair If the method is called asynchronously, returns the request thread. """ @@ -859,7 +859,7 @@ def reset_password_using_post_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='JWTTokenPair', # noqa: E501 + response_type='JWTPair', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_pe/blob_entity_controller_api.py b/tb_rest_client/api/api_pe/blob_entity_controller_api.py index 98e30800..abfab902 100644 --- a/tb_rest_client/api/api_pe/blob_entity_controller_api.py +++ b/tb_rest_client/api/api_pe/blob_entity_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -214,7 +214,7 @@ def download_blob_entity_using_get_with_http_info(self, blob_entity_id, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type=bytes, # noqa: E501 + response_type='Resource', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_pe/component_descriptor_controller_api.py b/tb_rest_client/api/api_pe/component_descriptor_controller_api.py index ae29f446..15b3f85e 100644 --- a/tb_rest_client/api/api_pe/component_descriptor_controller_api.py +++ b/tb_rest_client/api/api_pe/component_descriptor_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/converter_controller_api.py b/tb_rest_client/api/api_pe/converter_controller_api.py index d07ca262..40f481d8 100644 --- a/tb_rest_client/api/api_pe/converter_controller_api.py +++ b/tb_rest_client/api/api_pe/converter_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -534,7 +534,7 @@ def get_latest_converter_debug_input_using_get_with_http_info(self, converter_id def save_converter_using_post(self, **kwargs): # noqa: E501 """Create Or Update Converter (saveConverter) # noqa: E501 - Create or update the Converter. When creating converter, platform generates Converter Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created converter id will be present in the response. Specify existing Converter id to update the converter. Referencing non-existing converter Id will cause 'Not Found' error. Converter name is unique in the scope of tenant. # Converter Configuration Converter configuration (**'configuration'** field) is the JSON object that should contain one of two possible fields: **'decoder'** or **'encoder'**. The former is used when the converter has UPLINK type, the latter is used - when DOWNLINK type. It can contain both 'decoder' and 'encoder' fields, when the correct one is specified for the appropriate converter type, another one can be set to 'null'. See the examples of each one below. ## Uplink Converter Configuration ```json { \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName']\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\", \"encoder\":null } ``` Decoder field in the more readable form: ```text // Decode an uplink message from a buffer // payload - array of bytes // metadata - key/value object /** Decoder **/ // decode payload to string var payloadStr = decodeToString(payload); // decode payload to JSON // var data = decodeToJson(payload); var deviceName = 'Device A'; var deviceType = 'thermostat'; var customerName = 'customer'; var groupName = 'thermostat devices'; // use assetName and assetType instead of deviceName and deviceType // to automatically create assets instead of devices. // var assetName = 'Asset A'; // var assetType = 'building'; // Result object with device/asset attributes/telemetry data var result = { // Use deviceName and deviceType or assetName and assetType, but not both. deviceName: deviceName, deviceType: deviceType, // assetName: assetName, // assetType: assetType, customerName: customerName, groupName: groupName, attributes: { model: 'Model A', serialNumber: 'SN111', integrationName: metadata['integrationName'] }, telemetry: { temperature: 42, humidity: 80, rawData: payloadStr } }; /** Helper functions **/ function decodeToString(payload) { return String.fromCharCode.apply(String, payload); } function decodeToJson(payload) { // covert payload to string. var str = decodeToString(payload); // parse string to JSON var data = JSON.parse(str); return data; } return result; ``` ## Downlink Converter Configuration ```json { \"decoder\":null, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempFreq = msg.temperatureUploadFrequency;\\ndata.humFreq = msg.humidityUploadFrequency;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` Encoder field in the more readable form: ```text // Encode downlink data from incoming Rule Engine message // msg - JSON message payload downlink message json // msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. // metadata - list of key-value pairs with additional data about the message // integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter /** Encoder **/ var data = {}; // Process data from incoming message and metadata data.tempFreq = msg.temperatureUploadFrequency; data.humFreq = msg.humidityUploadFrequency; data.devSerialNumber = metadata['ss_serialNumber']; // Result object with encoded downlink payload var result = { // downlink data content type: JSON, TEXT or BINARY (base64 format) contentType: \"JSON\", // downlink data data: JSON.stringify(data), // Optional metadata object presented in key/value format metadata: { topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload' } }; return result; ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Converter. When creating converter, platform generates Converter Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created converter id will be present in the response. Specify existing Converter id to update the converter. Referencing non-existing converter Id will cause 'Not Found' error. Converter name is unique in the scope of tenant. # Converter Configuration Converter configuration (**'configuration'** field) is the JSON object that should contain one of two possible fields: **'decoder'** or **'encoder'**. The former is used when the converter has UPLINK type, the latter is used - when DOWNLINK type. It can contain both 'decoder' and 'encoder' fields, when the correct one is specified for the appropriate converter type, another one can be set to 'null'. See the examples of each one below. ## Uplink Converter Configuration ```json { \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName']\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\", \"encoder\":null } ``` Decoder field in the more readable form: ```text // Decode an uplink message from a buffer // payload - array of bytes // metadata - key/value object /** Decoder **/ // decode payload to string var payloadStr = decodeToString(payload); // decode payload to JSON // var data = decodeToJson(payload); var deviceName = 'Device A'; var deviceType = 'thermostat'; var customerName = 'customer'; var groupName = 'thermostat devices'; // use assetName and assetType instead of deviceName and deviceType // to automatically create assets instead of devices. // var assetName = 'Asset A'; // var assetType = 'building'; // Result object with device/asset attributes/telemetry data var result = { // Use deviceName and deviceType or assetName and assetType, but not both. deviceName: deviceName, deviceType: deviceType, // assetName: assetName, // assetType: assetType, customerName: customerName, groupName: groupName, attributes: { model: 'Model A', serialNumber: 'SN111', integrationName: metadata['integrationName'] }, telemetry: { temperature: 42, humidity: 80, rawData: payloadStr } }; /** Helper functions **/ function decodeToString(payload) { return String.fromCharCode.apply(String, payload); } function decodeToJson(payload) { // covert payload to string. var str = decodeToString(payload); // parse string to JSON var data = JSON.parse(str); return data; } return result; ``` ## Downlink Converter Configuration ```json { \"decoder\":null, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempFreq = msg.temperatureUploadFrequency;\\ndata.humFreq = msg.humidityUploadFrequency;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` Encoder field in the more readable form: ```text // Encode downlink data from incoming Rule Engine message // msg - JSON message payload downlink message json // msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. // metadata - list of key-value pairs with additional data about the message // integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter /** Encoder **/ var data = {}; // Process data from incoming message and metadata data.tempFreq = msg.temperatureUploadFrequency; data.humFreq = msg.humidityUploadFrequency; data.devSerialNumber = metadata['ss_serialNumber']; // Result object with encoded downlink payload var result = { // downlink data content type: JSON, TEXT or BINARY (base64 format) contentType: \"JSON\", // downlink data data: JSON.stringify(data), // Optional metadata object presented in key/value format metadata: { topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload' } }; return result; ``` Remove 'id', 'tenantId' from the request body example (below) to create new converter entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_converter_using_post(async_req=True) @@ -556,7 +556,7 @@ def save_converter_using_post(self, **kwargs): # noqa: E501 def save_converter_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Converter (saveConverter) # noqa: E501 - Create or update the Converter. When creating converter, platform generates Converter Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created converter id will be present in the response. Specify existing Converter id to update the converter. Referencing non-existing converter Id will cause 'Not Found' error. Converter name is unique in the scope of tenant. # Converter Configuration Converter configuration (**'configuration'** field) is the JSON object that should contain one of two possible fields: **'decoder'** or **'encoder'**. The former is used when the converter has UPLINK type, the latter is used - when DOWNLINK type. It can contain both 'decoder' and 'encoder' fields, when the correct one is specified for the appropriate converter type, another one can be set to 'null'. See the examples of each one below. ## Uplink Converter Configuration ```json { \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName']\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\", \"encoder\":null } ``` Decoder field in the more readable form: ```text // Decode an uplink message from a buffer // payload - array of bytes // metadata - key/value object /** Decoder **/ // decode payload to string var payloadStr = decodeToString(payload); // decode payload to JSON // var data = decodeToJson(payload); var deviceName = 'Device A'; var deviceType = 'thermostat'; var customerName = 'customer'; var groupName = 'thermostat devices'; // use assetName and assetType instead of deviceName and deviceType // to automatically create assets instead of devices. // var assetName = 'Asset A'; // var assetType = 'building'; // Result object with device/asset attributes/telemetry data var result = { // Use deviceName and deviceType or assetName and assetType, but not both. deviceName: deviceName, deviceType: deviceType, // assetName: assetName, // assetType: assetType, customerName: customerName, groupName: groupName, attributes: { model: 'Model A', serialNumber: 'SN111', integrationName: metadata['integrationName'] }, telemetry: { temperature: 42, humidity: 80, rawData: payloadStr } }; /** Helper functions **/ function decodeToString(payload) { return String.fromCharCode.apply(String, payload); } function decodeToJson(payload) { // covert payload to string. var str = decodeToString(payload); // parse string to JSON var data = JSON.parse(str); return data; } return result; ``` ## Downlink Converter Configuration ```json { \"decoder\":null, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempFreq = msg.temperatureUploadFrequency;\\ndata.humFreq = msg.humidityUploadFrequency;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` Encoder field in the more readable form: ```text // Encode downlink data from incoming Rule Engine message // msg - JSON message payload downlink message json // msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. // metadata - list of key-value pairs with additional data about the message // integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter /** Encoder **/ var data = {}; // Process data from incoming message and metadata data.tempFreq = msg.temperatureUploadFrequency; data.humFreq = msg.humidityUploadFrequency; data.devSerialNumber = metadata['ss_serialNumber']; // Result object with encoded downlink payload var result = { // downlink data content type: JSON, TEXT or BINARY (base64 format) contentType: \"JSON\", // downlink data data: JSON.stringify(data), // Optional metadata object presented in key/value format metadata: { topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload' } }; return result; ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Converter. When creating converter, platform generates Converter Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created converter id will be present in the response. Specify existing Converter id to update the converter. Referencing non-existing converter Id will cause 'Not Found' error. Converter name is unique in the scope of tenant. # Converter Configuration Converter configuration (**'configuration'** field) is the JSON object that should contain one of two possible fields: **'decoder'** or **'encoder'**. The former is used when the converter has UPLINK type, the latter is used - when DOWNLINK type. It can contain both 'decoder' and 'encoder' fields, when the correct one is specified for the appropriate converter type, another one can be set to 'null'. See the examples of each one below. ## Uplink Converter Configuration ```json { \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName']\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\", \"encoder\":null } ``` Decoder field in the more readable form: ```text // Decode an uplink message from a buffer // payload - array of bytes // metadata - key/value object /** Decoder **/ // decode payload to string var payloadStr = decodeToString(payload); // decode payload to JSON // var data = decodeToJson(payload); var deviceName = 'Device A'; var deviceType = 'thermostat'; var customerName = 'customer'; var groupName = 'thermostat devices'; // use assetName and assetType instead of deviceName and deviceType // to automatically create assets instead of devices. // var assetName = 'Asset A'; // var assetType = 'building'; // Result object with device/asset attributes/telemetry data var result = { // Use deviceName and deviceType or assetName and assetType, but not both. deviceName: deviceName, deviceType: deviceType, // assetName: assetName, // assetType: assetType, customerName: customerName, groupName: groupName, attributes: { model: 'Model A', serialNumber: 'SN111', integrationName: metadata['integrationName'] }, telemetry: { temperature: 42, humidity: 80, rawData: payloadStr } }; /** Helper functions **/ function decodeToString(payload) { return String.fromCharCode.apply(String, payload); } function decodeToJson(payload) { // covert payload to string. var str = decodeToString(payload); // parse string to JSON var data = JSON.parse(str); return data; } return result; ``` ## Downlink Converter Configuration ```json { \"decoder\":null, \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempFreq = msg.temperatureUploadFrequency;\\ndata.humFreq = msg.humidityUploadFrequency;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\" } ``` Encoder field in the more readable form: ```text // Encode downlink data from incoming Rule Engine message // msg - JSON message payload downlink message json // msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. // metadata - list of key-value pairs with additional data about the message // integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter /** Encoder **/ var data = {}; // Process data from incoming message and metadata data.tempFreq = msg.temperatureUploadFrequency; data.humFreq = msg.humidityUploadFrequency; data.devSerialNumber = metadata['ss_serialNumber']; // Result object with encoded downlink payload var result = { // downlink data content type: JSON, TEXT or BINARY (base64 format) contentType: \"JSON\", // downlink data data: JSON.stringify(data), // Optional metadata object presented in key/value format metadata: { topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload' } }; return result; ``` Remove 'id', 'tenantId' from the request body example (below) to create new converter entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_converter_using_post_with_http_info(async_req=True) @@ -637,6 +637,7 @@ def test_down_link_converter_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param JsonNode body: + :param str script_lang: Script language: JS or TBEL :return: JsonNode If the method is called asynchronously, returns the request thread. @@ -659,12 +660,13 @@ def test_down_link_converter_using_post_with_http_info(self, **kwargs): # noqa: :param async_req bool :param JsonNode body: + :param str script_lang: Script language: JS or TBEL :return: JsonNode If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['body', 'script_lang'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -685,6 +687,8 @@ def test_down_link_converter_using_post_with_http_info(self, **kwargs): # noqa: path_params = {} query_params = [] + if 'script_lang' in params: + query_params.append(('scriptLang', params['script_lang'])) # noqa: E501 header_params = {} @@ -706,7 +710,7 @@ def test_down_link_converter_using_post_with_http_info(self, **kwargs): # noqa: auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/converter/testDownLink', 'POST', + '/api/converter/testDownLink{?scriptLang}', 'POST', path_params, query_params, header_params, @@ -732,6 +736,7 @@ def test_up_link_converter_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param JsonNode body: + :param str script_lang: Script language: JS or TBEL :return: JsonNode If the method is called asynchronously, returns the request thread. @@ -754,12 +759,13 @@ def test_up_link_converter_using_post_with_http_info(self, **kwargs): # noqa: E :param async_req bool :param JsonNode body: + :param str script_lang: Script language: JS or TBEL :return: JsonNode If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['body', 'script_lang'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -780,6 +786,8 @@ def test_up_link_converter_using_post_with_http_info(self, **kwargs): # noqa: E path_params = {} query_params = [] + if 'script_lang' in params: + query_params.append(('scriptLang', params['script_lang'])) # noqa: E501 header_params = {} @@ -801,7 +809,7 @@ def test_up_link_converter_using_post_with_http_info(self, **kwargs): # noqa: E auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/converter/testUpLink', 'POST', + '/api/converter/testUpLink{?scriptLang}', 'POST', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_pe/custom_menu_controller_api.py b/tb_rest_client/api/api_pe/custom_menu_controller_api.py index 53b07b52..d9ac964d 100644 --- a/tb_rest_client/api/api_pe/custom_menu_controller_api.py +++ b/tb_rest_client/api/api_pe/custom_menu_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/custom_translation_controller_api.py b/tb_rest_client/api/api_pe/custom_translation_controller_api.py index f754cfae..7b78aa19 100644 --- a/tb_rest_client/api/api_pe/custom_translation_controller_api.py +++ b/tb_rest_client/api/api_pe/custom_translation_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/customer_controller_api.py b/tb_rest_client/api/api_pe/customer_controller_api.py index 03e96d84..96014df8 100644 --- a/tb_rest_client/api/api_pe/customer_controller_api.py +++ b/tb_rest_client/api/api_pe/customer_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -127,6 +127,125 @@ def delete_customer_using_delete_with_http_info(self, customer_id, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_all_customer_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get All Customer Infos for current user (getAllCustomerInfos) # noqa: E501 + + Returns a page of customer info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_customer_infos_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the customer title. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataCustomerInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_all_customer_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_all_customer_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_all_customer_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get All Customer Infos for current user (getAllCustomerInfos) # noqa: E501 + + Returns a page of customer info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_customer_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the customer title. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataCustomerInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'include_customers', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_customer_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_all_customer_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_all_customer_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customerInfos/all{?includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataCustomerInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_customer_by_id_using_get(self, customer_id, **kwargs): # noqa: E501 """Get Customer (getCustomerById) # noqa: E501 @@ -222,6 +341,228 @@ def get_customer_by_id_using_get_with_http_info(self, customer_id, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_customer_customer_infos_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer sub-customers Infos (getCustomerCustomerInfos) # noqa: E501 + + Returns a page of customer info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_customer_infos_using_get(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the customer title. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataCustomerInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_customer_customer_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_customer_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_customer_customer_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer sub-customers Infos (getCustomerCustomerInfos) # noqa: E501 + + Returns a page of customer info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_customer_infos_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the customer title. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataCustomerInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['customer_id', 'page_size', 'page', 'include_customers', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer_customer_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'customer_id' is set + if ('customer_id' not in params or + params['customer_id'] is None): + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_customer_infos_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_customer_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_customer_customer_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/customerInfos{?includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataCustomerInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_customer_info_by_id_using_get(self, customer_id, **kwargs): # noqa: E501 + """Get Customer info (getCustomerInfoById) # noqa: E501 + + Get the Customer info object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_info_by_id_using_get(customer_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: CustomerInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_customer_info_by_id_using_get_with_http_info(customer_id, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_info_by_id_using_get_with_http_info(customer_id, **kwargs) # noqa: E501 + return data + + def get_customer_info_by_id_using_get_with_http_info(self, customer_id, **kwargs): # noqa: E501 + """Get Customer info (getCustomerInfoById) # noqa: E501 + + Get the Customer info object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_info_by_id_using_get_with_http_info(customer_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: CustomerInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['customer_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer_info_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'customer_id' is set + if ('customer_id' not in params or + params['customer_id'] is None): + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/info/{customerId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CustomerInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_customer_title_by_id_using_get(self, customer_id, **kwargs): # noqa: E501 """Get Customer Title (getCustomerTitleById) # noqa: E501 @@ -296,7 +637,7 @@ def get_customer_title_by_id_using_get_with_http_info(self, customer_id, **kwarg body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/text']) # noqa: E501 + ['application/text', 'application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 @@ -547,7 +888,7 @@ def get_customers_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the customer title. + :param str text_search: The case insensitive 'substring' filter based on the customer title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataCustomer @@ -573,7 +914,7 @@ def get_customers_using_get_with_http_info(self, page_size, page, **kwargs): # :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the customer title. + :param str text_search: The case insensitive 'substring' filter based on the customer title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataCustomer @@ -958,7 +1299,7 @@ def get_user_customers_using_get_with_http_info(self, page_size, page, **kwargs) def save_customer_using_post(self, **kwargs): # noqa: E501 """Create or update Customer (saveCustomer) # noqa: E501 - Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Customer entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_customer_using_post(async_req=True) @@ -967,6 +1308,7 @@ def save_customer_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param Customer body: :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group. + :param str entity_group_ids: A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups. :return: Customer If the method is called asynchronously, returns the request thread. @@ -981,7 +1323,7 @@ def save_customer_using_post(self, **kwargs): # noqa: E501 def save_customer_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create or update Customer (saveCustomer) # noqa: E501 - Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Customer entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_customer_using_post_with_http_info(async_req=True) @@ -990,12 +1332,13 @@ def save_customer_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param Customer body: :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group. + :param str entity_group_ids: A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups. :return: Customer If the method is called asynchronously, returns the request thread. """ - all_params = ['body', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'entity_group_id', 'entity_group_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1018,6 +1361,8 @@ def save_customer_using_post_with_http_info(self, **kwargs): # noqa: E501 query_params = [] if 'entity_group_id' in params: query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 + if 'entity_group_ids' in params: + query_params.append(('entityGroupIds', params['entity_group_ids'])) # noqa: E501 header_params = {} @@ -1039,7 +1384,7 @@ def save_customer_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/customer{?entityGroupId}', 'POST', + '/api/customer{?entityGroupId,entityGroupIds}', 'POST', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_pe/dashboard_controller_api.py b/tb_rest_client/api/api_pe/dashboard_controller_api.py index 755276c6..c7bf17cb 100644 --- a/tb_rest_client/api/api_pe/dashboard_controller_api.py +++ b/tb_rest_client/api/api_pe/dashboard_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -42,7 +42,7 @@ def delete_dashboard_using_delete(self, dashboard_id, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: None If the method is called asynchronously, returns the request thread. @@ -64,7 +64,7 @@ def delete_dashboard_using_delete_with_http_info(self, dashboard_id, **kwargs): >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: None If the method is called asynchronously, returns the request thread. @@ -230,6 +230,252 @@ def export_group_dashboards_using_get_with_http_info(self, entity_group_id, limi _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_all_dashboards_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get All Dashboards for current user (getAllDashboards) # noqa: E501 + + Returns a page of dashboard info objects owned by the tenant or the customer of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_dashboards_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataDashboardInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_all_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_all_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_all_dashboards_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get All Dashboards for current user (getAllDashboards) # noqa: E501 + + Returns a page of dashboard info objects owned by the tenant or the customer of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_dashboards_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataDashboardInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'include_customers', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_dashboards_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_all_dashboards_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_all_dashboards_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/dashboards/all{?includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataDashboardInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_customer_dashboards_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Dashboards (getCustomerDashboards) # noqa: E501 + + Returns a page of dashboard info objects owned by the specified customer. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_dashboards_using_get(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataDashboardInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_customer_dashboards_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_dashboards_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_customer_dashboards_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Dashboards (getCustomerDashboards) # noqa: E501 + + Returns a page of dashboard info objects owned by the specified customer. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_dashboards_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataDashboardInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['customer_id', 'page_size', 'page', 'include_customers', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer_dashboards_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'customer_id' is set + if ('customer_id' not in params or + params['customer_id'] is None): + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_dashboards_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_dashboards_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_customer_dashboards_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/dashboards{?includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataDashboardInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_customer_home_dashboard_info_using_get(self, **kwargs): # noqa: E501 """Get Customer Home Dashboard Info (getCustomerHomeDashboardInfo) # noqa: E501 @@ -327,7 +573,7 @@ def get_dashboard_by_id_using_get(self, dashboard_id, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -349,7 +595,7 @@ def get_dashboard_by_id_using_get_with_http_info(self, dashboard_id, **kwargs): >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -422,7 +668,7 @@ def get_dashboard_info_by_id_using_get(self, dashboard_id, **kwargs): # noqa: E >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: DashboardInfo If the method is called asynchronously, returns the request thread. @@ -444,7 +690,7 @@ def get_dashboard_info_by_id_using_get_with_http_info(self, dashboard_id, **kwar >>> result = thread.get() :param async_req bool - :param str dashboard_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :return: DashboardInfo If the method is called asynchronously, returns the request thread. @@ -520,7 +766,7 @@ def get_dashboards_by_entity_group_id_using_get(self, entity_group_id, page_size :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -547,7 +793,7 @@ def get_dashboards_by_entity_group_id_using_get_with_http_info(self, entity_grou :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -1086,7 +1332,7 @@ def get_tenant_dashboards_using_get(self, page_size, page, **kwargs): # noqa: E :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param bool mobile: Exclude dashboards that are hidden for mobile - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -1113,7 +1359,7 @@ def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwar :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param bool mobile: Exclude dashboards that are hidden for mobile - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -1205,7 +1451,7 @@ def get_tenant_dashboards_using_get1(self, tenant_id, page_size, page, **kwargs) :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -1232,7 +1478,7 @@ def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDashboardInfo @@ -1415,7 +1661,7 @@ def get_user_dashboards_using_get(self, page_size, page, **kwargs): # noqa: E50 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param bool mobile: Exclude dashboards that are hidden for mobile - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param str operation: Filter by allowed operations for the current user @@ -1444,7 +1690,7 @@ def get_user_dashboards_using_get_with_http_info(self, page_size, page, **kwargs :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param bool mobile: Exclude dashboards that are hidden for mobile - :param str text_search: The case insensitive 'startsWith' filter based on the dashboard title. + :param str text_search: The case insensitive 'substring' filter based on the dashboard title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param str operation: Filter by allowed operations for the current user @@ -1639,7 +1885,7 @@ def import_group_dashboards_using_post_with_http_info(self, entity_group_id, **k def save_dashboard_using_post(self, **kwargs): # noqa: E501 """Create Or Update Dashboard (saveDashboard) # noqa: E501 - Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Only users with 'TENANT_ADMIN') authority may create the dashboards. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Only users with 'TENANT_ADMIN') authority may create the dashboards.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Dashboard entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_dashboard_using_post(async_req=True) @@ -1648,6 +1894,7 @@ def save_dashboard_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param Dashboard body: :param str entity_group_id: entityGroupId + :param str entity_group_ids: entityGroupIds :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -1662,7 +1909,7 @@ def save_dashboard_using_post(self, **kwargs): # noqa: E501 def save_dashboard_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Dashboard (saveDashboard) # noqa: E501 - Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Only users with 'TENANT_ADMIN') authority may create the dashboards. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Only users with 'TENANT_ADMIN') authority may create the dashboards.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Dashboard entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_dashboard_using_post_with_http_info(async_req=True) @@ -1671,12 +1918,13 @@ def save_dashboard_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param Dashboard body: :param str entity_group_id: entityGroupId + :param str entity_group_ids: entityGroupIds :return: Dashboard If the method is called asynchronously, returns the request thread. """ - all_params = ['body', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'entity_group_id', 'entity_group_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1699,6 +1947,8 @@ def save_dashboard_using_post_with_http_info(self, **kwargs): # noqa: E501 query_params = [] if 'entity_group_id' in params: query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 + if 'entity_group_ids' in params: + query_params.append(('entityGroupIds', params['entity_group_ids'])) # noqa: E501 header_params = {} @@ -1720,7 +1970,7 @@ def save_dashboard_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/dashboard{?entityGroupId}', 'POST', + '/api/dashboard{?entityGroupId,entityGroupIds}', 'POST', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_pe/device_api_controller_api.py b/tb_rest_client/api/api_pe/device_api_controller_api.py new file mode 100644 index 00000000..9638f481 --- /dev/null +++ b/tb_rest_client/api/api_pe/device_api_controller_api.py @@ -0,0 +1,1198 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class DeviceApiControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def claim_device_using_post(self, device_token, **kwargs): # noqa: E501 + """Save claiming information (claimDevice) # noqa: E501 + + Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.claim_device_using_post(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.claim_device_using_post_with_http_info(device_token, **kwargs) # noqa: E501 + else: + (data) = self.claim_device_using_post_with_http_info(device_token, **kwargs) # noqa: E501 + return data + + def claim_device_using_post_with_http_info(self, device_token, **kwargs): # noqa: E501 + """Save claiming information (claimDevice) # noqa: E501 + + Saves the information required for user to claim the device. See more info about claiming in the corresponding 'Claiming devices' platform documentation. Example of the request payload: ```json {\"secretKey\":\"value\", \"durationMs\":60000} ``` Note: both 'secretKey' and 'durationMs' is optional parameters. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.claim_device_using_post_with_http_info(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_token', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method claim_device_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_token' is set + if ('device_token' not in params or + params['device_token'] is None): + raise ValueError("Missing the required parameter `device_token` when calling `claim_device_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_token' in params: + path_params['deviceToken'] = params['device_token'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/{deviceToken}/claim', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_device_attributes_using_get(self, device_token, client_keys, shared_keys, **kwargs): # noqa: E501 + """Get attributes (getDeviceAttributes) # noqa: E501 + + Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_device_attributes_using_get(device_token, client_keys, shared_keys, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str client_keys: Comma separated key names for attribute with client scope (required) + :param str shared_keys: Comma separated key names for attribute with shared scope (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_device_attributes_using_get_with_http_info(device_token, client_keys, shared_keys, **kwargs) # noqa: E501 + else: + (data) = self.get_device_attributes_using_get_with_http_info(device_token, client_keys, shared_keys, **kwargs) # noqa: E501 + return data + + def get_device_attributes_using_get_with_http_info(self, device_token, client_keys, shared_keys, **kwargs): # noqa: E501 + """Get attributes (getDeviceAttributes) # noqa: E501 + + Returns all attributes that belong to device. Use optional 'clientKeys' and/or 'sharedKeys' parameter to return specific attributes. Example of the result: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_device_attributes_using_get_with_http_info(device_token, client_keys, shared_keys, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str client_keys: Comma separated key names for attribute with client scope (required) + :param str shared_keys: Comma separated key names for attribute with shared scope (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_token', 'client_keys', 'shared_keys'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_device_attributes_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_token' is set + if ('device_token' not in params or + params['device_token'] is None): + raise ValueError("Missing the required parameter `device_token` when calling `get_device_attributes_using_get`") # noqa: E501 + # verify the required parameter 'client_keys' is set + if ('client_keys' not in params or + params['client_keys'] is None): + raise ValueError("Missing the required parameter `client_keys` when calling `get_device_attributes_using_get`") # noqa: E501 + # verify the required parameter 'shared_keys' is set + if ('shared_keys' not in params or + params['shared_keys'] is None): + raise ValueError("Missing the required parameter `shared_keys` when calling `get_device_attributes_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_token' in params: + path_params['deviceToken'] = params['device_token'] # noqa: E501 + + query_params = [] + if 'client_keys' in params: + query_params.append(('clientKeys', params['client_keys'])) # noqa: E501 + if 'shared_keys' in params: + query_params.append(('sharedKeys', params['shared_keys'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/{deviceToken}/attributes{?clientKeys,sharedKeys}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_firmware_using_get(self, device_token, title, version, **kwargs): # noqa: E501 + """Get Device Firmware (getFirmware) # noqa: E501 + + Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_firmware_using_get(device_token, title, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str title: Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + :param str version: Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + :param int size: Size of the chunk. Optional. Omit to download the entire file without chunks. + :param int chunk: Index of the chunk. Optional. Omit to download the entire file without chunks. + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_firmware_using_get_with_http_info(device_token, title, version, **kwargs) # noqa: E501 + else: + (data) = self.get_firmware_using_get_with_http_info(device_token, title, version, **kwargs) # noqa: E501 + return data + + def get_firmware_using_get_with_http_info(self, device_token, title, version, **kwargs): # noqa: E501 + """Get Device Firmware (getFirmware) # noqa: E501 + + Downloads the current firmware package.When the platform initiates firmware update, it informs the device by updating the 'fw_title', 'fw_version', 'fw_checksum' and 'fw_checksum_algorithm' shared attributes.The 'fw_title' and 'fw_version' parameters must be supplied in this request to double-check that the firmware that device is downloading matches the firmware it expects to download. This is important, since the administrator may change the firmware assignment while device is downloading the firmware. Optional 'chunk' and 'size' parameters may be used to download the firmware in chunks. For example, device may request first 16 KB of firmware using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_firmware_using_get_with_http_info(device_token, title, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str title: Title of the firmware, corresponds to the value of 'fw_title' attribute. (required) + :param str version: Version of the firmware, corresponds to the value of 'fw_version' attribute. (required) + :param int size: Size of the chunk. Optional. Omit to download the entire file without chunks. + :param int chunk: Index of the chunk. Optional. Omit to download the entire file without chunks. + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_token', 'title', 'version', 'size', 'chunk'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_firmware_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_token' is set + if ('device_token' not in params or + params['device_token'] is None): + raise ValueError("Missing the required parameter `device_token` when calling `get_firmware_using_get`") # noqa: E501 + # verify the required parameter 'title' is set + if ('title' not in params or + params['title'] is None): + raise ValueError("Missing the required parameter `title` when calling `get_firmware_using_get`") # noqa: E501 + # verify the required parameter 'version' is set + if ('version' not in params or + params['version'] is None): + raise ValueError("Missing the required parameter `version` when calling `get_firmware_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_token' in params: + path_params['deviceToken'] = params['device_token'] # noqa: E501 + + query_params = [] + if 'title' in params: + query_params.append(('title', params['title'])) # noqa: E501 + if 'version' in params: + query_params.append(('version', params['version'])) # noqa: E501 + if 'size' in params: + query_params.append(('size', params['size'])) # noqa: E501 + if 'chunk' in params: + query_params.append(('chunk', params['chunk'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/{deviceToken}/firmware{?chunk,size,title,version}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_software_using_get(self, device_token, title, version, **kwargs): # noqa: E501 + """Get Device Software (getSoftware) # noqa: E501 + + Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_software_using_get(device_token, title, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str title: Title of the software, corresponds to the value of 'sw_title' attribute. (required) + :param str version: Version of the software, corresponds to the value of 'sw_version' attribute. (required) + :param int size: Size of the chunk. Optional. Omit to download the entire file without using chunks. + :param int chunk: Index of the chunk. Optional. Omit to download the entire file without using chunks. + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_software_using_get_with_http_info(device_token, title, version, **kwargs) # noqa: E501 + else: + (data) = self.get_software_using_get_with_http_info(device_token, title, version, **kwargs) # noqa: E501 + return data + + def get_software_using_get_with_http_info(self, device_token, title, version, **kwargs): # noqa: E501 + """Get Device Software (getSoftware) # noqa: E501 + + Downloads the current software package.When the platform initiates software update, it informs the device by updating the 'sw_title', 'sw_version', 'sw_checksum' and 'sw_checksum_algorithm' shared attributes.The 'sw_title' and 'sw_version' parameters must be supplied in this request to double-check that the software that device is downloading matches the software it expects to download. This is important, since the administrator may change the software assignment while device is downloading the software. Optional 'chunk' and 'size' parameters may be used to download the software in chunks. For example, device may request first 16 KB of software using 'chunk'=0 and 'size'=16384. Next 16KB using 'chunk'=1 and 'size'=16384. The last chunk should have less bytes then requested using 'size' parameter. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_software_using_get_with_http_info(device_token, title, version, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str title: Title of the software, corresponds to the value of 'sw_title' attribute. (required) + :param str version: Version of the software, corresponds to the value of 'sw_version' attribute. (required) + :param int size: Size of the chunk. Optional. Omit to download the entire file without using chunks. + :param int chunk: Index of the chunk. Optional. Omit to download the entire file without using chunks. + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_token', 'title', 'version', 'size', 'chunk'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_software_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_token' is set + if ('device_token' not in params or + params['device_token'] is None): + raise ValueError("Missing the required parameter `device_token` when calling `get_software_using_get`") # noqa: E501 + # verify the required parameter 'title' is set + if ('title' not in params or + params['title'] is None): + raise ValueError("Missing the required parameter `title` when calling `get_software_using_get`") # noqa: E501 + # verify the required parameter 'version' is set + if ('version' not in params or + params['version'] is None): + raise ValueError("Missing the required parameter `version` when calling `get_software_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_token' in params: + path_params['deviceToken'] = params['device_token'] # noqa: E501 + + query_params = [] + if 'title' in params: + query_params.append(('title', params['title'])) # noqa: E501 + if 'version' in params: + query_params.append(('version', params['version'])) # noqa: E501 + if 'size' in params: + query_params.append(('size', params['size'])) # noqa: E501 + if 'chunk' in params: + query_params.append(('chunk', params['chunk'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/{deviceToken}/software{?chunk,size,title,version}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def post_device_attributes_using_post(self, device_token, **kwargs): # noqa: E501 + """Post attributes (postDeviceAttributes) # noqa: E501 + + Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_device_attributes_using_post(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.post_device_attributes_using_post_with_http_info(device_token, **kwargs) # noqa: E501 + else: + (data) = self.post_device_attributes_using_post_with_http_info(device_token, **kwargs) # noqa: E501 + return data + + def post_device_attributes_using_post_with_http_info(self, device_token, **kwargs): # noqa: E501 + """Post attributes (postDeviceAttributes) # noqa: E501 + + Post client attribute updates on behalf of device. Example of the request: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_device_attributes_using_post_with_http_info(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_token', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method post_device_attributes_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_token' is set + if ('device_token' not in params or + params['device_token'] is None): + raise ValueError("Missing the required parameter `device_token` when calling `post_device_attributes_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_token' in params: + path_params['deviceToken'] = params['device_token'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/{deviceToken}/attributes', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def post_rpc_request_using_post(self, device_token, **kwargs): # noqa: E501 + """Send the RPC command (postRpcRequest) # noqa: E501 + + Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_rpc_request_using_post(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.post_rpc_request_using_post_with_http_info(device_token, **kwargs) # noqa: E501 + else: + (data) = self.post_rpc_request_using_post_with_http_info(device_token, **kwargs) # noqa: E501 + return data + + def post_rpc_request_using_post_with_http_info(self, device_token, **kwargs): # noqa: E501 + """Send the RPC command (postRpcRequest) # noqa: E501 + + Send the RPC request to server. The request payload is a JSON document that contains 'method' and 'params'. For example: ```json {\"method\": \"sumOnServer\", \"params\":{\"a\":2, \"b\":2}} ``` The response contains arbitrary JSON with the RPC reply. For example: ```json {\"result\": 4} ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_rpc_request_using_post_with_http_info(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_token', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method post_rpc_request_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_token' is set + if ('device_token' not in params or + params['device_token'] is None): + raise ValueError("Missing the required parameter `device_token` when calling `post_rpc_request_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_token' in params: + path_params['deviceToken'] = params['device_token'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/{deviceToken}/rpc', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def post_telemetry_using_post(self, device_token, **kwargs): # noqa: E501 + """Post time-series data (postTelemetry) # noqa: E501 + + Post time-series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_telemetry_using_post(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.post_telemetry_using_post_with_http_info(device_token, **kwargs) # noqa: E501 + else: + (data) = self.post_telemetry_using_post_with_http_info(device_token, **kwargs) # noqa: E501 + return data + + def post_telemetry_using_post_with_http_info(self, device_token, **kwargs): # noqa: E501 + """Post time-series data (postTelemetry) # noqa: E501 + + Post time-series data on behalf of device. Example of the request: The request payload is a JSON document with three possible formats: Simple format without timestamp. In such a case, current server time will be used: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Single JSON object with timestamp: ```json {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}} ``` JSON array with timestamps: ```json [ {\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}} ] ``` The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_telemetry_using_post_with_http_info(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_token', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method post_telemetry_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_token' is set + if ('device_token' not in params or + params['device_token'] is None): + raise ValueError("Missing the required parameter `device_token` when calling `post_telemetry_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_token' in params: + path_params['deviceToken'] = params['device_token'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/{deviceToken}/telemetry', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def provision_device_using_post(self, **kwargs): # noqa: E501 + """Provision new device (provisionDevice) # noqa: E501 + + Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.provision_device_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.provision_device_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.provision_device_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def provision_device_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Provision new device (provisionDevice) # noqa: E501 + + Exchange the provision request to the device credentials. See more info about provisioning in the corresponding 'Device provisioning' platform documentation.Requires valid JSON request with the following format: ```json { \"deviceName\": \"NEW_DEVICE_NAME\", \"provisionDeviceKey\": \"u7piawkboq8v32dmcmpp\", \"provisionDeviceSecret\": \"jpmwdn8ptlswmf4m29bw\" } ``` Where 'deviceName' is the name of enw or existing device which depends on the provisioning strategy. The 'provisionDeviceKey' and 'provisionDeviceSecret' matches info configured in one of the existing device profiles. The result of the successful call is the JSON object that contains new credentials: ```json { \"credentialsType\":\"ACCESS_TOKEN\", \"credentialsValue\":\"DEVICE_ACCESS_TOKEN\", \"status\":\"SUCCESS\" } ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.provision_device_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method provision_device_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/provision', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def reply_to_command_using_post(self, device_token, request_id, **kwargs): # noqa: E501 + """Reply to RPC commands (replyToCommand) # noqa: E501 + + Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reply_to_command_using_post(device_token, request_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param int request_id: RPC request id from the incoming RPC request (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.reply_to_command_using_post_with_http_info(device_token, request_id, **kwargs) # noqa: E501 + else: + (data) = self.reply_to_command_using_post_with_http_info(device_token, request_id, **kwargs) # noqa: E501 + return data + + def reply_to_command_using_post_with_http_info(self, device_token, request_id, **kwargs): # noqa: E501 + """Reply to RPC commands (replyToCommand) # noqa: E501 + + Replies to server originated RPC command identified by 'requestId' parameter. The response is arbitrary JSON. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reply_to_command_using_post_with_http_info(device_token, request_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param int request_id: RPC request id from the incoming RPC request (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_token', 'request_id', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method reply_to_command_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_token' is set + if ('device_token' not in params or + params['device_token'] is None): + raise ValueError("Missing the required parameter `device_token` when calling `reply_to_command_using_post`") # noqa: E501 + # verify the required parameter 'request_id' is set + if ('request_id' not in params or + params['request_id'] is None): + raise ValueError("Missing the required parameter `request_id` when calling `reply_to_command_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_token' in params: + path_params['deviceToken'] = params['device_token'] # noqa: E501 + if 'request_id' in params: + path_params['requestId'] = params['request_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/{deviceToken}/rpc/{requestId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def subscribe_to_attributes_using_get(self, device_token, **kwargs): # noqa: E501 + """Subscribe to attribute updates (subscribeToAttributes) (Deprecated) # noqa: E501 + + Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.subscribe_to_attributes_using_get(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param int timeout: Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.subscribe_to_attributes_using_get_with_http_info(device_token, **kwargs) # noqa: E501 + else: + (data) = self.subscribe_to_attributes_using_get_with_http_info(device_token, **kwargs) # noqa: E501 + return data + + def subscribe_to_attributes_using_get_with_http_info(self, device_token, **kwargs): # noqa: E501 + """Subscribe to attribute updates (subscribeToAttributes) (Deprecated) # noqa: E501 + + Subscribes to client and shared scope attribute updates using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.subscribe_to_attributes_using_get_with_http_info(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param int timeout: Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_token', 'timeout'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method subscribe_to_attributes_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_token' is set + if ('device_token' not in params or + params['device_token'] is None): + raise ValueError("Missing the required parameter `device_token` when calling `subscribe_to_attributes_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_token' in params: + path_params['deviceToken'] = params['device_token'] # noqa: E501 + + query_params = [] + if 'timeout' in params: + query_params.append(('timeout', params['timeout'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/{deviceToken}/attributes/updates{?timeout}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def subscribe_to_commands_using_get(self, device_token, **kwargs): # noqa: E501 + """Subscribe to RPC commands (subscribeToCommands) (Deprecated) # noqa: E501 + + Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.subscribe_to_commands_using_get(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param int timeout: Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.subscribe_to_commands_using_get_with_http_info(device_token, **kwargs) # noqa: E501 + else: + (data) = self.subscribe_to_commands_using_get_with_http_info(device_token, **kwargs) # noqa: E501 + return data + + def subscribe_to_commands_using_get_with_http_info(self, device_token, **kwargs): # noqa: E501 + """Subscribe to RPC commands (subscribeToCommands) (Deprecated) # noqa: E501 + + Subscribes to RPC commands using http long polling. Deprecated, since long polling is resource and network consuming. Consider using MQTT or CoAP protocol for light-weight real-time updates. The API call is designed to be used by device firmware and requires device access token ('deviceToken'). It is not recommended to use this API call by third-party scripts, rule-engine or platform widgets (use 'Telemetry Controller' instead). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.subscribe_to_commands_using_get_with_http_info(device_token, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_token: Your device access token. (required) + :param int timeout: Optional timeout of the long poll. Typically less then 60 seconds, since limited on the server side. + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_token', 'timeout'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method subscribe_to_commands_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_token' is set + if ('device_token' not in params or + params['device_token'] is None): + raise ValueError("Missing the required parameter `device_token` when calling `subscribe_to_commands_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_token' in params: + path_params['deviceToken'] = params['device_token'] # noqa: E501 + + query_params = [] + if 'timeout' in params: + query_params.append(('timeout', params['timeout'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v1/{deviceToken}/rpc{?timeout}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/device_controller_api.py b/tb_rest_client/api/api_pe/device_controller_api.py index 6236bd72..19b64b58 100644 --- a/tb_rest_client/api/api_pe/device_controller_api.py +++ b/tb_rest_client/api/api_pe/device_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -135,13 +135,13 @@ def assign_device_to_tenant_using_post_with_http_info(self, tenant_id, device_id _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def claim_device_using_post(self, device_name, **kwargs): # noqa: E501 + def claim_device_using_post1(self, device_name, **kwargs): # noqa: E501 """Claim device (claimDevice) # noqa: E501 Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming. Available for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.claim_device_using_post(device_name, async_req=True) + >>> thread = api.claim_device_using_post1(device_name, async_req=True) >>> result = thread.get() :param async_req bool @@ -154,18 +154,18 @@ def claim_device_using_post(self, device_name, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.claim_device_using_post_with_http_info(device_name, **kwargs) # noqa: E501 + return self.claim_device_using_post1_with_http_info(device_name, **kwargs) # noqa: E501 else: - (data) = self.claim_device_using_post_with_http_info(device_name, **kwargs) # noqa: E501 + (data) = self.claim_device_using_post1_with_http_info(device_name, **kwargs) # noqa: E501 return data - def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa: E501 + def claim_device_using_post1_with_http_info(self, device_name, **kwargs): # noqa: E501 """Claim device (claimDevice) # noqa: E501 Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming. Available for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.claim_device_using_post_with_http_info(device_name, async_req=True) + >>> thread = api.claim_device_using_post1_with_http_info(device_name, async_req=True) >>> result = thread.get() :param async_req bool @@ -188,14 +188,14 @@ def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method claim_device_using_post" % key + " to method claim_device_using_post1" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'device_name' is set if ('device_name' not in params or params['device_name'] is None): - raise ValueError("Missing the required parameter `device_name` when calling `claim_device_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `device_name` when calling `claim_device_using_post1`") # noqa: E501 collection_formats = {} @@ -646,6 +646,268 @@ def find_by_query_using_post1_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_all_device_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get All Device Infos for current user (getAllDeviceInfos) # noqa: E501 + + Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_device_infos_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str device_profile_id: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param bool active: A boolean value representing the device active flag. + :param str text_search: The case insensitive 'substring' filter based on the device name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataDeviceInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_all_device_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_all_device_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_all_device_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get All Device Infos for current user (getAllDeviceInfos) # noqa: E501 + + Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_device_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str device_profile_id: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param bool active: A boolean value representing the device active flag. + :param str text_search: The case insensitive 'substring' filter based on the device name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataDeviceInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'include_customers', 'device_profile_id', 'active', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_device_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_all_device_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_all_device_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'device_profile_id' in params: + query_params.append(('deviceProfileId', params['device_profile_id'])) # noqa: E501 + if 'active' in params: + query_params.append(('active', params['active'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/deviceInfos/all{?active,deviceProfileId,includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataDeviceInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_customer_device_infos_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Device Infos (getCustomerDeviceInfos) # noqa: E501 + + Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_device_infos_using_get(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str device_profile_id: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param bool active: A boolean value representing the device active flag. + :param str text_search: The case insensitive 'substring' filter based on the device name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataDeviceInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_customer_device_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_device_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_customer_device_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Device Infos (getCustomerDeviceInfos) # noqa: E501 + + Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_device_infos_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str device_profile_id: A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :param bool active: A boolean value representing the device active flag. + :param str text_search: The case insensitive 'substring' filter based on the device name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataDeviceInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['customer_id', 'page_size', 'page', 'include_customers', 'device_profile_id', 'active', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer_device_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'customer_id' is set + if ('customer_id' not in params or + params['customer_id'] is None): + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_device_infos_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_device_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_customer_device_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'device_profile_id' in params: + query_params.append(('deviceProfileId', params['device_profile_id'])) # noqa: E501 + if 'active' in params: + query_params.append(('active', params['active'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/deviceInfos{?active,deviceProfileId,includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataDeviceInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_customer_devices_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 """Get Customer Devices (getCustomerDevices) # noqa: E501 @@ -660,7 +922,7 @@ def get_customer_devices_using_get(self, customer_id, page_size, page, **kwargs) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -688,7 +950,7 @@ def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -963,6 +1225,101 @@ def get_device_credentials_by_device_id_using_get_with_http_info(self, device_id _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_device_info_by_id_using_get(self, device_id, **kwargs): # noqa: E501 + """Get Device (getDeviceInfoById) # noqa: E501 + + Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_device_info_by_id_using_get(device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: DeviceInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_device_info_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 + else: + (data) = self.get_device_info_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 + return data + + def get_device_info_by_id_using_get_with_http_info(self, device_id, **kwargs): # noqa: E501 + """Get Device (getDeviceInfoById) # noqa: E501 + + Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_device_info_by_id_using_get_with_http_info(device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: DeviceInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_device_info_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_id' is set + if ('device_id' not in params or + params['device_id'] is None): + raise ValueError("Missing the required parameter `device_id` when calling `get_device_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_id' in params: + path_params['deviceId'] = params['device_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/device/info/{deviceId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeviceInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_device_types_using_get(self, **kwargs): # noqa: E501 """Get Device Types (getDeviceTypes) # noqa: E501 @@ -1063,7 +1420,7 @@ def get_devices_by_entity_group_id_using_get(self, entity_group_id, page_size, p :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -1090,7 +1447,7 @@ def get_devices_by_entity_group_id_using_get_with_http_info(self, entity_group_i :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -1376,7 +1733,7 @@ def get_tenant_devices_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -1403,7 +1760,7 @@ def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -1495,7 +1852,7 @@ def get_user_devices_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -1522,7 +1879,7 @@ def get_user_devices_using_get_with_http_info(self, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Device type as the name of the device profile - :param str text_search: The case insensitive 'startsWith' filter based on the device name. + :param str text_search: The case insensitive 'substring' filter based on the device name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDevice @@ -1794,7 +2151,7 @@ def re_claim_device_using_delete_with_http_info(self, device_name, **kwargs): # def save_device_using_post(self, **kwargs): # noqa: E501 """Create Or Update Device (saveDevice) # noqa: E501 - Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error. Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error. Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_using_post(async_req=True) @@ -1804,6 +2161,7 @@ def save_device_using_post(self, **kwargs): # noqa: E501 :param Device body: :param str access_token: Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated. :param str entity_group_id: entityGroupId + :param str entity_group_ids: entityGroupIds :return: Device If the method is called asynchronously, returns the request thread. @@ -1818,7 +2176,7 @@ def save_device_using_post(self, **kwargs): # noqa: E501 def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Device (saveDevice) # noqa: E501 - Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error. Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error. Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_using_post_with_http_info(async_req=True) @@ -1828,12 +2186,13 @@ def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 :param Device body: :param str access_token: Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated. :param str entity_group_id: entityGroupId + :param str entity_group_ids: entityGroupIds :return: Device If the method is called asynchronously, returns the request thread. """ - all_params = ['body', 'access_token', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'access_token', 'entity_group_id', 'entity_group_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1858,6 +2217,8 @@ def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('accessToken', params['access_token'])) # noqa: E501 if 'entity_group_id' in params: query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 + if 'entity_group_ids' in params: + query_params.append(('entityGroupIds', params['entity_group_ids'])) # noqa: E501 header_params = {} @@ -1879,7 +2240,7 @@ def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/device{?accessToken,entityGroupId}', 'POST', + '/api/device{?accessToken,entityGroupId,entityGroupIds}', 'POST', path_params, query_params, header_params, @@ -1897,7 +2258,7 @@ def save_device_using_post_with_http_info(self, **kwargs): # noqa: E501 def save_device_with_credentials_using_post(self, **kwargs): # noqa: E501 """Create Device (saveDevice) with credentials # noqa: E501 - Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below: ```json { \"device\": { \"name\": \"LwRpk00000000\", \"type\": \"lwm2mProfileRpk\" }, \"credentials\": { \"id\": \"null\", \"createdTime\": 0, \"deviceId\": \"null\", \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": { \"client\": { \"endpoint\": \"LwRpk00000000\", \"securityConfigClientMode\": \"RPK\", \"key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\" }, \"bootstrap\": { \"bootstrapServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" }, \"lwm2mServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" } } } } } ``` Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below: ```json { \"device\": { \"name\": \"LwRpk00000000\", \"type\": \"lwm2mProfileRpk\" }, \"credentials\": { \"id\": \"null\", \"createdTime\": 0, \"deviceId\": \"null\", \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": { \"client\": { \"endpoint\": \"LwRpk00000000\", \"securityConfigClientMode\": \"RPK\", \"key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\" }, \"bootstrap\": { \"bootstrapServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" }, \"lwm2mServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" } } } } } ```Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_with_credentials_using_post(async_req=True) @@ -1920,7 +2281,7 @@ def save_device_with_credentials_using_post(self, **kwargs): # noqa: E501 def save_device_with_credentials_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Device (saveDevice) with credentials # noqa: E501 - Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below: ```json { \"device\": { \"name\": \"LwRpk00000000\", \"type\": \"lwm2mProfileRpk\" }, \"credentials\": { \"id\": \"null\", \"createdTime\": 0, \"deviceId\": \"null\", \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": { \"client\": { \"endpoint\": \"LwRpk00000000\", \"securityConfigClientMode\": \"RPK\", \"key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\" }, \"bootstrap\": { \"bootstrapServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" }, \"lwm2mServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" } } } } } ``` Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below: ```json { \"device\": { \"name\": \"LwRpk00000000\", \"type\": \"lwm2mProfileRpk\" }, \"credentials\": { \"id\": \"null\", \"createdTime\": 0, \"deviceId\": \"null\", \"credentialsType\": \"LWM2M_CREDENTIALS\", \"credentialsId\": \"LwRpk00000000\", \"credentialsValue\": { \"client\": { \"endpoint\": \"LwRpk00000000\", \"securityConfigClientMode\": \"RPK\", \"key\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\" }, \"bootstrap\": { \"bootstrapServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" }, \"lwm2mServer\": { \"securityMode\": \"RPK\", \"clientPublicKeyOrId\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\", \"clientSecretKey\": \"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\" } } } } } ```Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_with_credentials_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_pe/device_group_ota_package_controller_api.py b/tb_rest_client/api/api_pe/device_group_ota_package_controller_api.py index 123a049e..bcab47cb 100644 --- a/tb_rest_client/api/api_pe/device_group_ota_package_controller_api.py +++ b/tb_rest_client/api/api_pe/device_group_ota_package_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/device_profile_controller_api.py b/tb_rest_client/api/api_pe/device_profile_controller_api.py index 628e6522..083c0d97 100644 --- a/tb_rest_client/api/api_pe/device_profile_controller_api.py +++ b/tb_rest_client/api/api_pe/device_profile_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -218,101 +218,6 @@ def get_attributes_keys_using_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_device_profiles_by_ids_using_get(self, device_profile_ids, **kwargs): # noqa: E501 - """Get Device Profiles By Ids (getDeviceProfilesByIds) # noqa: E501 - - Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_device_profiles_by_ids_using_get(device_profile_ids, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_profile_ids: A list of device profile ids, separated by comma ',' (required) - :return: list[DeviceProfileInfo] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_device_profiles_by_ids_using_get_with_http_info(device_profile_ids, **kwargs) # noqa: E501 - else: - (data) = self.get_device_profiles_by_ids_using_get_with_http_info(device_profile_ids, **kwargs) # noqa: E501 - return data - - def get_device_profiles_by_ids_using_get_with_http_info(self, device_profile_ids, **kwargs): # noqa: E501 - """Get Device Profiles By Ids (getDeviceProfilesByIds) # noqa: E501 - - Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_device_profiles_by_ids_using_get_with_http_info(device_profile_ids, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_profile_ids: A list of device profile ids, separated by comma ',' (required) - :return: list[DeviceProfileInfo] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['device_profile_ids'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_device_profiles_by_ids_using_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'device_profile_ids' is set - if ('device_profile_ids' not in params or - params['device_profile_ids'] is None): - raise ValueError("Missing the required parameter `device_profile_ids` when calling `get_device_profiles_by_ids_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'device_profile_ids' in params: - query_params.append(('deviceProfileIds', params['device_profile_ids'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/deviceProfileInfos{?deviceProfileIds}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[DeviceProfileInfo]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def get_default_device_profile_info_using_get(self, **kwargs): # noqa: E501 """Get Default Device Profile (getDefaultDeviceProfileInfo) # noqa: E501 @@ -602,7 +507,7 @@ def get_device_profile_infos_using_get(self, page_size, page, **kwargs): # noqa :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the device profile name. + :param str text_search: The case insensitive 'substring' filter based on the device profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param str transport_type: Type of the transport @@ -629,7 +534,7 @@ def get_device_profile_infos_using_get_with_http_info(self, page_size, page, **k :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the device profile name. + :param str text_search: The case insensitive 'substring' filter based on the device profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param str transport_type: Type of the transport @@ -709,6 +614,101 @@ def get_device_profile_infos_using_get_with_http_info(self, page_size, page, **k _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_device_profiles_by_ids_using_get(self, device_profile_ids, **kwargs): # noqa: E501 + """Get Device Profiles By Ids (getDeviceProfilesByIds) # noqa: E501 + + Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_device_profiles_by_ids_using_get(device_profile_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_profile_ids: A list of device profile ids, separated by comma ',' (required) + :return: list[DeviceProfileInfo] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_device_profiles_by_ids_using_get_with_http_info(device_profile_ids, **kwargs) # noqa: E501 + else: + (data) = self.get_device_profiles_by_ids_using_get_with_http_info(device_profile_ids, **kwargs) # noqa: E501 + return data + + def get_device_profiles_by_ids_using_get_with_http_info(self, device_profile_ids, **kwargs): # noqa: E501 + """Get Device Profiles By Ids (getDeviceProfilesByIds) # noqa: E501 + + Requested device profiles must be owned by tenant which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_device_profiles_by_ids_using_get_with_http_info(device_profile_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_profile_ids: A list of device profile ids, separated by comma ',' (required) + :return: list[DeviceProfileInfo] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_profile_ids'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_device_profiles_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_profile_ids' is set + if ('device_profile_ids' not in params or + params['device_profile_ids'] is None): + raise ValueError("Missing the required parameter `device_profile_ids` when calling `get_device_profiles_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'device_profile_ids' in params: + query_params.append(('deviceProfileIds', params['device_profile_ids'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/deviceProfileInfos{?deviceProfileIds}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DeviceProfileInfo]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_device_profiles_using_get(self, page_size, page, **kwargs): # noqa: E501 """Get Device Profiles (getDeviceProfiles) # noqa: E501 @@ -721,7 +721,7 @@ def get_device_profiles_using_get(self, page_size, page, **kwargs): # noqa: E50 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the device profile name. + :param str text_search: The case insensitive 'substring' filter based on the device profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDeviceProfile @@ -747,7 +747,7 @@ def get_device_profiles_using_get_with_http_info(self, page_size, page, **kwargs :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the device profile name. + :param str text_search: The case insensitive 'substring' filter based on the device profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataDeviceProfile @@ -918,7 +918,7 @@ def get_timeseries_keys_using_get_with_http_info(self, **kwargs): # noqa: E501 def save_device_profile_using_post(self, **kwargs): # noqa: E501 """Create Or Update Device Profile (saveDeviceProfile) # noqa: E501 - Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time-series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time-series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time-series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time-series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_profile_using_post(async_req=True) @@ -940,7 +940,7 @@ def save_device_profile_using_post(self, **kwargs): # noqa: E501 def save_device_profile_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Device Profile (saveDeviceProfile) # noqa: E501 - Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time-series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time-series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time-series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time-series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_device_profile_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_pe/edge_controller_api.py b/tb_rest_client/api/api_pe/edge_controller_api.py index dc317f7e..7839d806 100644 --- a/tb_rest_client/api/api_pe/edge_controller_api.py +++ b/tb_rest_client/api/api_pe/edge_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -515,6 +515,260 @@ def find_missing_to_related_rule_chains_using_get_with_http_info(self, edge_id, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_all_edge_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get All Edge Infos for current user (getAllEdgeInfos) # noqa: E501 + + Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_edge_infos_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str type: A string value representing the edge type. For example, 'default' + :param str text_search: The case insensitive 'substring' filter based on the edge name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEdgeInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_all_edge_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_all_edge_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_all_edge_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get All Edge Infos for current user (getAllEdgeInfos) # noqa: E501 + + Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_edge_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str type: A string value representing the edge type. For example, 'default' + :param str text_search: The case insensitive 'substring' filter based on the edge name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEdgeInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'include_customers', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_edge_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_all_edge_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_all_edge_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edgeInfos/all{?includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEdgeInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_customer_edge_infos_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Edge Infos (getCustomerEdgeInfos) # noqa: E501 + + Returns a page of edge info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_edge_infos_using_get(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str type: A string value representing the edge type. For example, 'default' + :param str text_search: The case insensitive 'substring' filter based on the edge name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEdgeInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_customer_edge_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_edge_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_customer_edge_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Edge Infos (getCustomerEdgeInfos) # noqa: E501 + + Returns a page of edge info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_edge_infos_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str type: A string value representing the edge type. For example, 'default' + :param str text_search: The case insensitive 'substring' filter based on the edge name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEdgeInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['customer_id', 'page_size', 'page', 'include_customers', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer_edge_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'customer_id' is set + if ('customer_id' not in params or + params['customer_id'] is None): + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_edge_infos_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_edge_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_customer_edge_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/edgeInfos{?includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEdgeInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_customer_edges_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 """Get Customer Edges (getCustomerEdges) # noqa: E501 @@ -529,7 +783,7 @@ def get_customer_edges_using_get(self, customer_id, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -557,7 +811,7 @@ def get_customer_edges_using_get_with_http_info(self, customer_id, page_size, pa :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -737,6 +991,196 @@ def get_edge_by_id_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_edge_docker_install_instructions_using_get(self, edge_id, **kwargs): # noqa: E501 + """Get Edge Docker Install Instructions (getEdgeDockerInstallInstructions) # noqa: E501 + + Get a docker install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edge_docker_install_instructions_using_get(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EdgeInstallInstructions + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + else: + (data) = self.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + return data + + def get_edge_docker_install_instructions_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E501 + """Get Edge Docker Install Instructions (getEdgeDockerInstallInstructions) # noqa: E501 + + Get a docker install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edge_docker_install_instructions_using_get_with_http_info(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EdgeInstallInstructions + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_edge_docker_install_instructions_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'edge_id' is set + if ('edge_id' not in params or + params['edge_id'] is None): + raise ValueError("Missing the required parameter `edge_id` when calling `get_edge_docker_install_instructions_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/instructions/{edgeId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EdgeInstallInstructions', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_edge_info_by_id_using_get(self, edge_id, **kwargs): # noqa: E501 + """Get Edge Info (getEdgeInfoById) # noqa: E501 + + Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edge_info_by_id_using_get(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EdgeInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_edge_info_by_id_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + else: + (data) = self.get_edge_info_by_id_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + return data + + def get_edge_info_by_id_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E501 + """Get Edge Info (getEdgeInfoById) # noqa: E501 + + Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edge_info_by_id_using_get_with_http_info(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EdgeInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_edge_info_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'edge_id' is set + if ('edge_id' not in params or + params['edge_id'] is None): + raise ValueError("Missing the required parameter `edge_id` when calling `get_edge_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/info/{edgeId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EdgeInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_edge_types_using_get(self, **kwargs): # noqa: E501 """Get Edge Types (getEdgeTypes) # noqa: E501 @@ -837,7 +1281,7 @@ def get_edges_by_entity_group_id_using_get(self, entity_group_id, page_size, pag :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -864,7 +1308,7 @@ def get_edges_by_entity_group_id_using_get_with_http_info(self, entity_group_id, :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -1054,7 +1498,7 @@ def get_edges_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -1080,7 +1524,7 @@ def get_edges_using_get_with_http_info(self, page_size, page, **kwargs): # noqa :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -1265,7 +1709,7 @@ def get_tenant_edges_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -1292,7 +1736,7 @@ def get_tenant_edges_using_get_with_http_info(self, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: A string value representing the edge type. For example, 'default' - :param str text_search: The case insensitive 'startsWith' filter based on the edge name. + :param str text_search: The case insensitive 'substring' filter based on the edge name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEdge @@ -1675,7 +2119,7 @@ def process_edges_bulk_import_using_post_with_http_info(self, **kwargs): # noqa def save_edge_using_post(self, **kwargs): # noqa: E501 """Create Or Update Edge (saveEdge) # noqa: E501 - Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error. Edge 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. # noqa: E501 + Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error. Edge 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_edge_using_post(async_req=True) @@ -1684,6 +2128,7 @@ def save_edge_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param Edge body: :param str entity_group_id: entityGroupId + :param str entity_group_ids: entityGroupIds :return: Edge If the method is called asynchronously, returns the request thread. @@ -1698,7 +2143,7 @@ def save_edge_using_post(self, **kwargs): # noqa: E501 def save_edge_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Edge (saveEdge) # noqa: E501 - Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error. Edge 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. # noqa: E501 + Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error. Edge 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_edge_using_post_with_http_info(async_req=True) @@ -1707,12 +2152,13 @@ def save_edge_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param Edge body: :param str entity_group_id: entityGroupId + :param str entity_group_ids: entityGroupIds :return: Edge If the method is called asynchronously, returns the request thread. """ - all_params = ['body', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'entity_group_id', 'entity_group_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1735,6 +2181,8 @@ def save_edge_using_post_with_http_info(self, **kwargs): # noqa: E501 query_params = [] if 'entity_group_id' in params: query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 + if 'entity_group_ids' in params: + query_params.append(('entityGroupIds', params['entity_group_ids'])) # noqa: E501 header_params = {} @@ -1756,7 +2204,7 @@ def save_edge_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge{?entityGroupId}', 'POST', + '/api/edge{?entityGroupId,entityGroupIds}', 'POST', path_params, query_params, header_params, @@ -1885,7 +2333,7 @@ def sync_edge_using_post(self, edge_id, **kwargs): # noqa: E501 :param async_req bool :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ @@ -1907,7 +2355,7 @@ def sync_edge_using_post_with_http_info(self, edge_id, **kwargs): # noqa: E501 :param async_req bool :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ @@ -1961,7 +2409,7 @@ def sync_edge_using_post_with_http_info(self, edge_id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='DeferredResultResponseEntity', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_pe/edge_event_controller_api.py b/tb_rest_client/api/api_pe/edge_event_controller_api.py index 6ee1f9f2..cc01c534 100644 --- a/tb_rest_client/api/api_pe/edge_event_controller_api.py +++ b/tb_rest_client/api/api_pe/edge_event_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -45,7 +45,7 @@ def get_edge_events_using_get(self, edge_id, page_size, page, **kwargs): # noqa :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the edge event type name. + :param str text_search: The case insensitive 'substring' filter based on the edge event type name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Edge events with creation time before it won't be queried @@ -74,7 +74,7 @@ def get_edge_events_using_get_with_http_info(self, edge_id, page_size, page, **k :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the edge event type name. + :param str text_search: The case insensitive 'substring' filter based on the edge event type name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Edge events with creation time before it won't be queried diff --git a/tb_rest_client/api/api_pe/entities_version_control_controller_api.py b/tb_rest_client/api/api_pe/entities_version_control_controller_api.py new file mode 100644 index 00000000..2372c9f2 --- /dev/null +++ b/tb_rest_client/api/api_pe/entities_version_control_controller_api.py @@ -0,0 +1,1321 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class EntitiesVersionControlControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def compare_entity_data_to_version_using_get(self, entity_type, internal_entity_uuid, version_id, **kwargs): # noqa: E501 + """Compare entity data to version (compareEntityDataToVersion) # noqa: E501 + + Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.compare_entity_data_to_version_using_get(entity_type, internal_entity_uuid, version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str internal_entity_uuid: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str version_id: Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) + :return: DeferredResultEntityDataDiff + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.compare_entity_data_to_version_using_get_with_http_info(entity_type, internal_entity_uuid, version_id, **kwargs) # noqa: E501 + else: + (data) = self.compare_entity_data_to_version_using_get_with_http_info(entity_type, internal_entity_uuid, version_id, **kwargs) # noqa: E501 + return data + + def compare_entity_data_to_version_using_get_with_http_info(self, entity_type, internal_entity_uuid, version_id, **kwargs): # noqa: E501 + """Compare entity data to version (compareEntityDataToVersion) # noqa: E501 + + Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.compare_entity_data_to_version_using_get_with_http_info(entity_type, internal_entity_uuid, version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str internal_entity_uuid: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str version_id: Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) + :return: DeferredResultEntityDataDiff + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_type', 'internal_entity_uuid', 'version_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method compare_entity_data_to_version_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `compare_entity_data_to_version_using_get`") # noqa: E501 + # verify the required parameter 'internal_entity_uuid' is set + if ('internal_entity_uuid' not in params or + params['internal_entity_uuid'] is None): + raise ValueError("Missing the required parameter `internal_entity_uuid` when calling `compare_entity_data_to_version_using_get`") # noqa: E501 + # verify the required parameter 'version_id' is set + if ('version_id' not in params or + params['version_id'] is None): + raise ValueError("Missing the required parameter `version_id` when calling `compare_entity_data_to_version_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + if 'internal_entity_uuid' in params: + path_params['internalEntityUuid'] = params['internal_entity_uuid'] # noqa: E501 + + query_params = [] + if 'version_id' in params: + query_params.append(('versionId', params['version_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/diff/{entityType}/{internalEntityUuid}{?versionId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultEntityDataDiff', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_entity_data_info_using_get(self, version_id, entity_type, external_entity_uuid, **kwargs): # noqa: E501 + """Get entity data info (getEntityDataInfo) # noqa: E501 + + Retrieves short info about the remote entity by external id at a concrete version. Returned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities). Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_data_info_using_get(version_id, entity_type, external_entity_uuid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str version_id: Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str external_entity_uuid: A string value representing external entity id (required) + :param str internal_entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :return: DeferredResultEntityDataInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_entity_data_info_using_get_with_http_info(version_id, entity_type, external_entity_uuid, **kwargs) # noqa: E501 + else: + (data) = self.get_entity_data_info_using_get_with_http_info(version_id, entity_type, external_entity_uuid, **kwargs) # noqa: E501 + return data + + def get_entity_data_info_using_get_with_http_info(self, version_id, entity_type, external_entity_uuid, **kwargs): # noqa: E501 + """Get entity data info (getEntityDataInfo) # noqa: E501 + + Retrieves short info about the remote entity by external id at a concrete version. Returned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities). Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_data_info_using_get_with_http_info(version_id, entity_type, external_entity_uuid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str version_id: Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str external_entity_uuid: A string value representing external entity id (required) + :param str internal_entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' + :return: DeferredResultEntityDataInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['version_id', 'entity_type', 'external_entity_uuid', 'internal_entity_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_entity_data_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'version_id' is set + if ('version_id' not in params or + params['version_id'] is None): + raise ValueError("Missing the required parameter `version_id` when calling `get_entity_data_info_using_get`") # noqa: E501 + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `get_entity_data_info_using_get`") # noqa: E501 + # verify the required parameter 'external_entity_uuid' is set + if ('external_entity_uuid' not in params or + params['external_entity_uuid'] is None): + raise ValueError("Missing the required parameter `external_entity_uuid` when calling `get_entity_data_info_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'version_id' in params: + path_params['versionId'] = params['version_id'] # noqa: E501 + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + if 'external_entity_uuid' in params: + path_params['externalEntityUuid'] = params['external_entity_uuid'] # noqa: E501 + + query_params = [] + if 'internal_entity_id' in params: + query_params.append(('internalEntityId', params['internal_entity_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}{?internalEntityId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultEntityDataInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_version_create_request_status_using_get(self, request_id, **kwargs): # noqa: E501 + """Get version create request status (getVersionCreateRequestStatus) # noqa: E501 + + Returns the status of previously made version create request. This status contains following properties: - `done` - whether request processing is finished; - `version` - created version info: timestamp, version id (commit hash), commit name and commit author; - `added` - count of items that were created in the remote repo; - `modified` - modified items count; - `removed` - removed items count; - `error` - error message, if an error occurred while handling the request. An example of successful status: ```json { \"done\": true, \"added\": 10, \"modified\": 2, \"removed\": 5, \"version\": { \"timestamp\": 1655198528000, \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\", \"name\": \"My devices v2.0\", \"author\": \"John Doe\" }, \"error\": null } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_version_create_request_status_using_get(request_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str request_id: A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: VersionCreationResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_version_create_request_status_using_get_with_http_info(request_id, **kwargs) # noqa: E501 + else: + (data) = self.get_version_create_request_status_using_get_with_http_info(request_id, **kwargs) # noqa: E501 + return data + + def get_version_create_request_status_using_get_with_http_info(self, request_id, **kwargs): # noqa: E501 + """Get version create request status (getVersionCreateRequestStatus) # noqa: E501 + + Returns the status of previously made version create request. This status contains following properties: - `done` - whether request processing is finished; - `version` - created version info: timestamp, version id (commit hash), commit name and commit author; - `added` - count of items that were created in the remote repo; - `modified` - modified items count; - `removed` - removed items count; - `error` - error message, if an error occurred while handling the request. An example of successful status: ```json { \"done\": true, \"added\": 10, \"modified\": 2, \"removed\": 5, \"version\": { \"timestamp\": 1655198528000, \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\", \"name\": \"My devices v2.0\", \"author\": \"John Doe\" }, \"error\": null } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_version_create_request_status_using_get_with_http_info(request_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str request_id: A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: VersionCreationResult + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['request_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_version_create_request_status_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'request_id' is set + if ('request_id' not in params or + params['request_id'] is None): + raise ValueError("Missing the required parameter `request_id` when calling `get_version_create_request_status_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'request_id' in params: + path_params['requestId'] = params['request_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/version/{requestId}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='VersionCreationResult', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_version_load_request_status_using_get(self, request_id, **kwargs): # noqa: E501 + """Get version load request status (getVersionLoadRequestStatus) # noqa: E501 + + Returns the status of previously made version load request. The structure contains following parameters: - `done` - if the request was successfully processed; - `result` - a list of load results for each entity type: - `created` - created entities count; - `updated` - updated entities count; - `deleted` - removed entities count; - `groupsCreated` - created entity groups count; - `groupsUpdated` - updated entity groups count; - `groupsDeleted` - removed entity groups count. - `error` - if an error occurred during processing, error info: - `type` - error type; - `source` - an external id of remote entity; - `target` - if failed to find referenced entity by external id - this external id; - `message` - error message. An example of successfully processed request status: ```json { \"done\": true, \"result\": [ { \"entityType\": \"DEVICE\", \"created\": 10, \"updated\": 5, \"deleted\": 5, \"groupsCreated\": 1, \"groupsUpdated\": 1, \"groupsDeleted\": 1 }, { \"entityType\": \"ASSET\", \"created\": 4, \"updated\": 0, \"deleted\": 8, \"groupsCreated\": 1, \"groupsUpdated\": 0, \"groupsDeleted\": 2 } ] } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_version_load_request_status_using_get(request_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str request_id: A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: VersionLoadResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_version_load_request_status_using_get_with_http_info(request_id, **kwargs) # noqa: E501 + else: + (data) = self.get_version_load_request_status_using_get_with_http_info(request_id, **kwargs) # noqa: E501 + return data + + def get_version_load_request_status_using_get_with_http_info(self, request_id, **kwargs): # noqa: E501 + """Get version load request status (getVersionLoadRequestStatus) # noqa: E501 + + Returns the status of previously made version load request. The structure contains following parameters: - `done` - if the request was successfully processed; - `result` - a list of load results for each entity type: - `created` - created entities count; - `updated` - updated entities count; - `deleted` - removed entities count; - `groupsCreated` - created entity groups count; - `groupsUpdated` - updated entity groups count; - `groupsDeleted` - removed entity groups count. - `error` - if an error occurred during processing, error info: - `type` - error type; - `source` - an external id of remote entity; - `target` - if failed to find referenced entity by external id - this external id; - `message` - error message. An example of successfully processed request status: ```json { \"done\": true, \"result\": [ { \"entityType\": \"DEVICE\", \"created\": 10, \"updated\": 5, \"deleted\": 5, \"groupsCreated\": 1, \"groupsUpdated\": 1, \"groupsDeleted\": 1 }, { \"entityType\": \"ASSET\", \"created\": 4, \"updated\": 0, \"deleted\": 8, \"groupsCreated\": 1, \"groupsUpdated\": 0, \"groupsDeleted\": 2 } ] } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_version_load_request_status_using_get_with_http_info(request_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str request_id: A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: VersionLoadResult + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['request_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_version_load_request_status_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'request_id' is set + if ('request_id' not in params or + params['request_id'] is None): + raise ValueError("Missing the required parameter `request_id` when calling `get_version_load_request_status_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'request_id' in params: + path_params['requestId'] = params['request_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/entity/{requestId}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='VersionLoadResult', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_all_entities_at_version_using_get(self, version_id, **kwargs): # noqa: E501 + """List all entities at version (listAllEntitiesAtVersion) # noqa: E501 + + Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. Returned entities order will be the same as in the repository. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_all_entities_at_version_using_get(version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str version_id: Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) + :return: DeferredResultListVersionedEntityInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_all_entities_at_version_using_get_with_http_info(version_id, **kwargs) # noqa: E501 + else: + (data) = self.list_all_entities_at_version_using_get_with_http_info(version_id, **kwargs) # noqa: E501 + return data + + def list_all_entities_at_version_using_get_with_http_info(self, version_id, **kwargs): # noqa: E501 + """List all entities at version (listAllEntitiesAtVersion) # noqa: E501 + + Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. Returned entities order will be the same as in the repository. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_all_entities_at_version_using_get_with_http_info(version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str version_id: Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) + :return: DeferredResultListVersionedEntityInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['version_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_all_entities_at_version_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'version_id' is set + if ('version_id' not in params or + params['version_id'] is None): + raise ValueError("Missing the required parameter `version_id` when calling `list_all_entities_at_version_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'version_id' in params: + path_params['versionId'] = params['version_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/entity/{versionId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultListVersionedEntityInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_branches_using_get(self, **kwargs): # noqa: E501 + """List branches (listBranches) # noqa: E501 + + Lists branches available in the remote repository. Response example: ```json [ { \"name\": \"master\", \"default\": true }, { \"name\": \"dev\", \"default\": false }, { \"name\": \"dev-2\", \"default\": false } ] ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_branches_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: DeferredResultListBranchInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_branches_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_branches_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def list_branches_using_get_with_http_info(self, **kwargs): # noqa: E501 + """List branches (listBranches) # noqa: E501 + + Lists branches available in the remote repository. Response example: ```json [ { \"name\": \"master\", \"default\": true }, { \"name\": \"dev\", \"default\": false }, { \"name\": \"dev-2\", \"default\": false } ] ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_branches_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: DeferredResultListBranchInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_branches_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/branches', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultListBranchInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_entities_at_version_using_get(self, entity_type, version_id, **kwargs): # noqa: E501 + """List entities at version (listEntitiesAtVersion) # noqa: E501 + + Returns a list of remote entities of a specific entity type that are available at a concrete version. Each entity item in the result has `externalId` property. Entities order will be the same as in the repository. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_entities_at_version_using_get(entity_type, version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str version_id: Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) + :return: DeferredResultListVersionedEntityInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_entities_at_version_using_get_with_http_info(entity_type, version_id, **kwargs) # noqa: E501 + else: + (data) = self.list_entities_at_version_using_get_with_http_info(entity_type, version_id, **kwargs) # noqa: E501 + return data + + def list_entities_at_version_using_get_with_http_info(self, entity_type, version_id, **kwargs): # noqa: E501 + """List entities at version (listEntitiesAtVersion) # noqa: E501 + + Returns a list of remote entities of a specific entity type that are available at a concrete version. Each entity item in the result has `externalId` property. Entities order will be the same as in the repository. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_entities_at_version_using_get_with_http_info(entity_type, version_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str version_id: Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash. (required) + :return: DeferredResultListVersionedEntityInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_type', 'version_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_entities_at_version_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `list_entities_at_version_using_get`") # noqa: E501 + # verify the required parameter 'version_id' is set + if ('version_id' not in params or + params['version_id'] is None): + raise ValueError("Missing the required parameter `version_id` when calling `list_entities_at_version_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + if 'version_id' in params: + path_params['versionId'] = params['version_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/entity/{entityType}/{versionId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultListVersionedEntityInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_entity_type_versions_using_get(self, entity_type, branch, page_size, page, **kwargs): # noqa: E501 + """List entity type versions (listEntityTypeVersions) # noqa: E501 + + Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. If specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_entity_type_versions_using_get(entity_type, branch, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str branch: The name of the working branch, for example 'master' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the entity version name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: DeferredResultPageDataEntityVersion + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_entity_type_versions_using_get_with_http_info(entity_type, branch, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.list_entity_type_versions_using_get_with_http_info(entity_type, branch, page_size, page, **kwargs) # noqa: E501 + return data + + def list_entity_type_versions_using_get_with_http_info(self, entity_type, branch, page_size, page, **kwargs): # noqa: E501 + """List entity type versions (listEntityTypeVersions) # noqa: E501 + + Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. If specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_entity_type_versions_using_get_with_http_info(entity_type, branch, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str branch: The name of the working branch, for example 'master' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the entity version name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: DeferredResultPageDataEntityVersion + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_type', 'branch', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_entity_type_versions_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `list_entity_type_versions_using_get`") # noqa: E501 + # verify the required parameter 'branch' is set + if ('branch' not in params or + params['branch'] is None): + raise ValueError("Missing the required parameter `branch` when calling `list_entity_type_versions_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `list_entity_type_versions_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `list_entity_type_versions_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + + query_params = [] + if 'branch' in params: + query_params.append(('branch', params['branch'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/version/{entityType}?sortProperty=timestamp{&branch,page,pageSize,sortOrder,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultPageDataEntityVersion', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_entity_versions_using_get(self, entity_type, external_entity_uuid, branch, page_size, page, **kwargs): # noqa: E501 + """List entity versions (listEntityVersions) # noqa: E501 + + Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe \" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe \" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe \" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_entity_versions_using_get(entity_type, external_entity_uuid, branch, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str external_entity_uuid: A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) + :param str branch: The name of the working branch, for example 'master' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str internal_entity_id: internalEntityId + :param str text_search: The case insensitive 'substring' filter based on the entity version name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: DeferredResultPageDataEntityVersion + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_entity_versions_using_get_with_http_info(entity_type, external_entity_uuid, branch, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.list_entity_versions_using_get_with_http_info(entity_type, external_entity_uuid, branch, page_size, page, **kwargs) # noqa: E501 + return data + + def list_entity_versions_using_get_with_http_info(self, entity_type, external_entity_uuid, branch, page_size, page, **kwargs): # noqa: E501 + """List entity versions (listEntityVersions) # noqa: E501 + + Returns list of versions for a specific entity in a concrete branch. You need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. If specified branch does not exist - empty page data will be returned. Each version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Response example: ```json { \"data\": [ { \"timestamp\": 1655198593000, \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\", \"name\": \"Devices and assets - v2.0\", \"author\": \"John Doe \" }, { \"timestamp\": 1655198528000, \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\", \"name\": \"Update my device\", \"author\": \"John Doe \" }, { \"timestamp\": 1655198280000, \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\", \"name\": \"Devices and assets - v1.0\", \"author\": \"John Doe \" } ], \"totalPages\": 1, \"totalElements\": 3, \"hasNext\": false } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_entity_versions_using_get_with_http_info(entity_type, external_entity_uuid, branch, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str external_entity_uuid: A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. (required) + :param str branch: The name of the working branch, for example 'master' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str internal_entity_id: internalEntityId + :param str text_search: The case insensitive 'substring' filter based on the entity version name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: DeferredResultPageDataEntityVersion + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_type', 'external_entity_uuid', 'branch', 'page_size', 'page', 'internal_entity_id', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_entity_versions_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `list_entity_versions_using_get`") # noqa: E501 + # verify the required parameter 'external_entity_uuid' is set + if ('external_entity_uuid' not in params or + params['external_entity_uuid'] is None): + raise ValueError("Missing the required parameter `external_entity_uuid` when calling `list_entity_versions_using_get`") # noqa: E501 + # verify the required parameter 'branch' is set + if ('branch' not in params or + params['branch'] is None): + raise ValueError("Missing the required parameter `branch` when calling `list_entity_versions_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `list_entity_versions_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `list_entity_versions_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + if 'external_entity_uuid' in params: + path_params['externalEntityUuid'] = params['external_entity_uuid'] # noqa: E501 + + query_params = [] + if 'branch' in params: + query_params.append(('branch', params['branch'])) # noqa: E501 + if 'internal_entity_id' in params: + query_params.append(('internalEntityId', params['internal_entity_id'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/version/{entityType}/{externalEntityUuid}?sortProperty=timestamp{&branch,internalEntityId,page,pageSize,sortOrder,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultPageDataEntityVersion', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_versions_using_get(self, branch, page_size, page, **kwargs): # noqa: E501 + """List all versions (listVersions) # noqa: E501 + + Lists all available versions in a branch for all entity types. If specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_versions_using_get(branch, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str branch: The name of the working branch, for example 'master' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the entity version name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: DeferredResultPageDataEntityVersion + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_versions_using_get_with_http_info(branch, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.list_versions_using_get_with_http_info(branch, page_size, page, **kwargs) # noqa: E501 + return data + + def list_versions_using_get_with_http_info(self, branch, page_size, page, **kwargs): # noqa: E501 + """List all versions (listVersions) # noqa: E501 + + Lists all available versions in a branch for all entity types. If specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_versions_using_get_with_http_info(branch, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str branch: The name of the working branch, for example 'master' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the entity version name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: DeferredResultPageDataEntityVersion + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['branch', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_versions_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'branch' is set + if ('branch' not in params or + params['branch'] is None): + raise ValueError("Missing the required parameter `branch` when calling `list_versions_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `list_versions_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `list_versions_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'branch' in params: + query_params.append(('branch', params['branch'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/version?sortProperty=timestamp{&branch,page,pageSize,sortOrder,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultPageDataEntityVersion', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def load_entities_version_using_post(self, **kwargs): # noqa: E501 + """Load entities version (loadEntitiesVersion) # noqa: E501 + + Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group. There are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`): - `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation); - `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled); - `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation); - `loadPermissions` - when loading user group, to update group permission list; - `loadGroupEntities` - when loading an entity group, to load its entities as well; - `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key. An example of such request: ```json { \"type\": \"SINGLE_ENTITY\", \"branch\": \"dev\", \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\", \"externalEntityId\": { \"entityType\": \"DEVICE\", \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\" }, \"config\": { \"loadRelations\": false, \"loadAttributes\": true, \"loadCredentials\": true } } ``` Another request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options: - `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one; - `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new. Here is an example of the request to completely restore version of the whole device entity type: ```json { \"type\": \"ENTITY_TYPE\", \"branch\": \"dev\", \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\", \"entityTypes\": { \"DEVICE\": { \"removeOtherEntities\": true, \"findExistingEntityByName\": false, \"loadRelations\": true, \"loadAttributes\": true, \"loadCredentials\": true } } } ``` The response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.load_entities_version_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param VersionLoadRequest body: + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.load_entities_version_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.load_entities_version_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def load_entities_version_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Load entities version (loadEntitiesVersion) # noqa: E501 + + Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group. There are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`): - `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation); - `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled); - `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation); - `loadPermissions` - when loading user group, to update group permission list; - `loadGroupEntities` - when loading an entity group, to load its entities as well; - `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key. An example of such request: ```json { \"type\": \"SINGLE_ENTITY\", \"branch\": \"dev\", \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\", \"externalEntityId\": { \"entityType\": \"DEVICE\", \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\" }, \"config\": { \"loadRelations\": false, \"loadAttributes\": true, \"loadCredentials\": true } } ``` Another request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options: - `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one; - `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new. Here is an example of the request to completely restore version of the whole device entity type: ```json { \"type\": \"ENTITY_TYPE\", \"branch\": \"dev\", \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\", \"entityTypes\": { \"DEVICE\": { \"removeOtherEntities\": true, \"findExistingEntityByName\": false, \"loadRelations\": true, \"loadAttributes\": true, \"loadCredentials\": true } } } ``` The response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.load_entities_version_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param VersionLoadRequest body: + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method load_entities_version_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/entity', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_entities_version_using_post(self, **kwargs): # noqa: E501 + """Save entities version (saveEntitiesVersion) # noqa: E501 + + Creates a new version of entities (or a single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group. There are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: - `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version; - `saveAttributes` - to save attributes of server scope (and also shared scope for devices); - `saveCredentials` - when saving a version of a device, to add its credentials to the version; - `savePermissions` - when saving a user group - to save group permission list; - `saveGroupEntities` - when saving an entity group - to save its entities as well. An example of a `SINGLE_ENTITY` version create request: ```json { \"type\": \"SINGLE_ENTITY\", \"versionName\": \"Version 1.0\", \"branch\": \"dev\", \"entityId\": { \"entityType\": \"DEVICE\", \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\" }, \"config\": { \"saveRelations\": true, \"saveAttributes\": true, \"saveCredentials\": false } } ``` Second request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties: - `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities; - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated). - `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type. Example for this type of request: ```json { \"type\": \"COMPLEX\", \"versionName\": \"Devices and profiles: release 2\", \"branch\": \"master\", \"syncStrategy\": \"OVERWRITE\", \"entityTypes\": { \"DEVICE\": { \"syncStrategy\": null, \"allEntities\": true, \"saveRelations\": true, \"saveAttributes\": true, \"saveCredentials\": true }, \"DEVICE_PROFILE\": { \"syncStrategy\": \"MERGE\", \"allEntities\": false, \"entityIds\": [ \"b79448e0-d4f4-11ec-847b-0f432358ab48\" ], \"saveRelations\": true } } } ``` Response wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_entities_version_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param VersionCreateRequest body: + :return: DeferredResultuuid + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_entities_version_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_entities_version_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_entities_version_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save entities version (saveEntitiesVersion) # noqa: E501 + + Creates a new version of entities (or a single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group. There are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: - `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version; - `saveAttributes` - to save attributes of server scope (and also shared scope for devices); - `saveCredentials` - when saving a version of a device, to add its credentials to the version; - `savePermissions` - when saving a user group - to save group permission list; - `saveGroupEntities` - when saving an entity group - to save its entities as well. An example of a `SINGLE_ENTITY` version create request: ```json { \"type\": \"SINGLE_ENTITY\", \"versionName\": \"Version 1.0\", \"branch\": \"dev\", \"entityId\": { \"entityType\": \"DEVICE\", \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\" }, \"config\": { \"saveRelations\": true, \"saveAttributes\": true, \"saveCredentials\": false } } ``` Second request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties: - `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities; - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated). - `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type. Example for this type of request: ```json { \"type\": \"COMPLEX\", \"versionName\": \"Devices and profiles: release 2\", \"branch\": \"master\", \"syncStrategy\": \"OVERWRITE\", \"entityTypes\": { \"DEVICE\": { \"syncStrategy\": null, \"allEntities\": true, \"saveRelations\": true, \"saveAttributes\": true, \"saveCredentials\": true }, \"DEVICE_PROFILE\": { \"syncStrategy\": \"MERGE\", \"allEntities\": false, \"entityIds\": [ \"b79448e0-d4f4-11ec-847b-0f432358ab48\" ], \"saveRelations\": true } } } ``` Response wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_entities_version_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param VersionCreateRequest body: + :return: DeferredResultuuid + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_entities_version_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entities/vc/version', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultuuid', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/entity_group_controller_api.py b/tb_rest_client/api/api_pe/entity_group_controller_api.py index 790bf882..8f8cd252 100644 --- a/tb_rest_client/api/api_pe/entity_group_controller_api.py +++ b/tb_rest_client/api/api_pe/entity_group_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -458,6 +458,7 @@ def get_edge_entity_groups_using_get(self, edge_id, group_type, page_size, page, :param str group_type: EntityGroup type (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityGroupInfo @@ -485,6 +486,7 @@ def get_edge_entity_groups_using_get_with_http_info(self, edge_id, group_type, p :param str group_type: EntityGroup type (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityGroupInfo @@ -492,7 +494,7 @@ def get_edge_entity_groups_using_get_with_http_info(self, edge_id, group_type, p returns the request thread. """ - all_params = ['edge_id', 'group_type', 'page_size', 'page', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['edge_id', 'group_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -537,6 +539,8 @@ def get_edge_entity_groups_using_get_with_http_info(self, edge_id, group_type, p query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 if 'sort_order' in params: @@ -556,7 +560,7 @@ def get_edge_entity_groups_using_get_with_http_info(self, edge_id, group_type, p auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entityGroups/edge/{edgeId}/{groupType}{?page,pageSize,sortOrder,sortProperty}', 'GET', + '/api/entityGroups/edge/{edgeId}/{groupType}{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, @@ -1019,45 +1023,45 @@ def get_entity_group_by_owner_and_name_and_type_using_get_with_http_info(self, o _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_entity_groups_by_ids_using_get(self, entity_group_ids, **kwargs): # noqa: E501 - """Get Entity Groups by Ids (getDevicesByIds) # noqa: E501 + def get_entity_group_entity_info_by_id_using_get(self, entity_group_id, **kwargs): # noqa: E501 + """Get Entity Group Entity Info (getEntityGroupEntityInfoById) # noqa: E501 - Requested devices must be owned by tenant or assigned to customer which user is performing the request. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. Entity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_entity_groups_by_ids_using_get(entity_group_ids, async_req=True) + >>> thread = api.get_entity_group_entity_info_by_id_using_get(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_group_ids: A list of group ids, separated by comma ',' (required) - :return: list[EntityGroup] + :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EntityInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_entity_groups_by_ids_using_get_with_http_info(entity_group_ids, **kwargs) # noqa: E501 + return self.get_entity_group_entity_info_by_id_using_get_with_http_info(entity_group_id, **kwargs) # noqa: E501 else: - (data) = self.get_entity_groups_by_ids_using_get_with_http_info(entity_group_ids, **kwargs) # noqa: E501 + (data) = self.get_entity_group_entity_info_by_id_using_get_with_http_info(entity_group_id, **kwargs) # noqa: E501 return data - def get_entity_groups_by_ids_using_get_with_http_info(self, entity_group_ids, **kwargs): # noqa: E501 - """Get Entity Groups by Ids (getDevicesByIds) # noqa: E501 + def get_entity_group_entity_info_by_id_using_get_with_http_info(self, entity_group_id, **kwargs): # noqa: E501 + """Get Entity Group Entity Info (getEntityGroupEntityInfoById) # noqa: E501 - Requested devices must be owned by tenant or assigned to customer which user is performing the request. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. Entity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_entity_groups_by_ids_using_get_with_http_info(entity_group_ids, async_req=True) + >>> thread = api.get_entity_group_entity_info_by_id_using_get_with_http_info(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_group_ids: A list of group ids, separated by comma ',' (required) - :return: list[EntityGroup] + :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EntityInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_group_ids'] # noqa: E501 + all_params = ['entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1068,22 +1072,22 @@ def get_entity_groups_by_ids_using_get_with_http_info(self, entity_group_ids, ** if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_entity_groups_by_ids_using_get" % key + " to method get_entity_group_entity_info_by_id_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'entity_group_ids' is set - if ('entity_group_ids' not in params or - params['entity_group_ids'] is None): - raise ValueError("Missing the required parameter `entity_group_ids` when calling `get_entity_groups_by_ids_using_get`") # noqa: E501 + # verify the required parameter 'entity_group_id' is set + if ('entity_group_id' not in params or + params['entity_group_id'] is None): + raise ValueError("Missing the required parameter `entity_group_id` when calling `get_entity_group_entity_info_by_id_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'entity_group_id' in params: + path_params['entityGroupId'] = params['entity_group_id'] # noqa: E501 query_params = [] - if 'entity_group_ids' in params: - query_params.append(('entityGroupIds', params['entity_group_ids'])) # noqa: E501 header_params = {} @@ -1099,14 +1103,14 @@ def get_entity_groups_by_ids_using_get_with_http_info(self, entity_group_ids, ** auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entityGroups{?entityGroupIds}', 'GET', + '/api/entityGroupInfo/{entityGroupId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityGroup]', # noqa: E501 + response_type='EntityInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1114,49 +1118,45 @@ def get_entity_groups_by_ids_using_get_with_http_info(self, entity_group_ids, ** _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_entity_groups_by_owner_and_type_using_get(self, owner_type, owner_id, group_type, **kwargs): # noqa: E501 - """Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndType) # noqa: E501 + def get_entity_group_entity_infos_by_ids_using_get(self, entity_group_ids, **kwargs): # noqa: E501 + """Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds) # noqa: E501 - Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_entity_groups_by_owner_and_type_using_get(owner_type, owner_id, group_type, async_req=True) + >>> thread = api.get_entity_group_entity_infos_by_ids_using_get(entity_group_ids, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner_type: Tenant or Customer (required) - :param str owner_id: A string value representing the Tenant or Customer id (required) - :param str group_type: Entity Group type (required) - :return: list[EntityGroupInfo] + :param str entity_group_ids: A list of group ids, separated by comma ',' (required) + :return: list[EntityInfo] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_entity_groups_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, group_type, **kwargs) # noqa: E501 + return self.get_entity_group_entity_infos_by_ids_using_get_with_http_info(entity_group_ids, **kwargs) # noqa: E501 else: - (data) = self.get_entity_groups_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, group_type, **kwargs) # noqa: E501 + (data) = self.get_entity_group_entity_infos_by_ids_using_get_with_http_info(entity_group_ids, **kwargs) # noqa: E501 return data - def get_entity_groups_by_owner_and_type_using_get_with_http_info(self, owner_type, owner_id, group_type, **kwargs): # noqa: E501 - """Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndType) # noqa: E501 + def get_entity_group_entity_infos_by_ids_using_get_with_http_info(self, entity_group_ids, **kwargs): # noqa: E501 + """Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds) # noqa: E501 - Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_entity_groups_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, group_type, async_req=True) + >>> thread = api.get_entity_group_entity_infos_by_ids_using_get_with_http_info(entity_group_ids, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner_type: Tenant or Customer (required) - :param str owner_id: A string value representing the Tenant or Customer id (required) - :param str group_type: Entity Group type (required) - :return: list[EntityGroupInfo] + :param str entity_group_ids: A list of group ids, separated by comma ',' (required) + :return: list[EntityInfo] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner_type', 'owner_id', 'group_type'] # noqa: E501 + all_params = ['entity_group_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1167,34 +1167,22 @@ def get_entity_groups_by_owner_and_type_using_get_with_http_info(self, owner_typ if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_entity_groups_by_owner_and_type_using_get" % key + " to method get_entity_group_entity_infos_by_ids_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'owner_type' is set - if ('owner_type' not in params or - params['owner_type'] is None): - raise ValueError("Missing the required parameter `owner_type` when calling `get_entity_groups_by_owner_and_type_using_get`") # noqa: E501 - # verify the required parameter 'owner_id' is set - if ('owner_id' not in params or - params['owner_id'] is None): - raise ValueError("Missing the required parameter `owner_id` when calling `get_entity_groups_by_owner_and_type_using_get`") # noqa: E501 - # verify the required parameter 'group_type' is set - if ('group_type' not in params or - params['group_type'] is None): - raise ValueError("Missing the required parameter `group_type` when calling `get_entity_groups_by_owner_and_type_using_get`") # noqa: E501 + # verify the required parameter 'entity_group_ids' is set + if ('entity_group_ids' not in params or + params['entity_group_ids'] is None): + raise ValueError("Missing the required parameter `entity_group_ids` when calling `get_entity_group_entity_infos_by_ids_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'owner_type' in params: - path_params['ownerType'] = params['owner_type'] # noqa: E501 - if 'owner_id' in params: - path_params['ownerId'] = params['owner_id'] # noqa: E501 - if 'group_type' in params: - path_params['groupType'] = params['group_type'] # noqa: E501 query_params = [] + if 'entity_group_ids' in params: + query_params.append(('entityGroupIds', params['entity_group_ids'])) # noqa: E501 header_params = {} @@ -1210,14 +1198,14 @@ def get_entity_groups_by_owner_and_type_using_get_with_http_info(self, owner_typ auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entityGroups/{ownerType}/{ownerId}/{groupType}', 'GET', + '/api/entityGroupInfos{?entityGroupIds}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityGroupInfo]', # noqa: E501 + response_type='list[EntityInfo]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1225,45 +1213,59 @@ def get_entity_groups_by_owner_and_type_using_get_with_http_info(self, owner_typ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_entity_groups_by_type_using_get(self, group_type, **kwargs): # noqa: E501 - """Get Entity Groups by entity type (getEntityGroupsByType) # noqa: E501 + def get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get(self, owner_type, owner_id, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink) # noqa: E501 - Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_entity_groups_by_type_using_get(group_type, async_req=True) + >>> thread = api.get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get(owner_type, owner_id, group_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) :param str group_type: Entity Group type (required) - :return: list[EntityGroupInfo] + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_entity_groups_by_type_using_get_with_http_info(group_type, **kwargs) # noqa: E501 + return self.get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_entity_groups_by_type_using_get_with_http_info(group_type, **kwargs) # noqa: E501 + (data) = self.get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, **kwargs) # noqa: E501 return data - def get_entity_groups_by_type_using_get_with_http_info(self, group_type, **kwargs): # noqa: E501 - """Get Entity Groups by entity type (getEntityGroupsByType) # noqa: E501 + def get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get_with_http_info(self, owner_type, owner_id, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink) # noqa: E501 - Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_entity_groups_by_type_using_get_with_http_info(group_type, async_req=True) + >>> thread = api.get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) :param str group_type: Entity Group type (required) - :return: list[EntityGroupInfo] + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['group_type'] # noqa: E501 + all_params = ['owner_type', 'owner_id', 'group_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1274,22 +1276,52 @@ def get_entity_groups_by_type_using_get_with_http_info(self, group_type, **kwarg if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_entity_groups_by_type_using_get" % key + " to method get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get" % key ) params[key] = val del params['kwargs'] + # verify the required parameter 'owner_type' is set + if ('owner_type' not in params or + params['owner_type'] is None): + raise ValueError("Missing the required parameter `owner_type` when calling `get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'owner_id' is set + if ('owner_id' not in params or + params['owner_id'] is None): + raise ValueError("Missing the required parameter `owner_id` when calling `get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get`") # noqa: E501 # verify the required parameter 'group_type' is set if ('group_type' not in params or params['group_type'] is None): - raise ValueError("Missing the required parameter `group_type` when calling `get_entity_groups_by_type_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'owner_type' in params: + path_params['ownerType'] = params['owner_type'] # noqa: E501 + if 'owner_id' in params: + path_params['ownerId'] = params['owner_id'] # noqa: E501 if 'group_type' in params: path_params['groupType'] = params['group_type'] # noqa: E501 query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} @@ -1305,14 +1337,14 @@ def get_entity_groups_by_type_using_get_with_http_info(self, group_type, **kwarg auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entityGroups/{groupType}', 'GET', + '/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityGroupInfo]', # noqa: E501 + response_type='PageDataEntityInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1320,47 +1352,57 @@ def get_entity_groups_by_type_using_get_with_http_info(self, group_type, **kwarg _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_entity_groups_for_entity_using_get(self, entity_type, entity_id, **kwargs): # noqa: E501 - """Get Entity Groups by Entity Id (getEntityGroupsForEntity) # noqa: E501 + def get_entity_group_entity_infos_by_type_and_page_link_using_get(self, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink) # noqa: E501 - Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_entity_groups_for_entity_using_get(entity_type, entity_id, async_req=True) + >>> thread = api.get_entity_group_entity_infos_by_type_and_page_link_using_get(group_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_type: Entity Group type (required) - :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: list[EntityGroupId] + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_shared: Whether to include shared entity groups. + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_entity_groups_for_entity_using_get_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + return self.get_entity_group_entity_infos_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_entity_groups_for_entity_using_get_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + (data) = self.get_entity_group_entity_infos_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, **kwargs) # noqa: E501 return data - def get_entity_groups_for_entity_using_get_with_http_info(self, entity_type, entity_id, **kwargs): # noqa: E501 - """Get Entity Groups by Entity Id (getEntityGroupsForEntity) # noqa: E501 + def get_entity_group_entity_infos_by_type_and_page_link_using_get_with_http_info(self, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink) # noqa: E501 - Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_entity_groups_for_entity_using_get_with_http_info(entity_type, entity_id, async_req=True) + >>> thread = api.get_entity_group_entity_infos_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_type: Entity Group type (required) - :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: list[EntityGroupId] + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_shared: Whether to include shared entity groups. + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id'] # noqa: E501 + all_params = ['group_type', 'page_size', 'page', 'include_shared', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1371,28 +1413,42 @@ def get_entity_groups_for_entity_using_get_with_http_info(self, entity_type, ent if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_entity_groups_for_entity_using_get" % key + " to method get_entity_group_entity_infos_by_type_and_page_link_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'entity_type' is set - if ('entity_type' not in params or - params['entity_type'] is None): - raise ValueError("Missing the required parameter `entity_type` when calling `get_entity_groups_for_entity_using_get`") # noqa: E501 - # verify the required parameter 'entity_id' is set - if ('entity_id' not in params or - params['entity_id'] is None): - raise ValueError("Missing the required parameter `entity_id` when calling `get_entity_groups_for_entity_using_get`") # noqa: E501 + # verify the required parameter 'group_type' is set + if ('group_type' not in params or + params['group_type'] is None): + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_group_entity_infos_by_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_entity_group_entity_infos_by_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_entity_group_entity_infos_by_type_and_page_link_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'entity_type' in params: - path_params['entityType'] = params['entity_type'] # noqa: E501 - if 'entity_id' in params: - path_params['entityId'] = params['entity_id'] # noqa: E501 + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 query_params = [] + if 'include_shared' in params: + query_params.append(('includeShared', params['include_shared'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} @@ -1408,14 +1464,14 @@ def get_entity_groups_for_entity_using_get_with_http_info(self, entity_type, ent auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entityGroups/{entityType}/{entityId}', 'GET', + '/api/entityGroupInfos/{groupType}{?includeShared,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityGroupId]', # noqa: E501 + response_type='PageDataEntityInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1423,47 +1479,59 @@ def get_entity_groups_for_entity_using_get_with_http_info(self, entity_type, ent _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_group_entity_using_get(self, entity_group_id, entity_id, **kwargs): # noqa: E501 - """Get Group Entity (getGroupEntity) # noqa: E501 + def get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get(self, owner_type, owner_id, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink) # noqa: E501 - Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_entity_using_get(entity_group_id, entity_id, async_req=True) + >>> thread = api.get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get(owner_type, owner_id, group_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: ShortEntityView + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_group_entity_using_get_with_http_info(entity_group_id, entity_id, **kwargs) # noqa: E501 + return self.get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_group_entity_using_get_with_http_info(entity_group_id, entity_id, **kwargs) # noqa: E501 + (data) = self.get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, **kwargs) # noqa: E501 return data - def get_group_entity_using_get_with_http_info(self, entity_group_id, entity_id, **kwargs): # noqa: E501 - """Get Group Entity (getGroupEntity) # noqa: E501 + def get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get_with_http_info(self, owner_type, owner_id, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink) # noqa: E501 - Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_group_entity_using_get_with_http_info(entity_group_id, entity_id, async_req=True) + >>> thread = api.get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: ShortEntityView + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_group_id', 'entity_id'] # noqa: E501 + all_params = ['owner_type', 'owner_id', 'group_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1474,23 +1542,963 @@ def get_group_entity_using_get_with_http_info(self, entity_group_id, entity_id, if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_group_entity_using_get" % key + " to method get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'entity_group_id' is set - if ('entity_group_id' not in params or - params['entity_group_id'] is None): - raise ValueError("Missing the required parameter `entity_group_id` when calling `get_group_entity_using_get`") # noqa: E501 - # verify the required parameter 'entity_id' is set - if ('entity_id' not in params or - params['entity_id'] is None): - raise ValueError("Missing the required parameter `entity_id` when calling `get_group_entity_using_get`") # noqa: E501 + # verify the required parameter 'owner_type' is set + if ('owner_type' not in params or + params['owner_type'] is None): + raise ValueError("Missing the required parameter `owner_type` when calling `get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'owner_id' is set + if ('owner_id' not in params or + params['owner_id'] is None): + raise ValueError("Missing the required parameter `owner_id` when calling `get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'group_type' is set + if ('group_type' not in params or + params['group_type'] is None): + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'entity_group_id' in params: + if 'owner_type' in params: + path_params['ownerType'] = params['owner_type'] # noqa: E501 + if 'owner_id' in params: + path_params['ownerId'] = params['owner_id'] # noqa: E501 + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEntityInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_entity_groups_by_ids_using_get(self, entity_group_ids, **kwargs): # noqa: E501 + """Get Entity Groups by Ids (getEntityGroupsByIds) # noqa: E501 + + Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_by_ids_using_get(entity_group_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_group_ids: A list of group ids, separated by comma ',' (required) + :return: list[EntityGroupInfo] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_entity_groups_by_ids_using_get_with_http_info(entity_group_ids, **kwargs) # noqa: E501 + else: + (data) = self.get_entity_groups_by_ids_using_get_with_http_info(entity_group_ids, **kwargs) # noqa: E501 + return data + + def get_entity_groups_by_ids_using_get_with_http_info(self, entity_group_ids, **kwargs): # noqa: E501 + """Get Entity Groups by Ids (getEntityGroupsByIds) # noqa: E501 + + Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_by_ids_using_get_with_http_info(entity_group_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_group_ids: A list of group ids, separated by comma ',' (required) + :return: list[EntityGroupInfo] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_group_ids'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_entity_groups_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_group_ids' is set + if ('entity_group_ids' not in params or + params['entity_group_ids'] is None): + raise ValueError("Missing the required parameter `entity_group_ids` when calling `get_entity_groups_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'entity_group_ids' in params: + query_params.append(('entityGroupIds', params['entity_group_ids'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroups{?entityGroupIds}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntityGroupInfo]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_entity_groups_by_owner_and_type_and_page_link_using_get(self, owner_type, owner_id, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink) # noqa: E501 + + Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_by_owner_and_type_and_page_link_using_get(owner_type, owner_id, group_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_entity_groups_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_entity_groups_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, **kwargs) # noqa: E501 + return data + + def get_entity_groups_by_owner_and_type_and_page_link_using_get_with_http_info(self, owner_type, owner_id, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink) # noqa: E501 + + Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner_type', 'owner_id', 'group_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_entity_groups_by_owner_and_type_and_page_link_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner_type' is set + if ('owner_type' not in params or + params['owner_type'] is None): + raise ValueError("Missing the required parameter `owner_type` when calling `get_entity_groups_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'owner_id' is set + if ('owner_id' not in params or + params['owner_id'] is None): + raise ValueError("Missing the required parameter `owner_id` when calling `get_entity_groups_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'group_type' is set + if ('group_type' not in params or + params['group_type'] is None): + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_groups_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_entity_groups_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_entity_groups_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner_type' in params: + path_params['ownerType'] = params['owner_type'] # noqa: E501 + if 'owner_id' in params: + path_params['ownerId'] = params['owner_id'] # noqa: E501 + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroups/{ownerType}/{ownerId}/{groupType}{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEntityGroupInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_entity_groups_by_owner_and_type_using_get(self, owner_type, owner_id, group_type, **kwargs): # noqa: E501 + """Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndType) # noqa: E501 + + Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_by_owner_and_type_using_get(owner_type, owner_id, group_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) + :param str group_type: Entity Group type (required) + :return: list[EntityGroupInfo] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_entity_groups_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, group_type, **kwargs) # noqa: E501 + else: + (data) = self.get_entity_groups_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, group_type, **kwargs) # noqa: E501 + return data + + def get_entity_groups_by_owner_and_type_using_get_with_http_info(self, owner_type, owner_id, group_type, **kwargs): # noqa: E501 + """Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndType) # noqa: E501 + + Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, group_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) + :param str group_type: Entity Group type (required) + :return: list[EntityGroupInfo] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner_type', 'owner_id', 'group_type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_entity_groups_by_owner_and_type_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner_type' is set + if ('owner_type' not in params or + params['owner_type'] is None): + raise ValueError("Missing the required parameter `owner_type` when calling `get_entity_groups_by_owner_and_type_using_get`") # noqa: E501 + # verify the required parameter 'owner_id' is set + if ('owner_id' not in params or + params['owner_id'] is None): + raise ValueError("Missing the required parameter `owner_id` when calling `get_entity_groups_by_owner_and_type_using_get`") # noqa: E501 + # verify the required parameter 'group_type' is set + if ('group_type' not in params or + params['group_type'] is None): + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_groups_by_owner_and_type_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner_type' in params: + path_params['ownerType'] = params['owner_type'] # noqa: E501 + if 'owner_id' in params: + path_params['ownerId'] = params['owner_id'] # noqa: E501 + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroups/{ownerType}/{ownerId}/{groupType}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntityGroupInfo]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_entity_groups_by_type_and_page_link_using_get(self, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink) # noqa: E501 + + Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_by_type_and_page_link_using_get(group_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_shared: Whether to include shared entity groups. + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_entity_groups_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_entity_groups_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, **kwargs) # noqa: E501 + return data + + def get_entity_groups_by_type_and_page_link_using_get_with_http_info(self, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink) # noqa: E501 + + Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_shared: Whether to include shared entity groups. + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['group_type', 'page_size', 'page', 'include_shared', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_entity_groups_by_type_and_page_link_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'group_type' is set + if ('group_type' not in params or + params['group_type'] is None): + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_groups_by_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_entity_groups_by_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_entity_groups_by_type_and_page_link_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 + + query_params = [] + if 'include_shared' in params: + query_params.append(('includeShared', params['include_shared'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroups/{groupType}{?includeShared,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEntityGroupInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_entity_groups_by_type_using_get(self, group_type, **kwargs): # noqa: E501 + """Get Entity Groups by entity type (getEntityGroupsByType) # noqa: E501 + + Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_by_type_using_get(group_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_type: Entity Group type (required) + :param bool include_shared: Whether to include shared entity groups. + :return: list[EntityGroupInfo] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_entity_groups_by_type_using_get_with_http_info(group_type, **kwargs) # noqa: E501 + else: + (data) = self.get_entity_groups_by_type_using_get_with_http_info(group_type, **kwargs) # noqa: E501 + return data + + def get_entity_groups_by_type_using_get_with_http_info(self, group_type, **kwargs): # noqa: E501 + """Get Entity Groups by entity type (getEntityGroupsByType) # noqa: E501 + + Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_by_type_using_get_with_http_info(group_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_type: Entity Group type (required) + :param bool include_shared: Whether to include shared entity groups. + :return: list[EntityGroupInfo] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['group_type', 'include_shared'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_entity_groups_by_type_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'group_type' is set + if ('group_type' not in params or + params['group_type'] is None): + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_groups_by_type_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 + + query_params = [] + if 'include_shared' in params: + query_params.append(('includeShared', params['include_shared'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroups/{groupType}{?includeShared}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntityGroupInfo]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_entity_groups_for_entity_using_get(self, entity_type, entity_id, **kwargs): # noqa: E501 + """Get Entity Groups by Entity Id (getEntityGroupsForEntity) # noqa: E501 + + Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_for_entity_using_get(entity_type, entity_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: Entity Group type (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: list[EntityGroupId] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_entity_groups_for_entity_using_get_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + else: + (data) = self.get_entity_groups_for_entity_using_get_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + return data + + def get_entity_groups_for_entity_using_get_with_http_info(self, entity_type, entity_id, **kwargs): # noqa: E501 + """Get Entity Groups by Entity Id (getEntityGroupsForEntity) # noqa: E501 + + Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_for_entity_using_get_with_http_info(entity_type, entity_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: Entity Group type (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: list[EntityGroupId] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_type', 'entity_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_entity_groups_for_entity_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `get_entity_groups_for_entity_using_get`") # noqa: E501 + # verify the required parameter 'entity_id' is set + if ('entity_id' not in params or + params['entity_id'] is None): + raise ValueError("Missing the required parameter `entity_id` when calling `get_entity_groups_for_entity_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + if 'entity_id' in params: + path_params['entityId'] = params['entity_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroups/{entityType}/{entityId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntityGroupId]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get(self, owner_type, owner_id, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink) # noqa: E501 + + Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get(owner_type, owner_id, group_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, **kwargs) # noqa: E501 + return data + + def get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get_with_http_info(self, owner_type, owner_id, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink) # noqa: E501 + + Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get_with_http_info(owner_type, owner_id, group_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner_type', 'owner_id', 'group_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner_type' is set + if ('owner_type' not in params or + params['owner_type'] is None): + raise ValueError("Missing the required parameter `owner_type` when calling `get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'owner_id' is set + if ('owner_id' not in params or + params['owner_id'] is None): + raise ValueError("Missing the required parameter `owner_id` when calling `get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'group_type' is set + if ('group_type' not in params or + params['group_type'] is None): + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner_type' in params: + path_params['ownerType'] = params['owner_type'] # noqa: E501 + if 'owner_id' in params: + path_params['ownerId'] = params['owner_id'] # noqa: E501 + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEntityGroupInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_group_entity_using_get(self, entity_group_id, entity_id, **kwargs): # noqa: E501 + """Get Group Entity (getGroupEntity) # noqa: E501 + + Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_entity_using_get(entity_group_id, entity_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: ShortEntityView + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_group_entity_using_get_with_http_info(entity_group_id, entity_id, **kwargs) # noqa: E501 + else: + (data) = self.get_group_entity_using_get_with_http_info(entity_group_id, entity_id, **kwargs) # noqa: E501 + return data + + def get_group_entity_using_get_with_http_info(self, entity_group_id, entity_id, **kwargs): # noqa: E501 + """Get Group Entity (getGroupEntity) # noqa: E501 + + Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_entity_using_get_with_http_info(entity_group_id, entity_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: ShortEntityView + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_group_id', 'entity_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_group_entity_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_group_id' is set + if ('entity_group_id' not in params or + params['entity_group_id'] is None): + raise ValueError("Missing the required parameter `entity_group_id` when calling `get_group_entity_using_get`") # noqa: E501 + # verify the required parameter 'entity_id' is set + if ('entity_id' not in params or + params['entity_id'] is None): + raise ValueError("Missing the required parameter `entity_id` when calling `get_group_entity_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_group_id' in params: path_params['entityGroupId'] = params['entity_group_id'] # noqa: E501 if 'entity_id' in params: path_params['entityId'] = params['entity_id'] # noqa: E501 @@ -1511,14 +2519,347 @@ def get_group_entity_using_get_with_http_info(self, entity_group_id, entity_id, auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entityGroup/{entityGroupId}/{entityId}', 'GET', + '/api/entityGroup/{entityGroupId}/{entityId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ShortEntityView', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_owner_info_using_get(self, owner_type, owner_id, **kwargs): # noqa: E501 + """Get Owner Info (getOwnerInfo) # noqa: E501 + + Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_owner_info_using_get(owner_type, owner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) + :return: EntityInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_owner_info_using_get_with_http_info(owner_type, owner_id, **kwargs) # noqa: E501 + else: + (data) = self.get_owner_info_using_get_with_http_info(owner_type, owner_id, **kwargs) # noqa: E501 + return data + + def get_owner_info_using_get_with_http_info(self, owner_type, owner_id, **kwargs): # noqa: E501 + """Get Owner Info (getOwnerInfo) # noqa: E501 + + Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_owner_info_using_get_with_http_info(owner_type, owner_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner_type: Tenant or Customer (required) + :param str owner_id: A string value representing the Tenant or Customer id (required) + :return: EntityInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner_type', 'owner_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_owner_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner_type' is set + if ('owner_type' not in params or + params['owner_type'] is None): + raise ValueError("Missing the required parameter `owner_type` when calling `get_owner_info_using_get`") # noqa: E501 + # verify the required parameter 'owner_id' is set + if ('owner_id' not in params or + params['owner_id'] is None): + raise ValueError("Missing the required parameter `owner_id` when calling `get_owner_info_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner_type' in params: + path_params['ownerType'] = params['owner_type'] # noqa: E501 + if 'owner_id' in params: + path_params['ownerId'] = params['owner_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/ownerInfo/{ownerType}/{ownerId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EntityInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_owner_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get Owner Infos (getOwnerInfos) # noqa: E501 + + Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_owner_infos_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_owner_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_owner_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_owner_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get Owner Infos (getOwnerInfos) # noqa: E501 + + Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_owner_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_owner_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_owner_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_owner_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/ownerInfos{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEntityInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_owners_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get Owners (getOwners) # noqa: E501 + + Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_owners_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataContactBasedobject + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_owners_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_owners_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_owners_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get Owners (getOwners) # noqa: E501 + + Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_owners_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataContactBasedobject + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_owners_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_owners_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_owners_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/owners{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ShortEntityView', # noqa: E501 + response_type='PageDataContactBasedobject', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1526,53 +2867,55 @@ def get_group_entity_using_get_with_http_info(self, entity_group_id, entity_id, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_owners_using_get(self, page_size, page, **kwargs): # noqa: E501 - """Get Owners (getOwners) # noqa: E501 + def get_shared_entity_group_entity_infos_by_type_and_page_link_using_get(self, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink) # noqa: E501 - Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_owners_using_get(page_size, page, async_req=True) + >>> thread = api.get_shared_entity_group_entity_infos_by_type_and_page_link_using_get(group_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str group_type: Entity Group type (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataContactBasedobject + :return: PageDataEntityInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_owners_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.get_shared_entity_group_entity_infos_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_owners_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.get_shared_entity_group_entity_infos_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, **kwargs) # noqa: E501 return data - def get_owners_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """Get Owners (getOwners) # noqa: E501 + def get_shared_entity_group_entity_infos_by_type_and_page_link_using_get_with_http_info(self, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink) # noqa: E501 - Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_owners_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_shared_entity_group_entity_infos_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str group_type: Entity Group type (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataContactBasedobject + :return: PageDataEntityInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['group_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1583,22 +2926,28 @@ def get_owners_using_get_with_http_info(self, page_size, page, **kwargs): # noq if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_owners_using_get" % key + " to method get_shared_entity_group_entity_infos_by_type_and_page_link_using_get" % key ) params[key] = val del params['kwargs'] + # verify the required parameter 'group_type' is set + if ('group_type' not in params or + params['group_type'] is None): + raise ValueError("Missing the required parameter `group_type` when calling `get_shared_entity_group_entity_infos_by_type_and_page_link_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError("Missing the required parameter `page_size` when calling `get_owners_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_shared_entity_group_entity_infos_by_type_and_page_link_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError("Missing the required parameter `page` when calling `get_owners_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_shared_entity_group_entity_infos_by_type_and_page_link_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 query_params = [] if 'page_size' in params: @@ -1626,14 +2975,232 @@ def get_owners_using_get_with_http_info(self, page_size, page, **kwargs): # noq auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/owners{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + '/api/entityGroupInfos/{groupType}/shared{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataContactBasedobject', # noqa: E501 + response_type='PageDataEntityInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_shared_entity_groups_by_type_and_page_link_using_get(self, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink) # noqa: E501 + + Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_shared_entity_groups_by_type_and_page_link_using_get(group_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_shared_entity_groups_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_shared_entity_groups_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, **kwargs) # noqa: E501 + return data + + def get_shared_entity_groups_by_type_and_page_link_using_get_with_http_info(self, group_type, page_size, page, **kwargs): # noqa: E501 + """Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink) # noqa: E501 + + Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_shared_entity_groups_by_type_and_page_link_using_get_with_http_info(group_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_type: Entity Group type (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the entity group name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['group_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_shared_entity_groups_by_type_and_page_link_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'group_type' is set + if ('group_type' not in params or + params['group_type'] is None): + raise ValueError("Missing the required parameter `group_type` when calling `get_shared_entity_groups_by_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_shared_entity_groups_by_type_and_page_link_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_shared_entity_groups_by_type_and_page_link_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroups/{groupType}/shared{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEntityGroupInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_shared_entity_groups_by_type_using_get(self, group_type, **kwargs): # noqa: E501 + """Get Shared Entity Groups by entity type (getSharedEntityGroupsByType) # noqa: E501 + + Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_shared_entity_groups_by_type_using_get(group_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_type: Entity Group type (required) + :return: list[EntityGroupInfo] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_shared_entity_groups_by_type_using_get_with_http_info(group_type, **kwargs) # noqa: E501 + else: + (data) = self.get_shared_entity_groups_by_type_using_get_with_http_info(group_type, **kwargs) # noqa: E501 + return data + + def get_shared_entity_groups_by_type_using_get_with_http_info(self, group_type, **kwargs): # noqa: E501 + """Get Shared Entity Groups by entity type (getSharedEntityGroupsByType) # noqa: E501 + + Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_shared_entity_groups_by_type_using_get_with_http_info(group_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_type: Entity Group type (required) + :return: list[EntityGroupInfo] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['group_type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_shared_entity_groups_by_type_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'group_type' is set + if ('group_type' not in params or + params['group_type'] is None): + raise ValueError("Missing the required parameter `group_type` when calling `get_shared_entity_groups_by_type_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroups/{groupType}/shared', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntityGroupInfo]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1937,7 +3504,7 @@ def remove_entities_from_entity_group_using_post_with_http_info(self, entity_gro def save_entity_group_using_post(self, **kwargs): # noqa: E501 """Create Or Update Entity Group (saveEntityGroup) # noqa: E501 - Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error. Entity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. # noqa: E501 + Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. Entity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_group_using_post(async_req=True) @@ -1959,7 +3526,7 @@ def save_entity_group_using_post(self, **kwargs): # noqa: E501 def save_entity_group_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Entity Group (saveEntityGroup) # noqa: E501 - Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error. Entity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. # noqa: E501 + Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. Entity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_group_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_pe/entity_query_controller_api.py b/tb_rest_client/api/api_pe/entity_query_controller_api.py index dece9466..b8cad7d2 100644 --- a/tb_rest_client/api/api_pe/entity_query_controller_api.py +++ b/tb_rest_client/api/api_pe/entity_query_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,6 +32,101 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def count_alarms_by_query_using_post(self, **kwargs): # noqa: E501 + """Count Alarms by Query (countAlarmsByQuery) # noqa: E501 + + Returns the number of alarms that match the query definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.count_alarms_by_query_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AlarmCountQuery body: + :return: int + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.count_alarms_by_query_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.count_alarms_by_query_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def count_alarms_by_query_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Count Alarms by Query (countAlarmsByQuery) # noqa: E501 + + Returns the number of alarms that match the query definition. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.count_alarms_by_query_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AlarmCountQuery body: + :return: int + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method count_alarms_by_query_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/alarmsQuery/count', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='int', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def count_entities_by_query_using_post(self, **kwargs): # noqa: E501 """Count Entities by Query # noqa: E501 diff --git a/tb_rest_client/api/api_pe/entity_relation_controller_api.py b/tb_rest_client/api/api_pe/entity_relation_controller_api.py index 83a6a711..75f1be6f 100644 --- a/tb_rest_client/api/api_pe/entity_relation_controller_api.py +++ b/tb_rest_client/api/api_pe/entity_relation_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/entity_view_controller_api.py b/tb_rest_client/api/api_pe/entity_view_controller_api.py index 76e23406..76787902 100644 --- a/tb_rest_client/api/api_pe/entity_view_controller_api.py +++ b/tb_rest_client/api/api_pe/entity_view_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -222,6 +222,260 @@ def find_by_query_using_post4_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_all_entity_view_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get All Entity View Infos for current user (getAllEntityViewInfos) # noqa: E501 + + Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_entity_view_infos_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` + :param str text_search: The case insensitive 'substring' filter based on the entity view name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityViewInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_all_entity_view_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_all_entity_view_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_all_entity_view_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get All Entity View Infos for current user (getAllEntityViewInfos) # noqa: E501 + + Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_entity_view_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` + :param str text_search: The case insensitive 'substring' filter based on the entity view name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityViewInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'include_customers', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_entity_view_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_all_entity_view_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_all_entity_view_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityViewInfos/all{?includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEntityViewInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_customer_entity_view_infos_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Entity View Infos (getCustomerEntityViewInfos) # noqa: E501 + + Returns a page of entity view info objects owned by the specified customer. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_entity_view_infos_using_get(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` + :param str text_search: The case insensitive 'substring' filter based on the entity view name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityViewInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_customer_entity_view_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_entity_view_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_customer_entity_view_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Entity View Infos (getCustomerEntityViewInfos) # noqa: E501 + + Returns a page of entity view info objects owned by the specified customer. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_entity_view_infos_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` + :param str text_search: The case insensitive 'substring' filter based on the entity view name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataEntityViewInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['customer_id', 'page_size', 'page', 'include_customers', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer_entity_view_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'customer_id' is set + if ('customer_id' not in params or + params['customer_id'] is None): + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_entity_view_infos_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_entity_view_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_customer_entity_view_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/entityViewInfos{?includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch,type}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEntityViewInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_customer_entity_views_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 """Get Customer Entity Views (getCustomerEntityViews) # noqa: E501 @@ -236,7 +490,7 @@ def get_customer_entity_views_using_get(self, customer_id, page_size, page, **kw :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -264,7 +518,7 @@ def get_customer_entity_views_using_get_with_http_info(self, customer_id, page_s :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -444,6 +698,101 @@ def get_entity_view_by_id_using_get_with_http_info(self, entity_view_id, **kwarg _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_entity_view_info_by_id_using_get(self, entity_view_id, **kwargs): # noqa: E501 + """Get entity view info (getEntityViewInfoById) # noqa: E501 + + Fetch the Entity View info object based on the provided entity view id. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_view_info_by_id_using_get(entity_view_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_view_id: A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EntityViewInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_entity_view_info_by_id_using_get_with_http_info(entity_view_id, **kwargs) # noqa: E501 + else: + (data) = self.get_entity_view_info_by_id_using_get_with_http_info(entity_view_id, **kwargs) # noqa: E501 + return data + + def get_entity_view_info_by_id_using_get_with_http_info(self, entity_view_id, **kwargs): # noqa: E501 + """Get entity view info (getEntityViewInfoById) # noqa: E501 + + Fetch the Entity View info object based on the provided entity view id. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_entity_view_info_by_id_using_get_with_http_info(entity_view_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_view_id: A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: EntityViewInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_view_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_entity_view_info_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_view_id' is set + if ('entity_view_id' not in params or + params['entity_view_id'] is None): + raise ValueError("Missing the required parameter `entity_view_id` when calling `get_entity_view_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_view_id' in params: + path_params['entityViewId'] = params['entity_view_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityView/info/{entityViewId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EntityViewInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_entity_view_types_using_get(self, **kwargs): # noqa: E501 """Get Entity View Types (getEntityViewTypes) # noqa: E501 @@ -544,7 +893,7 @@ def get_entity_views_by_entity_group_id_using_get(self, entity_group_id, page_si :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -571,7 +920,7 @@ def get_entity_views_by_entity_group_id_using_get_with_http_info(self, entity_gr :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -857,7 +1206,7 @@ def get_tenant_entity_views_using_get(self, page_size, page, **kwargs): # noqa: :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -884,7 +1233,7 @@ def get_tenant_entity_views_using_get_with_http_info(self, page_size, page, **kw :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -976,7 +1325,7 @@ def get_user_entity_views_using_get(self, page_size, page, **kwargs): # noqa: E :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -1003,7 +1352,7 @@ def get_user_entity_views_using_get_with_http_info(self, page_size, page, **kwar :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: ## Entity View Filter Allows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT': ```json { \"type\": \"entityViewType\", \"entityViewType\": \"Concrete Mixer\", \"entityViewNameFilter\": \"CAT\" } ``` - :param str text_search: The case insensitive 'startsWith' filter based on the entity view name. + :param str text_search: The case insensitive 'substring' filter based on the entity view name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityView @@ -1085,7 +1434,7 @@ def get_user_entity_views_using_get_with_http_info(self, page_size, page, **kwar def save_entity_view_using_post(self, **kwargs): # noqa: E501 """Save or update entity view (saveEntityView) # noqa: E501 - Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details. # noqa: E501 + Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_view_using_post(async_req=True) @@ -1094,6 +1443,7 @@ def save_entity_view_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param EntityView body: :param str entity_group_id: entityGroupId + :param str entity_group_ids: entityGroupIds :return: EntityView If the method is called asynchronously, returns the request thread. @@ -1108,7 +1458,7 @@ def save_entity_view_using_post(self, **kwargs): # noqa: E501 def save_entity_view_using_post_with_http_info(self, **kwargs): # noqa: E501 """Save or update entity view (saveEntityView) # noqa: E501 - Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details. # noqa: E501 + Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_view_using_post_with_http_info(async_req=True) @@ -1117,12 +1467,13 @@ def save_entity_view_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param EntityView body: :param str entity_group_id: entityGroupId + :param str entity_group_ids: entityGroupIds :return: EntityView If the method is called asynchronously, returns the request thread. """ - all_params = ['body', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'entity_group_id', 'entity_group_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1145,6 +1496,8 @@ def save_entity_view_using_post_with_http_info(self, **kwargs): # noqa: E501 query_params = [] if 'entity_group_id' in params: query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 + if 'entity_group_ids' in params: + query_params.append(('entityGroupIds', params['entity_group_ids'])) # noqa: E501 header_params = {} @@ -1166,7 +1519,7 @@ def save_entity_view_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entityView{?entityGroupId}', 'POST', + '/api/entityView{?entityGroupId,entityGroupIds}', 'POST', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_pe/event_controller_api.py b/tb_rest_client/api/api_pe/event_controller_api.py index befa527b..2aadf5c3 100644 --- a/tb_rest_client/api/api_pe/event_controller_api.py +++ b/tb_rest_client/api/api_pe/event_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,10 +32,129 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def clear_events_using_post(self, entity_type, entity_id, **kwargs): # noqa: E501 + """Clear Events (clearEvents) # noqa: E501 + + Clears events by filter for specified entity. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.clear_events_using_post(entity_type, entity_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param EventFilter body: + :param int start_time: Timestamp. Events with creation time before it won't be queried. + :param int end_time: Timestamp. Events with creation time after it won't be queried. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.clear_events_using_post_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + else: + (data) = self.clear_events_using_post_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + return data + + def clear_events_using_post_with_http_info(self, entity_type, entity_id, **kwargs): # noqa: E501 + """Clear Events (clearEvents) # noqa: E501 + + Clears events by filter for specified entity. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.clear_events_using_post_with_http_info(entity_type, entity_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param EventFilter body: + :param int start_time: Timestamp. Events with creation time before it won't be queried. + :param int end_time: Timestamp. Events with creation time after it won't be queried. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_type', 'entity_id', 'body', 'start_time', 'end_time'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method clear_events_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `clear_events_using_post`") # noqa: E501 + # verify the required parameter 'entity_id' is set + if ('entity_id' not in params or + params['entity_id'] is None): + raise ValueError("Missing the required parameter `entity_id` when calling `clear_events_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + if 'entity_id' in params: + path_params['entityId'] = params['entity_id'] # noqa: E501 + + query_params = [] + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/events/{entityType}/{entityId}/clear{?endTime,startTime}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_events_using_get(self, entity_type, entity_id, tenant_id, page_size, page, **kwargs): # noqa: E501 - """Get Events (getEvents) # noqa: E501 + """Get Events (Deprecated) # noqa: E501 - Returns a page of events for specified entity. You can 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. # noqa: E501 + Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_events_using_get(entity_type, entity_id, tenant_id, page_size, page, async_req=True) @@ -52,7 +171,7 @@ def get_events_using_get(self, entity_type, entity_id, tenant_id, page_size, pag :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -64,9 +183,9 @@ def get_events_using_get(self, entity_type, entity_id, tenant_id, page_size, pag return data def get_events_using_get_with_http_info(self, entity_type, entity_id, tenant_id, page_size, page, **kwargs): # noqa: E501 - """Get Events (getEvents) # noqa: E501 + """Get Events (Deprecated) # noqa: E501 - Returns a page of events for specified entity. You can 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. # noqa: E501 + Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can 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. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_events_using_get_with_http_info(entity_type, entity_id, tenant_id, page_size, page, async_req=True) @@ -83,7 +202,7 @@ def get_events_using_get_with_http_info(self, entity_type, entity_id, tenant_id, :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -171,7 +290,7 @@ def get_events_using_get_with_http_info(self, entity_type, entity_id, tenant_id, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataEvent', # noqa: E501 + response_type='PageDataEventInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -200,7 +319,7 @@ def get_events_using_get1(self, entity_type, entity_id, event_type, tenant_id, p :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -232,7 +351,7 @@ def get_events_using_get1_with_http_info(self, entity_type, entity_id, event_typ :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -326,7 +445,7 @@ def get_events_using_get1_with_http_info(self, entity_type, entity_id, event_typ body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataEvent', # noqa: E501 + response_type='PageDataEventInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -355,7 +474,7 @@ def get_events_using_post(self, tenant_id, page_size, page, entity_type, entity_ :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -387,7 +506,7 @@ def get_events_using_post_with_http_info(self, tenant_id, page_size, page, entit :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :param int start_time: Timestamp. Events with creation time before it won't be queried. :param int end_time: Timestamp. Events with creation time after it won't be queried. - :return: PageDataEvent + :return: PageDataEventInfo If the method is called asynchronously, returns the request thread. """ @@ -481,7 +600,7 @@ def get_events_using_post_with_http_info(self, tenant_id, page_size, page, entit body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataEvent', # noqa: E501 + response_type='PageDataEventInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_pe/group_permission_controller_api.py b/tb_rest_client/api/api_pe/group_permission_controller_api.py index e4a76412..d1ee2a1f 100644 --- a/tb_rest_client/api/api_pe/group_permission_controller_api.py +++ b/tb_rest_client/api/api_pe/group_permission_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/integration_controller_api.py b/tb_rest_client/api/api_pe/integration_controller_api.py index bfdcf71d..59117fc1 100644 --- a/tb_rest_client/api/api_pe/integration_controller_api.py +++ b/tb_rest_client/api/api_pe/integration_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,1124 +32,47 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def check_integration_connection_using_post(self, **kwargs): # noqa: E501 - """Check integration connectivity (checkIntegrationConnection) # noqa: E501 - - Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.check_integration_connection_using_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param Integration body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.check_integration_connection_using_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.check_integration_connection_using_post_with_http_info(**kwargs) # noqa: E501 - return data - - def check_integration_connection_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Check integration connectivity (checkIntegrationConnection) # noqa: E501 - - Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.check_integration_connection_using_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param Integration body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method check_integration_connection_using_post" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/integration/check', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all_related_edges_missing_attributes_using_delete(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_delete(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_related_edges_missing_attributes_using_delete_with_http_info(integration_id, **kwargs) # noqa: E501 - else: - (data) = self.find_all_related_edges_missing_attributes_using_delete_with_http_info(integration_id, **kwargs) # noqa: E501 - return data - - def find_all_related_edges_missing_attributes_using_delete_with_http_info(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_delete_with_http_info(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['integration_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all_related_edges_missing_attributes_using_delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'integration_id' is set - if ('integration_id' not in params or - params['integration_id'] is None): - raise ValueError("Missing the required parameter `integration_id` when calling `find_all_related_edges_missing_attributes_using_delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'integration_id' in params: - path_params['integrationId'] = params['integration_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/integration/{integrationId}/allMissingAttributes', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all_related_edges_missing_attributes_using_head(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_head(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_related_edges_missing_attributes_using_head_with_http_info(integration_id, **kwargs) # noqa: E501 - else: - (data) = self.find_all_related_edges_missing_attributes_using_head_with_http_info(integration_id, **kwargs) # noqa: E501 - return data - - def find_all_related_edges_missing_attributes_using_head_with_http_info(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_head_with_http_info(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['integration_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all_related_edges_missing_attributes_using_head" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'integration_id' is set - if ('integration_id' not in params or - params['integration_id'] is None): - raise ValueError("Missing the required parameter `integration_id` when calling `find_all_related_edges_missing_attributes_using_head`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'integration_id' in params: - path_params['integrationId'] = params['integration_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/integration/{integrationId}/allMissingAttributes', 'HEAD', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all_related_edges_missing_attributes_using_options(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_options(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_related_edges_missing_attributes_using_options_with_http_info(integration_id, **kwargs) # noqa: E501 - else: - (data) = self.find_all_related_edges_missing_attributes_using_options_with_http_info(integration_id, **kwargs) # noqa: E501 - return data - - def find_all_related_edges_missing_attributes_using_options_with_http_info(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_options_with_http_info(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['integration_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all_related_edges_missing_attributes_using_options" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'integration_id' is set - if ('integration_id' not in params or - params['integration_id'] is None): - raise ValueError("Missing the required parameter `integration_id` when calling `find_all_related_edges_missing_attributes_using_options`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'integration_id' in params: - path_params['integrationId'] = params['integration_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/integration/{integrationId}/allMissingAttributes', 'OPTIONS', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all_related_edges_missing_attributes_using_patch(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_patch(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_related_edges_missing_attributes_using_patch_with_http_info(integration_id, **kwargs) # noqa: E501 - else: - (data) = self.find_all_related_edges_missing_attributes_using_patch_with_http_info(integration_id, **kwargs) # noqa: E501 - return data - - def find_all_related_edges_missing_attributes_using_patch_with_http_info(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_patch_with_http_info(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['integration_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all_related_edges_missing_attributes_using_patch" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'integration_id' is set - if ('integration_id' not in params or - params['integration_id'] is None): - raise ValueError("Missing the required parameter `integration_id` when calling `find_all_related_edges_missing_attributes_using_patch`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'integration_id' in params: - path_params['integrationId'] = params['integration_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/integration/{integrationId}/allMissingAttributes', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all_related_edges_missing_attributes_using_post(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_post(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_related_edges_missing_attributes_using_post_with_http_info(integration_id, **kwargs) # noqa: E501 - else: - (data) = self.find_all_related_edges_missing_attributes_using_post_with_http_info(integration_id, **kwargs) # noqa: E501 - return data - - def find_all_related_edges_missing_attributes_using_post_with_http_info(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_post_with_http_info(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['integration_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all_related_edges_missing_attributes_using_post" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'integration_id' is set - if ('integration_id' not in params or - params['integration_id'] is None): - raise ValueError("Missing the required parameter `integration_id` when calling `find_all_related_edges_missing_attributes_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'integration_id' in params: - path_params['integrationId'] = params['integration_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/integration/{integrationId}/allMissingAttributes', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all_related_edges_missing_attributes_using_put(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_put(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_related_edges_missing_attributes_using_put_with_http_info(integration_id, **kwargs) # noqa: E501 - else: - (data) = self.find_all_related_edges_missing_attributes_using_put_with_http_info(integration_id, **kwargs) # noqa: E501 - return data - - def find_all_related_edges_missing_attributes_using_put_with_http_info(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_put_with_http_info(integration_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['integration_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all_related_edges_missing_attributes_using_put" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'integration_id' is set - if ('integration_id' not in params or - params['integration_id'] is None): - raise ValueError("Missing the required parameter `integration_id` when calling `find_all_related_edges_missing_attributes_using_put`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'integration_id' in params: - path_params['integrationId'] = params['integration_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/integration/{integrationId}/allMissingAttributes', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_edge_missing_attributes_using_delete(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_delete(edge_id, integration_ids, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_edge_missing_attributes_using_delete_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 - else: - (data) = self.find_edge_missing_attributes_using_delete_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 - return data - - def find_edge_missing_attributes_using_delete_with_http_info(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_delete_with_http_info(edge_id, integration_ids, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['edge_id', 'integration_ids'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_edge_missing_attributes_using_delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'edge_id' is set - if ('edge_id' not in params or - params['edge_id'] is None): - raise ValueError("Missing the required parameter `edge_id` when calling `find_edge_missing_attributes_using_delete`") # noqa: E501 - # verify the required parameter 'integration_ids' is set - if ('integration_ids' not in params or - params['integration_ids'] is None): - raise ValueError("Missing the required parameter `integration_ids` when calling `find_edge_missing_attributes_using_delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - - query_params = [] - if 'integration_ids' in params: - query_params.append(('integrationIds', params['integration_ids'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/integration/{edgeId}/missingAttributes{?integrationIds}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_edge_missing_attributes_using_get(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_get(edge_id, integration_ids, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_edge_missing_attributes_using_get_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 - else: - (data) = self.find_edge_missing_attributes_using_get_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 - return data - - def find_edge_missing_attributes_using_get_with_http_info(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_get_with_http_info(edge_id, integration_ids, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['edge_id', 'integration_ids'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_edge_missing_attributes_using_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'edge_id' is set - if ('edge_id' not in params or - params['edge_id'] is None): - raise ValueError("Missing the required parameter `edge_id` when calling `find_edge_missing_attributes_using_get`") # noqa: E501 - # verify the required parameter 'integration_ids' is set - if ('integration_ids' not in params or - params['integration_ids'] is None): - raise ValueError("Missing the required parameter `integration_ids` when calling `find_edge_missing_attributes_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - - query_params = [] - if 'integration_ids' in params: - query_params.append(('integrationIds', params['integration_ids'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/integration/{edgeId}/missingAttributes{?integrationIds}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_edge_missing_attributes_using_head(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_head(edge_id, integration_ids, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_edge_missing_attributes_using_head_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 - else: - (data) = self.find_edge_missing_attributes_using_head_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 - return data - - def find_edge_missing_attributes_using_head_with_http_info(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_head_with_http_info(edge_id, integration_ids, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['edge_id', 'integration_ids'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_edge_missing_attributes_using_head" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'edge_id' is set - if ('edge_id' not in params or - params['edge_id'] is None): - raise ValueError("Missing the required parameter `edge_id` when calling `find_edge_missing_attributes_using_head`") # noqa: E501 - # verify the required parameter 'integration_ids' is set - if ('integration_ids' not in params or - params['integration_ids'] is None): - raise ValueError("Missing the required parameter `integration_ids` when calling `find_edge_missing_attributes_using_head`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - - query_params = [] - if 'integration_ids' in params: - query_params.append(('integrationIds', params['integration_ids'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/integration/{edgeId}/missingAttributes{?integrationIds}', 'HEAD', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_edge_missing_attributes_using_options(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 + def assign_integration_to_edge_using_post(self, edge_id, integration_id, **kwargs): # noqa: E501 + """Assign integration to edge (assignIntegrationToEdge) # noqa: E501 - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Creates assignment of an existing integration edge template to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. Only integration edge template can be assigned to edge. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_options(edge_id, integration_ids, async_req=True) + >>> thread = api.assign_integration_to_edge_using_post(edge_id, integration_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str + :param str edge_id: edgeId (required) + :param str integration_id: integrationId (required) + :return: Integration If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.find_edge_missing_attributes_using_options_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 + return self.assign_integration_to_edge_using_post_with_http_info(edge_id, integration_id, **kwargs) # noqa: E501 else: - (data) = self.find_edge_missing_attributes_using_options_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 + (data) = self.assign_integration_to_edge_using_post_with_http_info(edge_id, integration_id, **kwargs) # noqa: E501 return data - - def find_edge_missing_attributes_using_options_with_http_info(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_options_with_http_info(edge_id, integration_ids, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['edge_id', 'integration_ids'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_edge_missing_attributes_using_options" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'edge_id' is set - if ('edge_id' not in params or - params['edge_id'] is None): - raise ValueError("Missing the required parameter `edge_id` when calling `find_edge_missing_attributes_using_options`") # noqa: E501 - # verify the required parameter 'integration_ids' is set - if ('integration_ids' not in params or - params['integration_ids'] is None): - raise ValueError("Missing the required parameter `integration_ids` when calling `find_edge_missing_attributes_using_options`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - - query_params = [] - if 'integration_ids' in params: - query_params.append(('integrationIds', params['integration_ids'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/edge/integration/{edgeId}/missingAttributes{?integrationIds}', 'OPTIONS', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_edge_missing_attributes_using_patch(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_patch(edge_id, integration_ids, async_req=True) - >>> result = thread.get() - :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_edge_missing_attributes_using_patch_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 - else: - (data) = self.find_edge_missing_attributes_using_patch_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 - return data - - def find_edge_missing_attributes_using_patch_with_http_info(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 + def assign_integration_to_edge_using_post_with_http_info(self, edge_id, integration_id, **kwargs): # noqa: E501 + """Assign integration to edge (assignIntegrationToEdge) # noqa: E501 - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Creates assignment of an existing integration edge template to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. Only integration edge template can be assigned to edge. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_patch_with_http_info(edge_id, integration_ids, async_req=True) + >>> thread = api.assign_integration_to_edge_using_post_with_http_info(edge_id, integration_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str + :param str edge_id: edgeId (required) + :param str integration_id: integrationId (required) + :return: Integration If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'integration_ids'] # noqa: E501 + all_params = ['edge_id', 'integration_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1160,28 +83,28 @@ def find_edge_missing_attributes_using_patch_with_http_info(self, edge_id, integ if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method find_edge_missing_attributes_using_patch" % key + " to method assign_integration_to_edge_using_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set if ('edge_id' not in params or params['edge_id'] is None): - raise ValueError("Missing the required parameter `edge_id` when calling `find_edge_missing_attributes_using_patch`") # noqa: E501 - # verify the required parameter 'integration_ids' is set - if ('integration_ids' not in params or - params['integration_ids'] is None): - raise ValueError("Missing the required parameter `integration_ids` when calling `find_edge_missing_attributes_using_patch`") # noqa: E501 + raise ValueError("Missing the required parameter `edge_id` when calling `assign_integration_to_edge_using_post`") # noqa: E501 + # verify the required parameter 'integration_id' is set + if ('integration_id' not in params or + params['integration_id'] is None): + raise ValueError("Missing the required parameter `integration_id` when calling `assign_integration_to_edge_using_post`") # noqa: E501 collection_formats = {} path_params = {} if 'edge_id' in params: path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'integration_id' in params: + path_params['integrationId'] = params['integration_id'] # noqa: E501 query_params = [] - if 'integration_ids' in params: - query_params.append(('integrationIds', params['integration_ids'])) # noqa: E501 header_params = {} @@ -1197,62 +120,60 @@ def find_edge_missing_attributes_using_patch_with_http_info(self, edge_id, integ auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/integration/{edgeId}/missingAttributes{?integrationIds}', 'PATCH', + '/api/edge/{edgeId}/integration/{integrationId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='Integration', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def find_edge_missing_attributes_using_post(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + def check_integration_connection_using_post(self, **kwargs): # noqa: E501 + """Check integration connectivity (checkIntegrationConnection) # noqa: E501 + + Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_post(edge_id, integration_ids, async_req=True) + >>> thread = api.check_integration_connection_using_post(async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str + :param Integration body: + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.find_edge_missing_attributes_using_post_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 + return self.check_integration_connection_using_post_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.find_edge_missing_attributes_using_post_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 + (data) = self.check_integration_connection_using_post_with_http_info(**kwargs) # noqa: E501 return data - - def find_edge_missing_attributes_using_post_with_http_info(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + def check_integration_connection_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Check integration connectivity (checkIntegrationConnection) # noqa: E501 + + Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_post_with_http_info(edge_id, integration_ids, async_req=True) + >>> thread = api.check_integration_connection_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str + :param Integration body: + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'integration_ids'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1263,28 +184,16 @@ def find_edge_missing_attributes_using_post_with_http_info(self, edge_id, integr if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method find_edge_missing_attributes_using_post" % key + " to method check_integration_connection_using_post" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'edge_id' is set - if ('edge_id' not in params or - params['edge_id'] is None): - raise ValueError("Missing the required parameter `edge_id` when calling `find_edge_missing_attributes_using_post`") # noqa: E501 - # verify the required parameter 'integration_ids' is set - if ('integration_ids' not in params or - params['integration_ids'] is None): - raise ValueError("Missing the required parameter `integration_ids` when calling `find_edge_missing_attributes_using_post`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 query_params = [] - if 'integration_ids' in params: - query_params.append(('integrationIds', params['integration_ids'])) # noqa: E501 header_params = {} @@ -1292,70 +201,74 @@ def find_edge_missing_attributes_using_post_with_http_info(self, edge_id, integr local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/integration/{edgeId}/missingAttributes{?integrationIds}', 'POST', + '/api/integration/check', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def find_edge_missing_attributes_using_put(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + def delete_integration_using_delete(self, integration_id, **kwargs): # noqa: E501 + """Delete integration (deleteIntegration) # noqa: E501 + + Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_put(edge_id, integration_ids, async_req=True) + >>> thread = api.delete_integration_using_delete(integration_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str + :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.find_edge_missing_attributes_using_put_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 + return self.delete_integration_using_delete_with_http_info(integration_id, **kwargs) # noqa: E501 else: - (data) = self.find_edge_missing_attributes_using_put_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 + (data) = self.delete_integration_using_delete_with_http_info(integration_id, **kwargs) # noqa: E501 return data - - def find_edge_missing_attributes_using_put_with_http_info(self, edge_id, integration_ids, **kwargs): # noqa: E501 - """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + def delete_integration_using_delete_with_http_info(self, integration_id, **kwargs): # noqa: E501 + """Delete integration (deleteIntegration) # noqa: E501 + + Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_edge_missing_attributes_using_put_with_http_info(edge_id, integration_ids, async_req=True) + >>> thread = api.delete_integration_using_delete_with_http_info(integration_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) - :return: str + :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'integration_ids'] # noqa: E501 + all_params = ['integration_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1366,28 +279,22 @@ def find_edge_missing_attributes_using_put_with_http_info(self, edge_id, integra if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method find_edge_missing_attributes_using_put" % key + " to method delete_integration_using_delete" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'edge_id' is set - if ('edge_id' not in params or - params['edge_id'] is None): - raise ValueError("Missing the required parameter `edge_id` when calling `find_edge_missing_attributes_using_put`") # noqa: E501 - # verify the required parameter 'integration_ids' is set - if ('integration_ids' not in params or - params['integration_ids'] is None): - raise ValueError("Missing the required parameter `integration_ids` when calling `find_edge_missing_attributes_using_put`") # noqa: E501 + # verify the required parameter 'integration_id' is set + if ('integration_id' not in params or + params['integration_id'] is None): + raise ValueError("Missing the required parameter `integration_id` when calling `delete_integration_using_delete`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'integration_id' in params: + path_params['integrationId'] = params['integration_id'] # noqa: E501 query_params = [] - if 'integration_ids' in params: - query_params.append(('integrationIds', params['integration_ids'])) # noqa: E501 header_params = {} @@ -1403,14 +310,14 @@ def find_edge_missing_attributes_using_put_with_http_info(self, edge_id, integra auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/integration/{edgeId}/missingAttributes{?integrationIds}', 'PUT', + '/api/integration/{integrationId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1418,49 +325,45 @@ def find_edge_missing_attributes_using_put_with_http_info(self, edge_id, integra _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def assign_integration_to_edge_using_post(self, edge_id, integration_id, **kwargs): # noqa: E501 - """Assign integration to edge (assignIntegrationToEdge) # noqa: E501 + def find_all_related_edges_missing_attributes_using_get(self, integration_id, **kwargs): # noqa: E501 + """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - Creates assignment of an existing integration edge template to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. Only integration edge template can be assigned to edge. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.assign_integration_to_edge_using_post(edge_id, integration_id, async_req=True) + >>> thread = api.find_all_related_edges_missing_attributes_using_get(integration_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str integration_id: integrationId (required) - :return: Integration + :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_integration_to_edge_using_post_with_http_info(edge_id, integration_id, - **kwargs) # noqa: E501 + return self.find_all_related_edges_missing_attributes_using_get_with_http_info(integration_id, **kwargs) # noqa: E501 else: - (data) = self.assign_integration_to_edge_using_post_with_http_info(edge_id, integration_id, - **kwargs) # noqa: E501 + (data) = self.find_all_related_edges_missing_attributes_using_get_with_http_info(integration_id, **kwargs) # noqa: E501 return data - def assign_integration_to_edge_using_post_with_http_info(self, edge_id, integration_id, **kwargs): # noqa: E501 - """Assign integration to edge (assignIntegrationToEdge) # noqa: E501 + def find_all_related_edges_missing_attributes_using_get_with_http_info(self, integration_id, **kwargs): # noqa: E501 + """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 - Creates assignment of an existing integration edge template to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. Only integration edge template can be assigned to edge. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.assign_integration_to_edge_using_post_with_http_info(edge_id, integration_id, async_req=True) + >>> thread = api.find_all_related_edges_missing_attributes_using_get_with_http_info(integration_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str integration_id: integrationId (required) - :return: Integration + :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'integration_id'] # noqa: E501 + all_params = ['integration_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1471,26 +374,18 @@ def assign_integration_to_edge_using_post_with_http_info(self, edge_id, integrat if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method assign_integration_to_edge_using_post" % key + " to method find_all_related_edges_missing_attributes_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'edge_id' is set - if ('edge_id' not in params or - params['edge_id'] is None): - raise ValueError( - "Missing the required parameter `edge_id` when calling `assign_integration_to_edge_using_post`") # noqa: E501 # verify the required parameter 'integration_id' is set if ('integration_id' not in params or params['integration_id'] is None): - raise ValueError( - "Missing the required parameter `integration_id` when calling `assign_integration_to_edge_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `integration_id` when calling `find_all_related_edges_missing_attributes_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 if 'integration_id' in params: path_params['integrationId'] = params['integration_id'] # noqa: E501 @@ -1510,14 +405,14 @@ def assign_integration_to_edge_using_post_with_http_info(self, edge_id, integrat auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/{edgeId}/integration/{integrationId}', 'POST', + '/api/edge/integration/{integrationId}/allMissingAttributes', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Integration', # noqa: E501 + response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1525,50 +420,47 @@ def assign_integration_to_edge_using_post_with_http_info(self, edge_id, integrat _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def unassign_integration_from_edge_using_delete(self, edge_id, integration_id, **kwargs): # noqa: E501 - """Unassign integration from edge (unassignIntegrationFromEdge) # noqa: E501 + def find_edge_missing_attributes_using_get(self, edge_id, integration_ids, **kwargs): # noqa: E501 + """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - Clears assignment of the integration to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove integration locally. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.unassign_integration_from_edge_using_delete(edge_id, integration_id, async_req=True) + >>> thread = api.find_edge_missing_attributes_using_get(edge_id, integration_ids, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str integration_id: integrationId (required) - :return: Integration + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) + :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unassign_integration_from_edge_using_delete_with_http_info(edge_id, integration_id, - **kwargs) # noqa: E501 + return self.find_edge_missing_attributes_using_get_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 else: - (data) = self.unassign_integration_from_edge_using_delete_with_http_info(edge_id, integration_id, - **kwargs) # noqa: E501 + (data) = self.find_edge_missing_attributes_using_get_with_http_info(edge_id, integration_ids, **kwargs) # noqa: E501 return data - def unassign_integration_from_edge_using_delete_with_http_info(self, edge_id, integration_id, - **kwargs): # noqa: E501 - """Unassign integration from edge (unassignIntegrationFromEdge) # noqa: E501 + def find_edge_missing_attributes_using_get_with_http_info(self, edge_id, integration_ids, **kwargs): # noqa: E501 + """Find edge missing attributes for assigned integrations (findEdgeMissingAttributes) # noqa: E501 - Clears assignment of the integration to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove integration locally. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Returns list of edge attribute names that are missing in assigned integrations. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.unassign_integration_from_edge_using_delete_with_http_info(edge_id, integration_id, async_req=True) + >>> thread = api.find_edge_missing_attributes_using_get_with_http_info(edge_id, integration_ids, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str integration_id: integrationId (required) - :return: Integration + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str integration_ids: A list of assigned integration ids, separated by comma ',' (required) + :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'integration_id'] # noqa: E501 + all_params = ['edge_id', 'integration_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1579,30 +471,28 @@ def unassign_integration_from_edge_using_delete_with_http_info(self, edge_id, in if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method unassign_integration_from_edge_using_delete" % key + " to method find_edge_missing_attributes_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set if ('edge_id' not in params or params['edge_id'] is None): - raise ValueError( - "Missing the required parameter `edge_id` when calling `unassign_integration_from_edge_using_delete`") # noqa: E501 - # verify the required parameter 'integration_id' is set - if ('integration_id' not in params or - params['integration_id'] is None): - raise ValueError( - "Missing the required parameter `integration_id` when calling `unassign_integration_from_edge_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `edge_id` when calling `find_edge_missing_attributes_using_get`") # noqa: E501 + # verify the required parameter 'integration_ids' is set + if ('integration_ids' not in params or + params['integration_ids'] is None): + raise ValueError("Missing the required parameter `integration_ids` when calling `find_edge_missing_attributes_using_get`") # noqa: E501 collection_formats = {} path_params = {} if 'edge_id' in params: path_params['edgeId'] = params['edge_id'] # noqa: E501 - if 'integration_id' in params: - path_params['integrationId'] = params['integration_id'] # noqa: E501 query_params = [] + if 'integration_ids' in params: + query_params.append(('integrationIds', params['integration_ids'])) # noqa: E501 header_params = {} @@ -1618,14 +508,14 @@ def unassign_integration_from_edge_using_delete_with_http_info(self, edge_id, in auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/{edgeId}/integration/{integrationId}', 'DELETE', + '/api/edge/integration/{edgeId}/missingAttributes{?integrationIds}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Integration', # noqa: E501 + response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1633,13 +523,13 @@ def unassign_integration_from_edge_using_delete_with_http_info(self, edge_id, in _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_edge_integrations_using_get(self, edge_id, page_size, page, **kwargs): # noqa: E501 - """Get Edge Integrations (getEdgeIntegrations) # noqa: E501 + def get_edge_integration_infos_using_get(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """Get Edge Integrations (getEdgeIntegrationInfos) # noqa: E501 Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_edge_integrations_using_get(edge_id, page_size, page, async_req=True) + >>> thread = api.get_edge_integration_infos_using_get(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -1649,25 +539,24 @@ def get_edge_integrations_using_get(self, edge_id, page_size, page, **kwargs): :param str text_search: The case insensitive 'startsWith' filter based on the integration name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataIntegration + :return: PageDataIntegrationInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_edge_integrations_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 + return self.get_edge_integration_infos_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_edge_integrations_using_get_with_http_info(edge_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.get_edge_integration_infos_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 return data - def get_edge_integrations_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): # noqa: E501 - """Get Edge Integrations (getEdgeIntegrations) # noqa: E501 + def get_edge_integration_infos_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """Get Edge Integrations (getEdgeIntegrationInfos) # noqa: E501 Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_edge_integrations_using_get_with_http_info(edge_id, page_size, page, async_req=True) + >>> thread = api.get_edge_integration_infos_using_get_with_http_info(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -1677,7 +566,7 @@ def get_edge_integrations_using_get_with_http_info(self, edge_id, page_size, pag :param str text_search: The case insensitive 'startsWith' filter based on the integration name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataIntegration + :return: PageDataIntegrationInfo If the method is called asynchronously, returns the request thread. """ @@ -1693,25 +582,22 @@ def get_edge_integrations_using_get_with_http_info(self, edge_id, page_size, pag if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_edge_integrations_using_get" % key + " to method get_edge_integration_infos_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set if ('edge_id' not in params or params['edge_id'] is None): - raise ValueError( - "Missing the required parameter `edge_id` when calling `get_edge_integrations_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `edge_id` when calling `get_edge_integration_infos_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_edge_integrations_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_edge_integration_infos_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError( - "Missing the required parameter `page` when calling `get_edge_integrations_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_edge_integration_infos_using_get`") # noqa: E501 collection_formats = {} @@ -1745,14 +631,14 @@ def get_edge_integrations_using_get_with_http_info(self, edge_id, page_size, pag auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/{edgeId}/integrations{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + '/api/edge/{edgeId}/integrationInfos{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataIntegration', # noqa: E501 + response_type='PageDataIntegrationInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1760,48 +646,55 @@ def get_edge_integrations_using_get_with_http_info(self, edge_id, page_size, pag _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def find_all_related_edges_missing_attributes_using_get(self, integration_id, **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 + def get_edge_integrations_using_get(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """Get Edge Integrations (getEdgeIntegrations) # noqa: E501 - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_get(integration_id, async_req=True) + >>> thread = api.get_edge_integrations_using_get(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the integration name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataIntegration If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.find_all_related_edges_missing_attributes_using_get_with_http_info(integration_id, - **kwargs) # noqa: E501 + return self.get_edge_integrations_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.find_all_related_edges_missing_attributes_using_get_with_http_info(integration_id, - **kwargs) # noqa: E501 + (data) = self.get_edge_integrations_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 return data - def find_all_related_edges_missing_attributes_using_get_with_http_info(self, integration_id, - **kwargs): # noqa: E501 - """Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes) # noqa: E501 + def get_edge_integrations_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """Get Edge Integrations (getEdgeIntegrations) # noqa: E501 - Returns list of attribute names of all related edges that are missing in the integration configuration. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_related_edges_missing_attributes_using_get_with_http_info(integration_id, async_req=True) + >>> thread = api.get_edge_integrations_using_get_with_http_info(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str + :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'startsWith' filter based on the integration name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataIntegration If the method is called asynchronously, returns the request thread. """ - all_params = ['integration_id'] # noqa: E501 + all_params = ['edge_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1812,23 +705,40 @@ def find_all_related_edges_missing_attributes_using_get_with_http_info(self, int if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method find_all_related_edges_missing_attributes_using_get" % key + " to method get_edge_integrations_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'integration_id' is set - if ('integration_id' not in params or - params['integration_id'] is None): - raise ValueError( - "Missing the required parameter `integration_id` when calling `find_all_related_edges_missing_attributes_using_get`") # noqa: E501 + # verify the required parameter 'edge_id' is set + if ('edge_id' not in params or + params['edge_id'] is None): + raise ValueError("Missing the required parameter `edge_id` when calling `get_edge_integrations_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_edge_integrations_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_edge_integrations_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'integration_id' in params: - path_params['integrationId'] = params['integration_id'] # noqa: E501 + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} @@ -1844,14 +754,14 @@ def find_all_related_edges_missing_attributes_using_get_with_http_info(self, int auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/integration/{integrationId}/allMissingAttributes', 'GET', + '/api/edge/{edgeId}/integrations{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='PageDataIntegration', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1859,40 +769,40 @@ def find_all_related_edges_missing_attributes_using_get_with_http_info(self, int _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def delete_integration_using_delete(self, integration_id, **kwargs): # noqa: E501 - """Delete integration (deleteIntegration) # noqa: E501 + def get_integration_by_id_using_get(self, integration_id, **kwargs): # noqa: E501 + """Get Integration (getIntegrationById) # noqa: E501 - Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). # noqa: E501 + Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_integration_using_delete(integration_id, async_req=True) + >>> thread = api.get_integration_by_id_using_get(integration_id, async_req=True) >>> result = thread.get() :param async_req bool :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: Integration If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_integration_using_delete_with_http_info(integration_id, **kwargs) # noqa: E501 + return self.get_integration_by_id_using_get_with_http_info(integration_id, **kwargs) # noqa: E501 else: - (data) = self.delete_integration_using_delete_with_http_info(integration_id, **kwargs) # noqa: E501 + (data) = self.get_integration_by_id_using_get_with_http_info(integration_id, **kwargs) # noqa: E501 return data - def delete_integration_using_delete_with_http_info(self, integration_id, **kwargs): # noqa: E501 - """Delete integration (deleteIntegration) # noqa: E501 + def get_integration_by_id_using_get_with_http_info(self, integration_id, **kwargs): # noqa: E501 + """Get Integration (getIntegrationById) # noqa: E501 - Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). # noqa: E501 + Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_integration_using_delete_with_http_info(integration_id, async_req=True) + >>> thread = api.get_integration_by_id_using_get_with_http_info(integration_id, async_req=True) >>> result = thread.get() :param async_req bool :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: None + :return: Integration If the method is called asynchronously, returns the request thread. """ @@ -1908,14 +818,14 @@ def delete_integration_using_delete_with_http_info(self, integration_id, **kwarg if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_integration_using_delete" % key + " to method get_integration_by_id_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'integration_id' is set if ('integration_id' not in params or params['integration_id'] is None): - raise ValueError("Missing the required parameter `integration_id` when calling `delete_integration_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `integration_id` when calling `get_integration_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -1939,14 +849,14 @@ def delete_integration_using_delete_with_http_info(self, integration_id, **kwarg auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/integration/{integrationId}', 'DELETE', + '/api/integration/{integrationId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='Integration', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1954,45 +864,45 @@ def delete_integration_using_delete_with_http_info(self, integration_id, **kwarg _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_integration_by_id_using_get(self, integration_id, **kwargs): # noqa: E501 - """Get Integration (getIntegrationById) # noqa: E501 + def get_integration_by_routing_key_using_get(self, routing_key, **kwargs): # noqa: E501 + """Get Integration by Routing Key (getIntegrationByRoutingKey) # noqa: E501 - Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_integration_by_id_using_get(integration_id, async_req=True) + >>> thread = api.get_integration_by_routing_key_using_get(routing_key, async_req=True) >>> result = thread.get() :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str routing_key: A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b' (required) :return: Integration If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_integration_by_id_using_get_with_http_info(integration_id, **kwargs) # noqa: E501 + return self.get_integration_by_routing_key_using_get_with_http_info(routing_key, **kwargs) # noqa: E501 else: - (data) = self.get_integration_by_id_using_get_with_http_info(integration_id, **kwargs) # noqa: E501 + (data) = self.get_integration_by_routing_key_using_get_with_http_info(routing_key, **kwargs) # noqa: E501 return data - def get_integration_by_id_using_get_with_http_info(self, integration_id, **kwargs): # noqa: E501 - """Get Integration (getIntegrationById) # noqa: E501 + def get_integration_by_routing_key_using_get_with_http_info(self, routing_key, **kwargs): # noqa: E501 + """Get Integration by Routing Key (getIntegrationByRoutingKey) # noqa: E501 - Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_integration_by_id_using_get_with_http_info(integration_id, async_req=True) + >>> thread = api.get_integration_by_routing_key_using_get_with_http_info(routing_key, async_req=True) >>> result = thread.get() :param async_req bool - :param str integration_id: A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str routing_key: A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b' (required) :return: Integration If the method is called asynchronously, returns the request thread. """ - all_params = ['integration_id'] # noqa: E501 + all_params = ['routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2003,20 +913,20 @@ def get_integration_by_id_using_get_with_http_info(self, integration_id, **kwarg if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_integration_by_id_using_get" % key + " to method get_integration_by_routing_key_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'integration_id' is set - if ('integration_id' not in params or - params['integration_id'] is None): - raise ValueError("Missing the required parameter `integration_id` when calling `get_integration_by_id_using_get`") # noqa: E501 + # verify the required parameter 'routing_key' is set + if ('routing_key' not in params or + params['routing_key'] is None): + raise ValueError("Missing the required parameter `routing_key` when calling `get_integration_by_routing_key_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'integration_id' in params: - path_params['integrationId'] = params['integration_id'] # noqa: E501 + if 'routing_key' in params: + path_params['routingKey'] = params['routing_key'] # noqa: E501 query_params = [] @@ -2034,7 +944,7 @@ def get_integration_by_id_using_get_with_http_info(self, integration_id, **kwarg auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/integration/{integrationId}', 'GET', + '/api/integration/routingKey/{routingKey}', 'GET', path_params, query_params, header_params, @@ -2049,45 +959,55 @@ def get_integration_by_id_using_get_with_http_info(self, integration_id, **kwarg _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_integration_by_routing_key_using_get(self, routing_key, **kwargs): # noqa: E501 - """Get Integration by Routing Key (getIntegrationByRoutingKey) # noqa: E501 + def get_integration_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get Integration Infos (getIntegrationInfos) # noqa: E501 - Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns a page of integration infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_integration_by_routing_key_using_get(routing_key, async_req=True) + >>> thread = api.get_integration_infos_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str routing_key: A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b' (required) - :return: Integration + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool is_edge_template: Fetch edge template integrations + :param str text_search: The case insensitive 'startsWith' filter based on the integration name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataIntegrationInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_integration_by_routing_key_using_get_with_http_info(routing_key, **kwargs) # noqa: E501 + return self.get_integration_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_integration_by_routing_key_using_get_with_http_info(routing_key, **kwargs) # noqa: E501 + (data) = self.get_integration_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_integration_by_routing_key_using_get_with_http_info(self, routing_key, **kwargs): # noqa: E501 - """Get Integration by Routing Key (getIntegrationByRoutingKey) # noqa: E501 + def get_integration_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get Integration Infos (getIntegrationInfos) # noqa: E501 - Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns a page of integration infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_integration_by_routing_key_using_get_with_http_info(routing_key, async_req=True) + >>> thread = api.get_integration_infos_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str routing_key: A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b' (required) - :return: Integration + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool is_edge_template: Fetch edge template integrations + :param str text_search: The case insensitive 'startsWith' filter based on the integration name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataIntegrationInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key'] # noqa: E501 + all_params = ['page_size', 'page', 'is_edge_template', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2098,22 +1018,36 @@ def get_integration_by_routing_key_using_get_with_http_info(self, routing_key, * if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_integration_by_routing_key_using_get" % key + " to method get_integration_infos_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if ('routing_key' not in params or - params['routing_key'] is None): - raise ValueError("Missing the required parameter `routing_key` when calling `get_integration_by_routing_key_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_integration_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_integration_infos_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'routing_key' in params: - path_params['routingKey'] = params['routing_key'] # noqa: E501 query_params = [] + if 'is_edge_template' in params: + query_params.append(('isEdgeTemplate', params['is_edge_template'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} @@ -2129,14 +1063,14 @@ def get_integration_by_routing_key_using_get_with_http_info(self, routing_key, * auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/integration/routingKey/{routingKey}', 'GET', + '/api/integrationInfos{?isEdgeTemplate,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Integration', # noqa: E501 + response_type='PageDataIntegrationInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2251,6 +1185,7 @@ def get_integrations_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) + :param bool is_edge_template: Fetch edge template integrations :param str text_search: The case insensitive 'startsWith' filter based on the integration name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) @@ -2277,6 +1212,7 @@ def get_integrations_using_get_with_http_info(self, page_size, page, **kwargs): :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) + :param bool is_edge_template: Fetch edge template integrations :param str text_search: The case insensitive 'startsWith' filter based on the integration name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) @@ -2285,7 +1221,7 @@ def get_integrations_using_get_with_http_info(self, page_size, page, **kwargs): returns the request thread. """ - all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['page_size', 'page', 'is_edge_template', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2314,6 +1250,8 @@ def get_integrations_using_get_with_http_info(self, page_size, page, **kwargs): path_params = {} query_params = [] + if 'is_edge_template' in params: + query_params.append(('isEdgeTemplate', params['is_edge_template'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: @@ -2339,7 +1277,7 @@ def get_integrations_using_get_with_http_info(self, page_size, page, **kwargs): auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/integrations{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + '/api/integrations{?isEdgeTemplate,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, @@ -2357,7 +1295,7 @@ def get_integrations_using_get_with_http_info(self, page_size, page, **kwargs): def save_integration_using_post(self, **kwargs): # noqa: E501 """Create Or Update Integration (saveIntegration) # noqa: E501 - Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. # Integration Configuration Integration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. ```json { \"clientConfiguration\":{ \"host\":\"broker.hivemq.com\", \"port\":1883, \"cleanSession\":false, \"ssl\":false, \"connectTimeoutSec\":10, \"clientId\":\"\", \"maxBytesInMessage\":32368, \"credentials\":{ \"type\":\"anonymous\" } }, \"downlinkTopicPattern\":\"${topic}\", \"topicFilters\":[ { \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\", \"qos\":0 } ], \"metadata\":{ } } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. # Integration Configuration Integration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. ```json { \"clientConfiguration\":{ \"host\":\"broker.hivemq.com\", \"port\":1883, \"cleanSession\":false, \"ssl\":false, \"connectTimeoutSec\":10, \"clientId\":\"\", \"maxBytesInMessage\":32368, \"credentials\":{ \"type\":\"anonymous\" } }, \"downlinkTopicPattern\":\"${topic}\", \"topicFilters\":[ { \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\", \"qos\":0 } ], \"metadata\":{ } } ``` Remove 'id', 'tenantId' from the request body example (below) to create new Integration entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_integration_using_post(async_req=True) @@ -2379,7 +1317,7 @@ def save_integration_using_post(self, **kwargs): # noqa: E501 def save_integration_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Integration (saveIntegration) # noqa: E501 - Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. # Integration Configuration Integration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. ```json { \"clientConfiguration\":{ \"host\":\"broker.hivemq.com\", \"port\":1883, \"cleanSession\":false, \"ssl\":false, \"connectTimeoutSec\":10, \"clientId\":\"\", \"maxBytesInMessage\":32368, \"credentials\":{ \"type\":\"anonymous\" } }, \"downlinkTopicPattern\":\"${topic}\", \"topicFilters\":[ { \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\", \"qos\":0 } ], \"metadata\":{ } } ``` Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. # Integration Configuration Integration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. ```json { \"clientConfiguration\":{ \"host\":\"broker.hivemq.com\", \"port\":1883, \"cleanSession\":false, \"ssl\":false, \"connectTimeoutSec\":10, \"clientId\":\"\", \"maxBytesInMessage\":32368, \"credentials\":{ \"type\":\"anonymous\" } }, \"downlinkTopicPattern\":\"${topic}\", \"topicFilters\":[ { \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\", \"qos\":0 } ], \"metadata\":{ } } ``` Remove 'id', 'tenantId' from the request body example (below) to create new Integration entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_integration_using_post_with_http_info(async_req=True) @@ -2448,3 +1386,106 @@ def save_integration_using_post_with_http_info(self, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def unassign_integration_from_edge_using_delete(self, edge_id, integration_id, **kwargs): # noqa: E501 + """Unassign integration from edge (unassignIntegrationFromEdge) # noqa: E501 + + Clears assignment of the integration to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove integration locally. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unassign_integration_from_edge_using_delete(edge_id, integration_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str integration_id: integrationId (required) + :return: Integration + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.unassign_integration_from_edge_using_delete_with_http_info(edge_id, integration_id, **kwargs) # noqa: E501 + else: + (data) = self.unassign_integration_from_edge_using_delete_with_http_info(edge_id, integration_id, **kwargs) # noqa: E501 + return data + + def unassign_integration_from_edge_using_delete_with_http_info(self, edge_id, integration_id, **kwargs): # noqa: E501 + """Unassign integration from edge (unassignIntegrationFromEdge) # noqa: E501 + + Clears assignment of the integration to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove integration locally. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.unassign_integration_from_edge_using_delete_with_http_info(edge_id, integration_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str integration_id: integrationId (required) + :return: Integration + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id', 'integration_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method unassign_integration_from_edge_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'edge_id' is set + if ('edge_id' not in params or + params['edge_id'] is None): + raise ValueError("Missing the required parameter `edge_id` when calling `unassign_integration_from_edge_using_delete`") # noqa: E501 + # verify the required parameter 'integration_id' is set + if ('integration_id' not in params or + params['integration_id'] is None): + raise ValueError("Missing the required parameter `integration_id` when calling `unassign_integration_from_edge_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'integration_id' in params: + path_params['integrationId'] = params['integration_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/{edgeId}/integration/{integrationId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Integration', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/login_endpoint_api.py b/tb_rest_client/api/api_pe/login_endpoint_api.py index 21605f31..2dccfe84 100644 --- a/tb_rest_client/api/api_pe/login_endpoint_api.py +++ b/tb_rest_client/api/api_pe/login_endpoint_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/lwm_2m_controller_api.py b/tb_rest_client/api/api_pe/lwm_2m_controller_api.py index 812081d4..c94d93f6 100644 --- a/tb_rest_client/api/api_pe/lwm_2m_controller_api.py +++ b/tb_rest_client/api/api_pe/lwm_2m_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -43,7 +43,7 @@ def get_lwm2m_bootstrap_security_info_using_get(self, is_bootstrap_server, **kwa :param async_req bool :param bool is_bootstrap_server: A Boolean value representing the Server SecurityInfo for future Bootstrap client mode settings. Values: 'true' for Bootstrap Server; 'false' for Lwm2m Server. (required) - :return: ServerSecurityConfig + :return: LwM2MServerSecurityConfigDefault If the method is called asynchronously, returns the request thread. """ @@ -65,7 +65,7 @@ def get_lwm2m_bootstrap_security_info_using_get_with_http_info(self, is_bootstra :param async_req bool :param bool is_bootstrap_server: A Boolean value representing the Server SecurityInfo for future Bootstrap client mode settings. Values: 'true' for Bootstrap Server; 'false' for Lwm2m Server. (required) - :return: ServerSecurityConfig + :return: LwM2MServerSecurityConfigDefault If the method is called asynchronously, returns the request thread. """ @@ -119,7 +119,7 @@ def get_lwm2m_bootstrap_security_info_using_get_with_http_info(self, is_bootstra body=body_params, post_params=form_params, files=local_var_files, - response_type='ServerSecurityConfig', # noqa: E501 + response_type='LwM2MServerSecurityConfigDefault', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_pe/notification_controller_api.py b/tb_rest_client/api/api_pe/notification_controller_api.py new file mode 100644 index 00000000..06c0205b --- /dev/null +++ b/tb_rest_client/api/api_pe/notification_controller_api.py @@ -0,0 +1,1189 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class NotificationControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_notification_request_using_post(self, **kwargs): # noqa: E501 + """Create notification request (createNotificationRequest) # noqa: E501 + + Processes notification request. Mandatory request properties are `targets` (list of targets ids to send notification to), and either `templateId` (existing notification template id) or `template` (to send notification without saving the template). Optionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification. For each enabled delivery method in the notification template, there must be a target in the `targets` list that supports this delivery method: if you chose `WEB`, `EMAIL` or `SMS` - there must be at least one target in `targets` of `PLATFORM_USERS` type. For `SLACK` delivery method - you need to chose at least one `SLACK` notification target. Notification request object with `PROCESSING` status will be returned immediately, and the notification sending itself is done asynchronously. After all notifications are sent, the `status` of the request becomes `SENT`. Use `getNotificationRequestById` to see the notification request processing status and some sending stats. Here is an example of notification request to one target using saved template: ```json { \"templateId\": { \"entityType\": \"NOTIFICATION_TEMPLATE\", \"id\": \"6dbc3670-e4dd-11ed-9401-dbcc5dff78be\" }, \"targets\": [ \"320e3ed0-d785-11ed-a06c-21dd57dd88ca\" ], \"additionalConfig\": { \"sendingDelayInSec\": 0 } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_notification_request_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRequest body: + :return: NotificationRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_notification_request_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_notification_request_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def create_notification_request_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Create notification request (createNotificationRequest) # noqa: E501 + + Processes notification request. Mandatory request properties are `targets` (list of targets ids to send notification to), and either `templateId` (existing notification template id) or `template` (to send notification without saving the template). Optionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification. For each enabled delivery method in the notification template, there must be a target in the `targets` list that supports this delivery method: if you chose `WEB`, `EMAIL` or `SMS` - there must be at least one target in `targets` of `PLATFORM_USERS` type. For `SLACK` delivery method - you need to chose at least one `SLACK` notification target. Notification request object with `PROCESSING` status will be returned immediately, and the notification sending itself is done asynchronously. After all notifications are sent, the `status` of the request becomes `SENT`. Use `getNotificationRequestById` to see the notification request processing status and some sending stats. Here is an example of notification request to one target using saved template: ```json { \"templateId\": { \"entityType\": \"NOTIFICATION_TEMPLATE\", \"id\": \"6dbc3670-e4dd-11ed-9401-dbcc5dff78be\" }, \"targets\": [ \"320e3ed0-d785-11ed-a06c-21dd57dd88ca\" ], \"additionalConfig\": { \"sendingDelayInSec\": 0 } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_notification_request_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRequest body: + :return: NotificationRequest + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_notification_request_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/request', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationRequest', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_notification_request_using_delete(self, id, **kwargs): # noqa: E501 + """Delete notification request (deleteNotificationRequest) # noqa: E501 + + Deletes notification request by its id. If the request has status `SENT` - all sent notifications for this request will be deleted. If it is `SCHEDULED`, the request will be cancelled. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_request_using_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_notification_request_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_notification_request_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_notification_request_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete notification request (deleteNotificationRequest) # noqa: E501 + + Deletes notification request by its id. If the request has status `SENT` - all sent notifications for this request will be deleted. If it is `SCHEDULED`, the request will be cancelled. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_request_using_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_notification_request_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_notification_request_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/request/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_notification_using_delete(self, id, **kwargs): # noqa: E501 + """Delete notification (deleteNotification) # noqa: E501 + + Deletes notification by its id. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_using_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_notification_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_notification_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_notification_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete notification (deleteNotification) # noqa: E501 + + Deletes notification by its id. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_using_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_notification_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_notification_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_available_delivery_methods_using_get(self, **kwargs): # noqa: E501 + """Get available delivery methods (getAvailableDeliveryMethods) # noqa: E501 + + Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_available_delivery_methods_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_available_delivery_methods_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_available_delivery_methods_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_available_delivery_methods_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get available delivery methods (getAvailableDeliveryMethods) # noqa: E501 + + Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_available_delivery_methods_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_available_delivery_methods_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/deliveryMethods', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_request_by_id_using_get(self, id, **kwargs): # noqa: E501 + """Get notification request by id (getNotificationRequestById) # noqa: E501 + + Fetches notification request info by request id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_request_by_id_using_get(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationRequestInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_request_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_request_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_notification_request_by_id_using_get_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification request by id (getNotificationRequestById) # noqa: E501 + + Fetches notification request info by request id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_request_by_id_using_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationRequestInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_request_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_notification_request_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/request/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationRequestInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_request_preview_using_post(self, **kwargs): # noqa: E501 + """Get notification request preview (getNotificationRequestPreview) # noqa: E501 + + Returns preview for notification request. `processedTemplates` shows how the notifications for each delivery method will look like for the first recipient of the corresponding notification target. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_request_preview_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRequest body: + :param int recipients_preview_size: Amount of the recipients to show in preview + :return: NotificationRequestPreview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_request_preview_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_notification_request_preview_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def get_notification_request_preview_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Get notification request preview (getNotificationRequestPreview) # noqa: E501 + + Returns preview for notification request. `processedTemplates` shows how the notifications for each delivery method will look like for the first recipient of the corresponding notification target. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_request_preview_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRequest body: + :param int recipients_preview_size: Amount of the recipients to show in preview + :return: NotificationRequestPreview + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'recipients_preview_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_request_preview_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'recipients_preview_size' in params: + query_params.append(('recipientsPreviewSize', params['recipients_preview_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/request/preview{?recipientsPreviewSize}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationRequestPreview', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_requests_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get notification requests (getNotificationRequests) # noqa: E501 + + Returns the page of notification requests submitted by users of this tenant or sysadmins. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_requests_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filed based on the used template name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationRequestInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_requests_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_requests_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_notification_requests_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get notification requests (getNotificationRequests) # noqa: E501 + + Returns the page of notification requests submitted by users of this tenant or sysadmins. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_requests_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filed based on the used template name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationRequestInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_requests_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notification_requests_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notification_requests_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/requests{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotificationRequestInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_settings_using_get(self, **kwargs): # noqa: E501 + """Get notification settings (getNotificationSettings) # noqa: E501 + + Retrieves notification settings for this tenant or sysadmin. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_settings_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NotificationSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_settings_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_notification_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_notification_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get notification settings (getNotificationSettings) # noqa: E501 + + Retrieves notification settings for this tenant or sysadmin. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_settings_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NotificationSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_settings_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notifications_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get notifications (getNotifications) # noqa: E501 + + Returns the page of notifications for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notifications_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on notification subject or text + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param bool unread_only: To search for unread notifications only + :return: PageDataNotification + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notifications_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notifications_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_notifications_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get notifications (getNotifications) # noqa: E501 + + Returns the page of notifications for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for any authorized user. **WebSocket API**: There are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves. The URI for opening WS session for notifications: `/api/ws/plugins/notifications`. Subscription command for unread notifications count: ``` { \"unreadCountSubCmd\": { \"cmdId\": 1234 } } ``` To subscribe for latest unread notifications: ``` { \"unreadSubCmd\": { \"cmdId\": 1234, \"limit\": 10 } } ``` To unsubscribe from any subscription: ``` { \"unsubCmd\": { \"cmdId\": 1234 } } ``` To mark certain notifications as read, use following command: ``` { \"markAsReadCmd\": { \"cmdId\": 1234, \"notifications\": [ \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\", \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\" ] } } ``` To mark all notifications as read: ``` { \"markAllAsReadCmd\": { \"cmdId\": 1234 } } ``` Update structure for unread **notifications count subscription**: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 55 } ``` For **notifications subscription**: - full update of latest unread notifications: ``` { \"cmdId\": 1234, \"notifications\": [ { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, ... } ], \"totalUnreadCount\": 1 } ``` - when new notification arrives or shown notification is updated: ``` { \"cmdId\": 1234, \"update\": { \"id\": { \"entityType\": \"NOTIFICATION\", \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\" }, # updated notification info, text, subject etc. ... }, \"totalUnreadCount\": 2 } ``` - when unread notifications count changes: ``` { \"cmdId\": 1234, \"totalUnreadCount\": 5 } ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notifications_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on notification subject or text + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param bool unread_only: To search for unread notifications only + :return: PageDataNotification + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'unread_only'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notifications_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notifications_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notifications_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'unread_only' in params: + query_params.append(('unreadOnly', params['unread_only'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notifications{?page,pageSize,sortOrder,sortProperty,textSearch,unreadOnly}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotification', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def mark_all_notifications_as_read_using_put(self, **kwargs): # noqa: E501 + """Mark all notifications as read (markAllNotificationsAsRead) # noqa: E501 + + Marks all unread notifications as read. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_all_notifications_as_read_using_put(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.mark_all_notifications_as_read_using_put_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.mark_all_notifications_as_read_using_put_with_http_info(**kwargs) # noqa: E501 + return data + + def mark_all_notifications_as_read_using_put_with_http_info(self, **kwargs): # noqa: E501 + """Mark all notifications as read (markAllNotificationsAsRead) # noqa: E501 + + Marks all unread notifications as read. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_all_notifications_as_read_using_put_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method mark_all_notifications_as_read_using_put" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notifications/read', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def mark_notification_as_read_using_put(self, id, **kwargs): # noqa: E501 + """Mark notification as read (markNotificationAsRead) # noqa: E501 + + Marks notification as read by its id. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_notification_as_read_using_put(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.mark_notification_as_read_using_put_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.mark_notification_as_read_using_put_with_http_info(id, **kwargs) # noqa: E501 + return data + + def mark_notification_as_read_using_put_with_http_info(self, id, **kwargs): # noqa: E501 + """Mark notification as read (markNotificationAsRead) # noqa: E501 + + Marks notification as read by its id. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_notification_as_read_using_put_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method mark_notification_as_read_using_put" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `mark_notification_as_read_using_put`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/{id}/read', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_notification_settings_using_post(self, **kwargs): # noqa: E501 + """Save notification settings (saveNotificationSettings) # noqa: E501 + + Saves notification settings for this tenant or sysadmin. `deliveryMethodsConfigs` of the settings must be specified. Here is an example of the notification settings with Slack configuration: ```json { \"deliveryMethodsConfigs\": { \"SLACK\": { \"method\": \"SLACK\", \"botToken\": \"xoxb-....\" } } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_settings_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationSettings body: + :return: NotificationSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_notification_settings_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_notification_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_notification_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save notification settings (saveNotificationSettings) # noqa: E501 + + Saves notification settings for this tenant or sysadmin. `deliveryMethodsConfigs` of the settings must be specified. Here is an example of the notification settings with Slack configuration: ```json { \"deliveryMethodsConfigs\": { \"SLACK\": { \"method\": \"SLACK\", \"botToken\": \"xoxb-....\" } } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_settings_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationSettings body: + :return: NotificationSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_notification_settings_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/settings', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/notification_rule_controller_api.py b/tb_rest_client/api/api_pe/notification_rule_controller_api.py new file mode 100644 index 00000000..71dbc9aa --- /dev/null +++ b/tb_rest_client/api/api_pe/notification_rule_controller_api.py @@ -0,0 +1,433 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class NotificationRuleControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_notification_rule_using_delete(self, id, **kwargs): # noqa: E501 + """Delete notification rule (deleteNotificationRule) # noqa: E501 + + Deletes notification rule by id. Cancels all related scheduled notification requests (e.g. due to escalation table) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_rule_using_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_notification_rule_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_notification_rule_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_notification_rule_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete notification rule (deleteNotificationRule) # noqa: E501 + + Deletes notification rule by id. Cancels all related scheduled notification requests (e.g. due to escalation table) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_rule_using_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_notification_rule_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_notification_rule_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/rule/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_rule_by_id_using_get(self, id, **kwargs): # noqa: E501 + """Get notification rule by id (getNotificationRuleById) # noqa: E501 + + Fetches notification rule info by rule's id. In addition to regular notification rule fields, there are `templateName` and `deliveryMethods` in the response. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_rule_by_id_using_get(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationRuleInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_rule_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_rule_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_notification_rule_by_id_using_get_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification rule by id (getNotificationRuleById) # noqa: E501 + + Fetches notification rule info by rule's id. In addition to regular notification rule fields, there are `templateName` and `deliveryMethods` in the response. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_rule_by_id_using_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationRuleInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_rule_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_notification_rule_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/rule/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationRuleInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_rules_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get notification rules (getNotificationRules) # noqa: E501 + + Returns the page of notification rules. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_rules_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on rule's name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationRuleInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_rules_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_rules_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_notification_rules_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get notification rules (getNotificationRules) # noqa: E501 + + Returns the page of notification rules. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_rules_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on rule's name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationRuleInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_rules_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notification_rules_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notification_rules_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/rules{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotificationRuleInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_notification_rule_using_post(self, **kwargs): # noqa: E501 + """Save notification rule (saveNotificationRule) # noqa: E501 + + Creates or updates notification rule. Mandatory properties are `name`, `templateId` (of a template with `notificationType` matching to rule's `triggerType`), `triggerType`, `triggerConfig` and `recipientConfig`. Additionally, you may specify rule `description` inside of `additionalConfig`. Trigger type of the rule cannot be changed. Available trigger types for tenant: `ENTITY_ACTION`, `ALARM`, `ALARM_COMMENT`, `ALARM_ASSIGNMENT`, `DEVICE_ACTIVITY`, `RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT`. For sysadmin, there are following trigger types available: `ENTITIES_LIMIT`, `API_USAGE_LIMIT`, `NEW_PLATFORM_VERSION`. Here is an example of notification rule to send notification when a device, asset or customer is created or deleted: ```json { \"name\": \"Entity action\", \"templateId\": { \"entityType\": \"NOTIFICATION_TEMPLATE\", \"id\": \"32117320-d785-11ed-a06c-21dd57dd88ca\" }, \"triggerType\": \"ENTITY_ACTION\", \"triggerConfig\": { \"entityTypes\": [ \"CUSTOMER\", \"DEVICE\", \"ASSET\" ], \"created\": true, \"updated\": false, \"deleted\": true, \"triggerType\": \"ENTITY_ACTION\" }, \"recipientsConfig\": { \"targets\": [ \"320f2930-d785-11ed-a06c-21dd57dd88ca\" ], \"triggerType\": \"ENTITY_ACTION\" }, \"additionalConfig\": { \"description\": \"Send notification to tenant admins or customer users when a device, asset or customer is created\" }, \"templateName\": \"Entity action notification\", \"deliveryMethods\": [ \"WEB\" ] } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_rule_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRule body: + :return: NotificationRule + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_notification_rule_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_notification_rule_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_notification_rule_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save notification rule (saveNotificationRule) # noqa: E501 + + Creates or updates notification rule. Mandatory properties are `name`, `templateId` (of a template with `notificationType` matching to rule's `triggerType`), `triggerType`, `triggerConfig` and `recipientConfig`. Additionally, you may specify rule `description` inside of `additionalConfig`. Trigger type of the rule cannot be changed. Available trigger types for tenant: `ENTITY_ACTION`, `ALARM`, `ALARM_COMMENT`, `ALARM_ASSIGNMENT`, `DEVICE_ACTIVITY`, `RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT`. For sysadmin, there are following trigger types available: `ENTITIES_LIMIT`, `API_USAGE_LIMIT`, `NEW_PLATFORM_VERSION`. Here is an example of notification rule to send notification when a device, asset or customer is created or deleted: ```json { \"name\": \"Entity action\", \"templateId\": { \"entityType\": \"NOTIFICATION_TEMPLATE\", \"id\": \"32117320-d785-11ed-a06c-21dd57dd88ca\" }, \"triggerType\": \"ENTITY_ACTION\", \"triggerConfig\": { \"entityTypes\": [ \"CUSTOMER\", \"DEVICE\", \"ASSET\" ], \"created\": true, \"updated\": false, \"deleted\": true, \"triggerType\": \"ENTITY_ACTION\" }, \"recipientsConfig\": { \"targets\": [ \"320f2930-d785-11ed-a06c-21dd57dd88ca\" ], \"triggerType\": \"ENTITY_ACTION\" }, \"additionalConfig\": { \"description\": \"Send notification to tenant admins or customer users when a device, asset or customer is created\" }, \"templateName\": \"Entity action notification\", \"deliveryMethods\": [ \"WEB\" ] } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_rule_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationRule body: + :return: NotificationRule + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_notification_rule_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/rule', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationRule', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/notification_target_controller_api.py b/tb_rest_client/api/api_pe/notification_target_controller_api.py new file mode 100644 index 00000000..f5ad8e57 --- /dev/null +++ b/tb_rest_client/api/api_pe/notification_target_controller_api.py @@ -0,0 +1,762 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class NotificationTargetControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_notification_target_by_id_using_delete(self, id, **kwargs): # noqa: E501 + """Delete notification target by id (deleteNotificationTargetById) # noqa: E501 + + Deletes notification target by its id. This target cannot be referenced by existing scheduled notification requests or any notification rules. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_target_by_id_using_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_notification_target_by_id_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_notification_target_by_id_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_notification_target_by_id_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete notification target by id (deleteNotificationTargetById) # noqa: E501 + + Deletes notification target by its id. This target cannot be referenced by existing scheduled notification requests or any notification rules. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_target_by_id_using_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_notification_target_by_id_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_notification_target_by_id_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/target/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_target_by_id_using_get(self, id, **kwargs): # noqa: E501 + """Get notification target by id (getNotificationTargetById) # noqa: E501 + + Fetches notification target by id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_target_by_id_using_get(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_target_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_target_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_notification_target_by_id_using_get_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification target by id (getNotificationTargetById) # noqa: E501 + + Fetches notification target by id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_target_by_id_using_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_target_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_notification_target_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/target/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationTarget', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_targets_by_ids_using_get(self, ids, **kwargs): # noqa: E501 + """Get notification targets by ids (getNotificationTargetsByIds) # noqa: E501 + + Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_by_ids_using_get(ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ids: Comma-separated list of uuids representing targets ids (required) + :return: list[NotificationTarget] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_targets_by_ids_using_get_with_http_info(ids, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_targets_by_ids_using_get_with_http_info(ids, **kwargs) # noqa: E501 + return data + + def get_notification_targets_by_ids_using_get_with_http_info(self, ids, **kwargs): # noqa: E501 + """Get notification targets by ids (getNotificationTargetsByIds) # noqa: E501 + + Returns the list of notification targets found by provided ids. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_by_ids_using_get_with_http_info(ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ids: Comma-separated list of uuids representing targets ids (required) + :return: list[NotificationTarget] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ids'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_targets_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ids' is set + if ('ids' not in params or + params['ids'] is None): + raise ValueError("Missing the required parameter `ids` when calling `get_notification_targets_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/targets{?ids}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationTarget]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_targets_by_supported_notification_type_using_get(self, notification_type, page_size, page, **kwargs): # noqa: E501 + """Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) # noqa: E501 + + Returns the page of notification targets filtered by notification type that they can be used for. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_by_supported_notification_type_using_get(notification_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str notification_type: notificationType (required) + :param int page_size: pageSize (required) + :param int page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataNotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_targets_by_supported_notification_type_using_get_with_http_info(notification_type, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_targets_by_supported_notification_type_using_get_with_http_info(notification_type, page_size, page, **kwargs) # noqa: E501 + return data + + def get_notification_targets_by_supported_notification_type_using_get_with_http_info(self, notification_type, page_size, page, **kwargs): # noqa: E501 + """Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType) # noqa: E501 + + Returns the page of notification targets filtered by notification type that they can be used for. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_by_supported_notification_type_using_get_with_http_info(notification_type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str notification_type: notificationType (required) + :param int page_size: pageSize (required) + :param int page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataNotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['notification_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_targets_by_supported_notification_type_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'notification_type' is set + if ('notification_type' not in params or + params['notification_type'] is None): + raise ValueError("Missing the required parameter `notification_type` when calling `get_notification_targets_by_supported_notification_type_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notification_targets_by_supported_notification_type_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notification_targets_by_supported_notification_type_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'notification_type' in params: + query_params.append(('notificationType', params['notification_type'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/targets{?notificationType,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotificationTarget', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_targets_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get notification targets (getNotificationTargets) # noqa: E501 + + Returns the page of notification targets owned by sysadmin or tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filed based on the target's name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_targets_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_targets_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_notification_targets_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get notification targets (getNotificationTargets) # noqa: E501 + + Returns the page of notification targets owned by sysadmin or tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_targets_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filed based on the target's name + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataNotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_targets_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notification_targets_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notification_targets_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/targets{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotificationTarget', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_recipients_for_notification_target_config_using_post(self, page_size, page, **kwargs): # noqa: E501 + """Get recipients for notification target config (getRecipientsForNotificationTargetConfig) # noqa: E501 + + Returns the page of recipients for such notification target configuration. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_recipients_for_notification_target_config_using_post(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param NotificationTarget body: + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_recipients_for_notification_target_config_using_post_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_recipients_for_notification_target_config_using_post_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_recipients_for_notification_target_config_using_post_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get recipients for notification target config (getRecipientsForNotificationTargetConfig) # noqa: E501 + + Returns the page of recipients for such notification target configuration. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_recipients_for_notification_target_config_using_post_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param NotificationTarget body: + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_recipients_for_notification_target_config_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_recipients_for_notification_target_config_using_post`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_recipients_for_notification_target_config_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/target/recipients{?page,pageSize}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUser', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_notification_target_using_post(self, **kwargs): # noqa: E501 + """Save notification target (saveNotificationTarget) # noqa: E501 + + Creates or updates notification target. Available `configuration` types are `PLATFORM_USERS` and `SLACK`. For `PLATFORM_USERS` the `usersFilter` must be specified. For tenant, there are following users filter types available: `USER_LIST`, `CUSTOMER_USERS`, `USER_GROUP_LIST`, `TENANT_ADMINISTRATORS`, `USER_ROLE`, `ALL_USERS`, `ORIGINATOR_ENTITY_OWNER_USERS`, `AFFECTED_USER`. For sysadmin: `TENANT_ADMINISTRATORS`, `AFFECTED_TENANT_ADMINISTRATORS`, `SYSTEM_ADMINISTRATORS`, `ALL_USERS`. Here is an example of tenant-level notification target to send notification to customer's users: ```json { \"name\": \"Users of Customer A\", \"configuration\": { \"type\": \"PLATFORM_USERS\", \"usersFilter\": { \"type\": \"CUSTOMER_USERS\", \"customerId\": \"32499a20-d785-11ed-a06c-21dd57dd88ca\" }, \"description\": \"Users of Customer A\" } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_target_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationTarget body: + :return: NotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_notification_target_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_notification_target_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_notification_target_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save notification target (saveNotificationTarget) # noqa: E501 + + Creates or updates notification target. Available `configuration` types are `PLATFORM_USERS` and `SLACK`. For `PLATFORM_USERS` the `usersFilter` must be specified. For tenant, there are following users filter types available: `USER_LIST`, `CUSTOMER_USERS`, `USER_GROUP_LIST`, `TENANT_ADMINISTRATORS`, `USER_ROLE`, `ALL_USERS`, `ORIGINATOR_ENTITY_OWNER_USERS`, `AFFECTED_USER`. For sysadmin: `TENANT_ADMINISTRATORS`, `AFFECTED_TENANT_ADMINISTRATORS`, `SYSTEM_ADMINISTRATORS`, `ALL_USERS`. Here is an example of tenant-level notification target to send notification to customer's users: ```json { \"name\": \"Users of Customer A\", \"configuration\": { \"type\": \"PLATFORM_USERS\", \"usersFilter\": { \"type\": \"CUSTOMER_USERS\", \"customerId\": \"32499a20-d785-11ed-a06c-21dd57dd88ca\" }, \"description\": \"Users of Customer A\" } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_target_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationTarget body: + :return: NotificationTarget + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_notification_target_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/target', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationTarget', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/notification_template_controller_api.py b/tb_rest_client/api/api_pe/notification_template_controller_api.py new file mode 100644 index 00000000..ddfd2401 --- /dev/null +++ b/tb_rest_client/api/api_pe/notification_template_controller_api.py @@ -0,0 +1,536 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class NotificationTemplateControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_notification_template_by_id_using_delete(self, id, **kwargs): # noqa: E501 + """Delete notification template by id (deleteNotificationTemplateById # noqa: E501 + + Deletes notification template by its id. This template cannot be referenced by existing scheduled notification requests or any notification rules. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_template_by_id_using_delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_notification_template_by_id_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_notification_template_by_id_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_notification_template_by_id_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete notification template by id (deleteNotificationTemplateById # noqa: E501 + + Deletes notification template by its id. This template cannot be referenced by existing scheduled notification requests or any notification rules. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_notification_template_by_id_using_delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_notification_template_by_id_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_notification_template_by_id_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/template/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_template_by_id_using_get(self, id, **kwargs): # noqa: E501 + """Get notification template by id (getNotificationTemplateById) # noqa: E501 + + Fetches notification template by id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_template_by_id_using_get(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_template_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_template_by_id_using_get_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_notification_template_by_id_using_get_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification template by id (getNotificationTemplateById) # noqa: E501 + + Fetches notification template by id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_template_by_id_using_get_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id (required) + :return: NotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_template_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `get_notification_template_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/template/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationTemplate', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_notification_templates_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get notification templates (getNotificationTemplates) # noqa: E501 + + Returns the page of notification templates owned by sysadmin or tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_templates_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on template's name and notification type + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param str notification_types: Comma-separated list of notification types to filter the templates + :return: PageDataNotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_notification_templates_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_notification_templates_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_notification_templates_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get notification templates (getNotificationTemplates) # noqa: E501 + + Returns the page of notification templates owned by sysadmin or tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_notification_templates_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: Case-insensitive 'substring' filter based on template's name and notification type + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :param str notification_types: Comma-separated list of notification types to filter the templates + :return: PageDataNotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'notification_types'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_notification_templates_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_notification_templates_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_notification_templates_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + if 'notification_types' in params: + query_params.append(('notificationTypes', params['notification_types'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/templates{?notificationTypes,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataNotificationTemplate', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_slack_conversations_using_get(self, type, **kwargs): # noqa: E501 + """List Slack conversations (listSlackConversations) # noqa: E501 + + List available Slack conversations by type. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_slack_conversations_using_get(type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str type: type (required) + :param str token: Slack bot token. If absent - system Slack settings will be used + :return: list[SlackConversation] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_slack_conversations_using_get_with_http_info(type, **kwargs) # noqa: E501 + else: + (data) = self.list_slack_conversations_using_get_with_http_info(type, **kwargs) # noqa: E501 + return data + + def list_slack_conversations_using_get_with_http_info(self, type, **kwargs): # noqa: E501 + """List Slack conversations (listSlackConversations) # noqa: E501 + + List available Slack conversations by type. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_slack_conversations_using_get_with_http_info(type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str type: type (required) + :param str token: Slack bot token. If absent - system Slack settings will be used + :return: list[SlackConversation] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['type', 'token'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_slack_conversations_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'type' is set + if ('type' not in params or + params['type'] is None): + raise ValueError("Missing the required parameter `type` when calling `list_slack_conversations_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'token' in params: + query_params.append(('token', params['token'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/slack/conversations{?token,type}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SlackConversation]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_notification_template_using_post(self, **kwargs): # noqa: E501 + """Save notification template (saveNotificationTemplate) # noqa: E501 + + Creates or updates notification template. Here is an example of template to send notification via Web, SMS and Slack: ```json { \"name\": \"Greetings\", \"notificationType\": \"GENERAL\", \"configuration\": { \"deliveryMethodsTemplates\": { \"WEB\": { \"enabled\": true, \"subject\": \"Greetings\", \"body\": \"Hi there, ${recipientTitle}\", \"additionalConfig\": { \"icon\": { \"enabled\": true, \"icon\": \"back_hand\", \"color\": \"#757575\" }, \"actionButtonConfig\": { \"enabled\": false } }, \"method\": \"WEB\" }, \"SMS\": { \"enabled\": true, \"body\": \"Hi there, ${recipientTitle}\", \"method\": \"SMS\" }, \"SLACK\": { \"enabled\": true, \"body\": \"Hi there, @${recipientTitle}\", \"method\": \"SLACK\" } } } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_template_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationTemplate body: + :return: NotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_notification_template_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_notification_template_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_notification_template_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save notification template (saveNotificationTemplate) # noqa: E501 + + Creates or updates notification template. Here is an example of template to send notification via Web, SMS and Slack: ```json { \"name\": \"Greetings\", \"notificationType\": \"GENERAL\", \"configuration\": { \"deliveryMethodsTemplates\": { \"WEB\": { \"enabled\": true, \"subject\": \"Greetings\", \"body\": \"Hi there, ${recipientTitle}\", \"additionalConfig\": { \"icon\": { \"enabled\": true, \"icon\": \"back_hand\", \"color\": \"#757575\" }, \"actionButtonConfig\": { \"enabled\": false } }, \"method\": \"WEB\" }, \"SMS\": { \"enabled\": true, \"body\": \"Hi there, ${recipientTitle}\", \"method\": \"SMS\" }, \"SLACK\": { \"enabled\": true, \"body\": \"Hi there, @${recipientTitle}\", \"method\": \"SLACK\" } } } } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_notification_template_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param NotificationTemplate body: + :return: NotificationTemplate + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_notification_template_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/notification/template', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationTemplate', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/o_auth_2_config_template_controller_api.py b/tb_rest_client/api/api_pe/o_auth_2_config_template_controller_api.py index 014bd63e..b19e9e57 100644 --- a/tb_rest_client/api/api_pe/o_auth_2_config_template_controller_api.py +++ b/tb_rest_client/api/api_pe/o_auth_2_config_template_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/o_auth_2_controller_api.py b/tb_rest_client/api/api_pe/o_auth_2_controller_api.py index c4e4caa8..c30dfa3d 100644 --- a/tb_rest_client/api/api_pe/o_auth_2_controller_api.py +++ b/tb_rest_client/api/api_pe/o_auth_2_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/ota_package_controller_api.py b/tb_rest_client/api/api_pe/ota_package_controller_api.py index cd8ba5b8..e25f7ddf 100644 --- a/tb_rest_client/api/api_pe/ota_package_controller_api.py +++ b/tb_rest_client/api/api_pe/ota_package_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -236,7 +236,7 @@ def get_group_ota_packages_using_get(self, group_id, type, page_size, page, **kw :param str type: OTA Package type. (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the ota package title. + :param str text_search: The case insensitive 'substring' filter based on the ota package title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataOtaPackageInfo @@ -264,7 +264,7 @@ def get_group_ota_packages_using_get_with_http_info(self, group_id, type, page_s :param str type: OTA Package type. (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the ota package title. + :param str text_search: The case insensitive 'substring' filter based on the ota package title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataOtaPackageInfo @@ -555,7 +555,7 @@ def get_ota_packages_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the ota package title. + :param str text_search: The case insensitive 'substring' filter based on the ota package title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataOtaPackageInfo @@ -581,7 +581,7 @@ def get_ota_packages_using_get_with_http_info(self, page_size, page, **kwargs): :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the ota package title. + :param str text_search: The case insensitive 'substring' filter based on the ota package title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataOtaPackageInfo @@ -672,7 +672,7 @@ def get_ota_packages_using_get1(self, device_profile_id, type, page_size, page, :param str type: OTA Package type. (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the ota package title. + :param str text_search: The case insensitive 'substring' filter based on the ota package title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataOtaPackageInfo @@ -700,7 +700,7 @@ def get_ota_packages_using_get1_with_http_info(self, device_profile_id, type, pa :param str type: OTA Package type. (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the ota package title. + :param str text_search: The case insensitive 'substring' filter based on the ota package title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataOtaPackageInfo @@ -789,51 +789,51 @@ def get_ota_packages_using_get1_with_http_info(self, device_profile_id, type, pa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_ota_package_data_using_post(self, checksum_algorithm, ota_package_id, **kwargs): # noqa: E501 + def save_ota_package_data_using_post(self, ota_package_id, **kwargs): # noqa: E501 """Save OTA Package data (saveOtaPackageData) # noqa: E501 Update the OTA Package. Adds the date to the existing OTA Package Info Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_ota_package_data_using_post(checksum_algorithm, ota_package_id, async_req=True) + >>> thread = api.save_ota_package_data_using_post(ota_package_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str checksum_algorithm: OTA Package checksum algorithm. (required) :param str ota_package_id: A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param Object body: - :param str checksum: OTA Package checksum. For example, '0xd87f7e0c' + :param str checksum: + :param str checksum_algorithm: + :param str file: :return: OtaPackageInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_ota_package_data_using_post_with_http_info(checksum_algorithm, ota_package_id, **kwargs) # noqa: E501 + return self.save_ota_package_data_using_post_with_http_info(ota_package_id, **kwargs) # noqa: E501 else: - (data) = self.save_ota_package_data_using_post_with_http_info(checksum_algorithm, ota_package_id, **kwargs) # noqa: E501 + (data) = self.save_ota_package_data_using_post_with_http_info(ota_package_id, **kwargs) # noqa: E501 return data - def save_ota_package_data_using_post_with_http_info(self, checksum_algorithm, ota_package_id, **kwargs): # noqa: E501 + def save_ota_package_data_using_post_with_http_info(self, ota_package_id, **kwargs): # noqa: E501 """Save OTA Package data (saveOtaPackageData) # noqa: E501 Update the OTA Package. Adds the date to the existing OTA Package Info Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_ota_package_data_using_post_with_http_info(checksum_algorithm, ota_package_id, async_req=True) + >>> thread = api.save_ota_package_data_using_post_with_http_info(ota_package_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str checksum_algorithm: OTA Package checksum algorithm. (required) :param str ota_package_id: A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param Object body: - :param str checksum: OTA Package checksum. For example, '0xd87f7e0c' + :param str checksum: + :param str checksum_algorithm: + :param str file: :return: OtaPackageInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['checksum_algorithm', 'ota_package_id', 'body', 'checksum'] # noqa: E501 + all_params = ['ota_package_id', 'checksum', 'checksum_algorithm', 'file'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -848,10 +848,6 @@ def save_ota_package_data_using_post_with_http_info(self, checksum_algorithm, ot ) params[key] = val del params['kwargs'] - # verify the required parameter 'checksum_algorithm' is set - if ('checksum_algorithm' not in params or - params['checksum_algorithm'] is None): - raise ValueError("Missing the required parameter `checksum_algorithm` when calling `save_ota_package_data_using_post`") # noqa: E501 # verify the required parameter 'ota_package_id' is set if ('ota_package_id' not in params or params['ota_package_id'] is None): @@ -864,32 +860,32 @@ def save_ota_package_data_using_post_with_http_info(self, checksum_algorithm, ot path_params['otaPackageId'] = params['ota_package_id'] # noqa: E501 query_params = [] - if 'checksum' in params: - query_params.append(('checksum', params['checksum'])) # noqa: E501 - if 'checksum_algorithm' in params: - query_params.append(('checksumAlgorithm', params['checksum_algorithm'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} + if 'checksum' in params: + form_params.append(('checksum', params['checksum'])) # noqa: E501 + if 'checksum_algorithm' in params: + form_params.append(('checksumAlgorithm', params['checksum_algorithm'])) # noqa: E501 + if 'file' in params: + local_var_files['file'] = params['file'] # noqa: E501 body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['application/json', 'multipart/form-data']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'application/octet-stream']) # noqa: E501 + ['multipart/form-data']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/otaPackage/{otaPackageId}{?checksum,checksumAlgorithm}', 'POST', + '/api/otaPackage/{otaPackageId}', 'POST', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_pe/owner_controller_api.py b/tb_rest_client/api/api_pe/owner_controller_api.py index 6f476be8..4b478f04 100644 --- a/tb_rest_client/api/api_pe/owner_controller_api.py +++ b/tb_rest_client/api/api_pe/owner_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -33,7 +33,7 @@ def __init__(self, api_client=None): self.api_client = api_client def change_owner_to_customer_using_post(self, owner_id, entity_type, entity_id, **kwargs): # noqa: E501 - """Change owner to tenant (changeOwnerToCustomer) # noqa: E501 + """Change owner to customer (changeOwnerToCustomer) # noqa: E501 Tenant/Customer changes Owner to Customer or sub-Customer. Sub-Customer can`t perform this operation! Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -45,6 +45,7 @@ def change_owner_to_customer_using_post(self, owner_id, entity_type, entity_id, :param str owner_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param list[str] body: :return: None If the method is called asynchronously, returns the request thread. @@ -57,7 +58,7 @@ def change_owner_to_customer_using_post(self, owner_id, entity_type, entity_id, return data def change_owner_to_customer_using_post_with_http_info(self, owner_id, entity_type, entity_id, **kwargs): # noqa: E501 - """Change owner to tenant (changeOwnerToCustomer) # noqa: E501 + """Change owner to customer (changeOwnerToCustomer) # noqa: E501 Tenant/Customer changes Owner to Customer or sub-Customer. Sub-Customer can`t perform this operation! Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -69,12 +70,13 @@ def change_owner_to_customer_using_post_with_http_info(self, owner_id, entity_ty :param str owner_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param list[str] body: :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner_id', 'entity_type', 'entity_id'] # noqa: E501 + all_params = ['owner_id', 'entity_type', 'entity_id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -120,10 +122,16 @@ def change_owner_to_customer_using_post_with_http_info(self, owner_id, entity_ty local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 @@ -156,6 +164,7 @@ def change_owner_to_tenant_using_post(self, owner_id, entity_type, entity_id, ** :param str owner_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param list[str] body: :return: None If the method is called asynchronously, returns the request thread. @@ -180,12 +189,13 @@ def change_owner_to_tenant_using_post_with_http_info(self, owner_id, entity_type :param str owner_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param list[str] body: :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner_id', 'entity_type', 'entity_id'] # noqa: E501 + all_params = ['owner_id', 'entity_type', 'entity_id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -231,10 +241,16 @@ def change_owner_to_tenant_using_post_with_http_info(self, owner_id, entity_type local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 diff --git a/tb_rest_client/api/api_pe/queue_controller_api.py b/tb_rest_client/api/api_pe/queue_controller_api.py index 1a80ba7c..225ba3f0 100644 --- a/tb_rest_client/api/api_pe/queue_controller_api.py +++ b/tb_rest_client/api/api_pe/queue_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,45 +32,340 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def get_tenant_queues_by_service_type_using_get(self, service_type, **kwargs): # noqa: E501 - """Get queue names (getTenantQueuesByServiceType) # noqa: E501 + def delete_queue_using_delete(self, queue_id, **kwargs): # noqa: E501 + """Delete Queue (deleteQueue) # noqa: E501 - Returns a set of unique queue names based on service type. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Deletes the Queue. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tenant_queues_by_service_type_using_get(service_type, async_req=True) + >>> thread = api.delete_queue_using_delete(queue_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str queue_id: A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_queue_using_delete_with_http_info(queue_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_queue_using_delete_with_http_info(queue_id, **kwargs) # noqa: E501 + return data + + def delete_queue_using_delete_with_http_info(self, queue_id, **kwargs): # noqa: E501 + """Delete Queue (deleteQueue) # noqa: E501 + + Deletes the Queue. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_queue_using_delete_with_http_info(queue_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str queue_id: A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['queue_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_queue_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'queue_id' is set + if ('queue_id' not in params or + params['queue_id'] is None): + raise ValueError("Missing the required parameter `queue_id` when calling `delete_queue_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'queue_id' in params: + path_params['queueId'] = params['queue_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/queues/{queueId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_queue_by_id_using_get(self, queue_id, **kwargs): # noqa: E501 + """Get Queue (getQueueById) # noqa: E501 + + Fetch the Queue object based on the provided Queue Id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_queue_by_id_using_get(queue_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str queue_id: A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: Queue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_queue_by_id_using_get_with_http_info(queue_id, **kwargs) # noqa: E501 + else: + (data) = self.get_queue_by_id_using_get_with_http_info(queue_id, **kwargs) # noqa: E501 + return data + + def get_queue_by_id_using_get_with_http_info(self, queue_id, **kwargs): # noqa: E501 + """Get Queue (getQueueById) # noqa: E501 + + Fetch the Queue object based on the provided Queue Id. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_queue_by_id_using_get_with_http_info(queue_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str queue_id: A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: Queue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['queue_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_queue_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'queue_id' is set + if ('queue_id' not in params or + params['queue_id'] is None): + raise ValueError("Missing the required parameter `queue_id` when calling `get_queue_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'queue_id' in params: + path_params['queueId'] = params['queue_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/queues/{queueId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Queue', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_queue_by_name_using_get(self, queue_name, **kwargs): # noqa: E501 + """Get Queue (getQueueByName) # noqa: E501 + + Fetch the Queue object based on the provided Queue name. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_queue_by_name_using_get(queue_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str queue_name: A string value representing the queue id. For example, 'Main' (required) + :return: Queue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_queue_by_name_using_get_with_http_info(queue_name, **kwargs) # noqa: E501 + else: + (data) = self.get_queue_by_name_using_get_with_http_info(queue_name, **kwargs) # noqa: E501 + return data + + def get_queue_by_name_using_get_with_http_info(self, queue_name, **kwargs): # noqa: E501 + """Get Queue (getQueueByName) # noqa: E501 + + Fetch the Queue object based on the provided Queue name. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_queue_by_name_using_get_with_http_info(queue_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str queue_name: A string value representing the queue id. For example, 'Main' (required) + :return: Queue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['queue_name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_queue_by_name_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'queue_name' is set + if ('queue_name' not in params or + params['queue_name'] is None): + raise ValueError("Missing the required parameter `queue_name` when calling `get_queue_by_name_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'queue_name' in params: + path_params['queueName'] = params['queue_name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/queues/name/{queueName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Queue', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_tenant_queues_by_service_type_using_get(self, service_type, page_size, page, **kwargs): # noqa: E501 + """Get Queues (getTenantQueuesByServiceType) # noqa: E501 + + Returns a page of queues registered in the platform. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_queues_by_service_type_using_get(service_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str service_type: Service type (implemented only for the TB-RULE-ENGINE) (required) - :return: list[str] + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the queue name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataQueue If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, **kwargs) # noqa: E501 + return self.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, **kwargs) # noqa: E501 + (data) = self.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, page_size, page, **kwargs) # noqa: E501 return data - def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_type, **kwargs): # noqa: E501 - """Get queue names (getTenantQueuesByServiceType) # noqa: E501 + def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_type, page_size, page, **kwargs): # noqa: E501 + """Get Queues (getTenantQueuesByServiceType) # noqa: E501 - Returns a set of unique queue names based on service type. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Returns a page of queues registered in the platform. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, async_req=True) + >>> thread = api.get_tenant_queues_by_service_type_using_get_with_http_info(service_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str service_type: Service type (implemented only for the TB-RULE-ENGINE) (required) - :return: list[str] + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the queue name. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataQueue If the method is called asynchronously, returns the request thread. """ - all_params = ['service_type'] # noqa: E501 + all_params = ['service_type', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -89,6 +384,121 @@ def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_typ if ('service_type' not in params or params['service_type'] is None): raise ValueError("Missing the required parameter `service_type` when calling `get_tenant_queues_by_service_type_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_queues_by_service_type_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_tenant_queues_by_service_type_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'service_type' in params: + query_params.append(('serviceType', params['service_type'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/queues{?page,pageSize,serviceType,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataQueue', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_queue_using_post(self, service_type, **kwargs): # noqa: E501 + """Create Or Update Queue (saveQueue) # noqa: E501 + + Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error. Queue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_queue_using_post(service_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str service_type: Service type (implemented only for the TB-RULE-ENGINE) (required) + :param Queue body: + :return: Queue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_queue_using_post_with_http_info(service_type, **kwargs) # noqa: E501 + else: + (data) = self.save_queue_using_post_with_http_info(service_type, **kwargs) # noqa: E501 + return data + + def save_queue_using_post_with_http_info(self, service_type, **kwargs): # noqa: E501 + """Create Or Update Queue (saveQueue) # noqa: E501 + + Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error. Queue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_queue_using_post_with_http_info(service_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str service_type: Service type (implemented only for the TB-RULE-ENGINE) (required) + :param Queue body: + :return: Queue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['service_type', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_queue_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'service_type' is set + if ('service_type' not in params or + params['service_type'] is None): + raise ValueError("Missing the required parameter `service_type` when calling `save_queue_using_post`") # noqa: E501 collection_formats = {} @@ -104,22 +514,28 @@ def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_typ local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenant/queues{?serviceType}', 'GET', + '/api/queues{?serviceType}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[str]', # noqa: E501 + response_type='Queue', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_pe/report_controller_api.py b/tb_rest_client/api/api_pe/report_controller_api.py index 6239718c..dc174414 100644 --- a/tb_rest_client/api/api_pe/report_controller_api.py +++ b/tb_rest_client/api/api_pe/report_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/role_controller_api.py b/tb_rest_client/api/api_pe/role_controller_api.py index 8e3c61d0..478a2be0 100644 --- a/tb_rest_client/api/api_pe/role_controller_api.py +++ b/tb_rest_client/api/api_pe/role_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -330,7 +330,7 @@ def get_roles_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Type of the role - :param str text_search: The case insensitive 'startsWith' filter based on the role name. + :param str text_search: The case insensitive 'substring' filter based on the role name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataRole @@ -357,7 +357,7 @@ def get_roles_using_get_with_http_info(self, page_size, page, **kwargs): # noqa :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Type of the role - :param str text_search: The case insensitive 'startsWith' filter based on the role name. + :param str text_search: The case insensitive 'substring' filter based on the role name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataRole diff --git a/tb_rest_client/api/api_pe/rpc_v_1_controller_api.py b/tb_rest_client/api/api_pe/rpc_v_1_controller_api.py index d7188ea6..32b32824 100644 --- a/tb_rest_client/api/api_pe/rpc_v_1_controller_api.py +++ b/tb_rest_client/api/api_pe/rpc_v_1_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/rpc_v_2_controller_api.py b/tb_rest_client/api/api_pe/rpc_v_2_controller_api.py index 91191d15..1319b00d 100644 --- a/tb_rest_client/api/api_pe/rpc_v_2_controller_api.py +++ b/tb_rest_client/api/api_pe/rpc_v_2_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,13 +32,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def delete_resource_using_delete(self, rpc_id, **kwargs): # noqa: E501 + def delete_rpc_using_delete(self, rpc_id, **kwargs): # noqa: E501 """Delete persistent RPC # noqa: E501 Deletes the persistent RPC request. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_using_delete(rpc_id, async_req=True) + >>> thread = api.delete_rpc_using_delete(rpc_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -49,18 +49,18 @@ def delete_resource_using_delete(self, rpc_id, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_resource_using_delete_with_http_info(rpc_id, **kwargs) # noqa: E501 + return self.delete_rpc_using_delete_with_http_info(rpc_id, **kwargs) # noqa: E501 else: - (data) = self.delete_resource_using_delete_with_http_info(rpc_id, **kwargs) # noqa: E501 + (data) = self.delete_rpc_using_delete_with_http_info(rpc_id, **kwargs) # noqa: E501 return data - def delete_resource_using_delete_with_http_info(self, rpc_id, **kwargs): # noqa: E501 + def delete_rpc_using_delete_with_http_info(self, rpc_id, **kwargs): # noqa: E501 """Delete persistent RPC # noqa: E501 Deletes the persistent RPC request. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_using_delete_with_http_info(rpc_id, async_req=True) + >>> thread = api.delete_rpc_using_delete_with_http_info(rpc_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -81,14 +81,14 @@ def delete_resource_using_delete_with_http_info(self, rpc_id, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_resource_using_delete" % key + " to method delete_rpc_using_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'rpc_id' is set if ('rpc_id' not in params or params['rpc_id'] is None): - raise ValueError("Missing the required parameter `rpc_id` when calling `delete_resource_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `rpc_id` when calling `delete_rpc_using_delete`") # noqa: E501 collection_formats = {} @@ -127,20 +127,20 @@ def delete_resource_using_delete_with_http_info(self, rpc_id, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_persisted_rpc_by_device_using_get(self, device_id, page_size, page, rpc_status, **kwargs): # noqa: E501 + def get_persisted_rpc_by_device_using_get(self, device_id, page_size, page, **kwargs): # noqa: E501 """Get persistent RPC requests # noqa: E501 Allows to query RPC calls for specific device using pagination. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_persisted_rpc_by_device_using_get(device_id, page_size, page, rpc_status, async_req=True) + >>> thread = api.get_persisted_rpc_by_device_using_get(device_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str rpc_status: Status of the RPC (required) + :param str rpc_status: Status of the RPC :param str text_search: Not implemented. Leave empty. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) @@ -150,25 +150,25 @@ def get_persisted_rpc_by_device_using_get(self, device_id, page_size, page, rpc_ """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, rpc_status, **kwargs) # noqa: E501 + return self.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, rpc_status, **kwargs) # noqa: E501 + (data) = self.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, **kwargs) # noqa: E501 return data - def get_persisted_rpc_by_device_using_get_with_http_info(self, device_id, page_size, page, rpc_status, **kwargs): # noqa: E501 + def get_persisted_rpc_by_device_using_get_with_http_info(self, device_id, page_size, page, **kwargs): # noqa: E501 """Get persistent RPC requests # noqa: E501 Allows to query RPC calls for specific device using pagination. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, rpc_status, async_req=True) + >>> thread = api.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str rpc_status: Status of the RPC (required) + :param str rpc_status: Status of the RPC :param str text_search: Not implemented. Leave empty. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) @@ -204,10 +204,6 @@ def get_persisted_rpc_by_device_using_get_with_http_info(self, device_id, page_s if ('page' not in params or params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_persisted_rpc_by_device_using_get`") # noqa: E501 - # verify the required parameter 'rpc_status' is set - if ('rpc_status' not in params or - params['rpc_status'] is None): - raise ValueError("Missing the required parameter `rpc_status` when calling `get_persisted_rpc_by_device_using_get`") # noqa: E501 collection_formats = {} diff --git a/tb_rest_client/api/api_pe/rule_chain_controller_api.py b/tb_rest_client/api/api_pe/rule_chain_controller_api.py index 520c4141..650bae61 100644 --- a/tb_rest_client/api/api_pe/rule_chain_controller_api.py +++ b/tb_rest_client/api/api_pe/rule_chain_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -425,7 +425,7 @@ def get_edge_rule_chains_using_get(self, edge_id, page_size, page, **kwargs): # :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the rule chain name. + :param str text_search: The case insensitive 'substring' filter based on the rule chain name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataRuleChain @@ -452,7 +452,7 @@ def get_edge_rule_chains_using_get_with_http_info(self, edge_id, page_size, page :param str edge_id: A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the rule chain name. + :param str text_search: The case insensitive 'substring' filter based on the rule chain name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataRuleChain @@ -820,6 +820,196 @@ def get_rule_chain_meta_data_using_get_with_http_info(self, rule_chain_id, **kwa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_rule_chain_output_labels_usage_using_get(self, rule_chain_id, **kwargs): # noqa: E501 + """Get output labels usage (getRuleChainOutputLabelsUsage) # noqa: E501 + + Fetch the list of rule chains and the relation types (labels) they use to process output of the current rule chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_rule_chain_output_labels_usage_using_get(rule_chain_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str rule_chain_id: A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: list[RuleChainOutputLabelsUsage] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_rule_chain_output_labels_usage_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + else: + (data) = self.get_rule_chain_output_labels_usage_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + return data + + def get_rule_chain_output_labels_usage_using_get_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 + """Get output labels usage (getRuleChainOutputLabelsUsage) # noqa: E501 + + Fetch the list of rule chains and the relation types (labels) they use to process output of the current rule chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_rule_chain_output_labels_usage_using_get_with_http_info(rule_chain_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str rule_chain_id: A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: list[RuleChainOutputLabelsUsage] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['rule_chain_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_rule_chain_output_labels_usage_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'rule_chain_id' is set + if ('rule_chain_id' not in params or + params['rule_chain_id'] is None): + raise ValueError("Missing the required parameter `rule_chain_id` when calling `get_rule_chain_output_labels_usage_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'rule_chain_id' in params: + path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/ruleChain/{ruleChainId}/output/labels/usage', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[RuleChainOutputLabelsUsage]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_rule_chain_output_labels_using_get(self, rule_chain_id, **kwargs): # noqa: E501 + """Get Rule Chain output labels (getRuleChainOutputLabels) # noqa: E501 + + Fetch the unique labels for the \"output\" Rule Nodes that belong to the Rule Chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_rule_chain_output_labels_using_get(rule_chain_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str rule_chain_id: A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_rule_chain_output_labels_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + else: + (data) = self.get_rule_chain_output_labels_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + return data + + def get_rule_chain_output_labels_using_get_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 + """Get Rule Chain output labels (getRuleChainOutputLabels) # noqa: E501 + + Fetch the unique labels for the \"output\" Rule Nodes that belong to the Rule Chain based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_rule_chain_output_labels_using_get_with_http_info(rule_chain_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str rule_chain_id: A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['rule_chain_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_rule_chain_output_labels_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'rule_chain_id' is set + if ('rule_chain_id' not in params or + params['rule_chain_id'] is None): + raise ValueError("Missing the required parameter `rule_chain_id` when calling `get_rule_chain_output_labels_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'rule_chain_id' in params: + path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/ruleChain/{ruleChainId}/output/labels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_rule_chains_using_get(self, page_size, page, **kwargs): # noqa: E501 """Get Rule Chains (getRuleChains) # noqa: E501 @@ -833,7 +1023,7 @@ def get_rule_chains_using_get(self, page_size, page, **kwargs): # noqa: E501 :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Rule chain type (CORE or EDGE) - :param str text_search: The case insensitive 'startsWith' filter based on the rule chain name. + :param str text_search: The case insensitive 'substring' filter based on the rule chain name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataRuleChain @@ -860,7 +1050,7 @@ def get_rule_chains_using_get_with_http_info(self, page_size, page, **kwargs): :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) :param str type: Rule chain type (CORE or EDGE) - :param str text_search: The case insensitive 'startsWith' filter based on the rule chain name. + :param str text_search: The case insensitive 'substring' filter based on the rule chain name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataRuleChain @@ -1038,6 +1228,93 @@ def import_rule_chains_using_post_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def is_tbel_enabled_using_get(self, **kwargs): # noqa: E501 + """Is TBEL script executor enabled # noqa: E501 + + Returns 'True' if the TBEL script execution is enabled Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.is_tbel_enabled_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: bool + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.is_tbel_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.is_tbel_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def is_tbel_enabled_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Is TBEL script executor enabled # noqa: E501 + + Returns 'True' if the TBEL script execution is enabled Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.is_tbel_enabled_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: bool + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method is_tbel_enabled_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/ruleChain/tbelEnabled', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='bool', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def save_rule_chain_meta_data_using_post(self, **kwargs): # noqa: E501 """Update Rule Chain Metadata # noqa: E501 @@ -1049,6 +1326,7 @@ def save_rule_chain_meta_data_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param RuleChainMetaData body: + :param bool update_related: Update related rule nodes. :return: RuleChainMetaData If the method is called asynchronously, returns the request thread. @@ -1071,12 +1349,13 @@ def save_rule_chain_meta_data_using_post_with_http_info(self, **kwargs): # noqa :param async_req bool :param RuleChainMetaData body: + :param bool update_related: Update related rule nodes. :return: RuleChainMetaData If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['body', 'update_related'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1097,6 +1376,8 @@ def save_rule_chain_meta_data_using_post_with_http_info(self, **kwargs): # noqa path_params = {} query_params = [] + if 'update_related' in params: + query_params.append(('updateRelated', params['update_related'])) # noqa: E501 header_params = {} @@ -1118,7 +1399,7 @@ def save_rule_chain_meta_data_using_post_with_http_info(self, **kwargs): # noqa auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/ruleChain/metadata', 'POST', + '/api/ruleChain/metadata{?updateRelated}', 'POST', path_params, query_params, header_params, @@ -1231,7 +1512,7 @@ def save_rule_chain_using_post_with_http_info(self, **kwargs): # noqa: E501 def save_rule_chain_using_post1(self, **kwargs): # noqa: E501 """Create Or Update Rule Chain (saveRuleChain) # noqa: E501 - Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_rule_chain_using_post1(async_req=True) @@ -1253,7 +1534,7 @@ def save_rule_chain_using_post1(self, **kwargs): # noqa: E501 def save_rule_chain_using_post1_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Rule Chain (saveRuleChain) # noqa: E501 - Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity. Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_rule_chain_using_post1_with_http_info(async_req=True) @@ -1609,9 +1890,9 @@ def set_root_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs) collection_formats=collection_formats) def test_script_using_post(self, **kwargs): # noqa: E501 - """Test JavaScript function # noqa: E501 + """Test Script function # noqa: E501 - Execute the JavaScript function and return the result. The format of request: ```json { \"script\": \"Your JS Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_script_using_post(async_req=True) @@ -1619,6 +1900,7 @@ def test_script_using_post(self, **kwargs): # noqa: E501 :param async_req bool :param JsonNode body: + :param str script_lang: Script language: JS or TBEL :return: JsonNode If the method is called asynchronously, returns the request thread. @@ -1631,9 +1913,9 @@ def test_script_using_post(self, **kwargs): # noqa: E501 return data def test_script_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Test JavaScript function # noqa: E501 + """Test Script function # noqa: E501 - Execute the JavaScript function and return the result. The format of request: ```json { \"script\": \"Your JS Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. # noqa: E501 + Execute the Script function and return the result. The format of request: ```json { \"script\": \"Your Function as String\", \"scriptType\": \"One of: update, generate, filter, switch, json, string\", \"argNames\": [\"msg\", \"metadata\", \"type\"], \"msg\": \"{\\\"temperature\\\": 42}\", \"metadata\": { \"deviceName\": \"Device A\", \"deviceType\": \"Thermometer\" }, \"msgType\": \"POST_TELEMETRY_REQUEST\" } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_script_using_post_with_http_info(async_req=True) @@ -1641,12 +1923,13 @@ def test_script_using_post_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param JsonNode body: + :param str script_lang: Script language: JS or TBEL :return: JsonNode If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['body', 'script_lang'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1667,6 +1950,8 @@ def test_script_using_post_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'script_lang' in params: + query_params.append(('scriptLang', params['script_lang'])) # noqa: E501 header_params = {} @@ -1688,7 +1973,7 @@ def test_script_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/ruleChain/testScript', 'POST', + '/api/ruleChain/testScript{?scriptLang}', 'POST', path_params, query_params, header_params, diff --git a/tb_rest_client/api/api_pe/rule_engine_controller_api.py b/tb_rest_client/api/api_pe/rule_engine_controller_api.py index 82486efc..195786d2 100644 --- a/tb_rest_client/api/api_pe/rule_engine_controller_api.py +++ b/tb_rest_client/api/api_pe/rule_engine_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -151,13 +151,140 @@ def handle_rule_engine_request_using_post_with_http_info(self, entity_type, enti _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def handle_rule_engine_request_using_post1(self, entity_type, entity_id, **kwargs): # noqa: E501 + def handle_rule_engine_request_using_post1(self, entity_type, entity_id, queue_name, timeout, **kwargs): # noqa: E501 + """Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) # noqa: E501 + + Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.handle_rule_engine_request_using_post1(entity_type, entity_id, queue_name, timeout, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str queue_name: Queue name to process the request in the rule engine (required) + :param int timeout: Timeout to process the request in milliseconds (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.handle_rule_engine_request_using_post1_with_http_info(entity_type, entity_id, queue_name, timeout, **kwargs) # noqa: E501 + else: + (data) = self.handle_rule_engine_request_using_post1_with_http_info(entity_type, entity_id, queue_name, timeout, **kwargs) # noqa: E501 + return data + + def handle_rule_engine_request_using_post1_with_http_info(self, entity_type, entity_id, queue_name, timeout, **kwargs): # noqa: E501 + """Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest) # noqa: E501 + + Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.handle_rule_engine_request_using_post1_with_http_info(entity_type, entity_id, queue_name, timeout, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :param str entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str queue_name: Queue name to process the request in the rule engine (required) + :param int timeout: Timeout to process the request in milliseconds (required) + :param str body: + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_type', 'entity_id', 'queue_name', 'timeout', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method handle_rule_engine_request_using_post1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_type' is set + if ('entity_type' not in params or + params['entity_type'] is None): + raise ValueError("Missing the required parameter `entity_type` when calling `handle_rule_engine_request_using_post1`") # noqa: E501 + # verify the required parameter 'entity_id' is set + if ('entity_id' not in params or + params['entity_id'] is None): + raise ValueError("Missing the required parameter `entity_id` when calling `handle_rule_engine_request_using_post1`") # noqa: E501 + # verify the required parameter 'queue_name' is set + if ('queue_name' not in params or + params['queue_name'] is None): + raise ValueError("Missing the required parameter `queue_name` when calling `handle_rule_engine_request_using_post1`") # noqa: E501 + # verify the required parameter 'timeout' is set + if ('timeout' not in params or + params['timeout'] is None): + raise ValueError("Missing the required parameter `timeout` when calling `handle_rule_engine_request_using_post1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_type' in params: + path_params['entityType'] = params['entity_type'] # noqa: E501 + if 'entity_id' in params: + path_params['entityId'] = params['entity_id'] # noqa: E501 + if 'queue_name' in params: + path_params['queueName'] = params['queue_name'] # noqa: E501 + if 'timeout' in params: + path_params['timeout'] = params['timeout'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeferredResultResponseEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def handle_rule_engine_request_using_post2(self, entity_type, entity_id, **kwargs): # noqa: E501 """Push entity message to the rule engine (handleRuleEngineRequest) # noqa: E501 Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.handle_rule_engine_request_using_post1(entity_type, entity_id, async_req=True) + >>> thread = api.handle_rule_engine_request_using_post2(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -170,18 +297,18 @@ def handle_rule_engine_request_using_post1(self, entity_type, entity_id, **kwarg """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.handle_rule_engine_request_using_post1_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + return self.handle_rule_engine_request_using_post2_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 else: - (data) = self.handle_rule_engine_request_using_post1_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + (data) = self.handle_rule_engine_request_using_post2_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 return data - def handle_rule_engine_request_using_post1_with_http_info(self, entity_type, entity_id, **kwargs): # noqa: E501 + def handle_rule_engine_request_using_post2_with_http_info(self, entity_type, entity_id, **kwargs): # noqa: E501 """Push entity message to the rule engine (handleRuleEngineRequest) # noqa: E501 Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.handle_rule_engine_request_using_post1_with_http_info(entity_type, entity_id, async_req=True) + >>> thread = api.handle_rule_engine_request_using_post2_with_http_info(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -204,18 +331,18 @@ def handle_rule_engine_request_using_post1_with_http_info(self, entity_type, ent if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method handle_rule_engine_request_using_post1" % key + " to method handle_rule_engine_request_using_post2" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): - raise ValueError("Missing the required parameter `entity_type` when calling `handle_rule_engine_request_using_post1`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_type` when calling `handle_rule_engine_request_using_post2`") # noqa: E501 # verify the required parameter 'entity_id' is set if ('entity_id' not in params or params['entity_id'] is None): - raise ValueError("Missing the required parameter `entity_id` when calling `handle_rule_engine_request_using_post1`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_id` when calling `handle_rule_engine_request_using_post2`") # noqa: E501 collection_formats = {} @@ -262,13 +389,13 @@ def handle_rule_engine_request_using_post1_with_http_info(self, entity_type, ent _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def handle_rule_engine_request_using_post2(self, **kwargs): # noqa: E501 + def handle_rule_engine_request_using_post3(self, **kwargs): # noqa: E501 """Push user message to the rule engine (handleRuleEngineRequest) # noqa: E501 Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.handle_rule_engine_request_using_post2(async_req=True) + >>> thread = api.handle_rule_engine_request_using_post3(async_req=True) >>> result = thread.get() :param async_req bool @@ -279,18 +406,18 @@ def handle_rule_engine_request_using_post2(self, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.handle_rule_engine_request_using_post2_with_http_info(**kwargs) # noqa: E501 + return self.handle_rule_engine_request_using_post3_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.handle_rule_engine_request_using_post2_with_http_info(**kwargs) # noqa: E501 + (data) = self.handle_rule_engine_request_using_post3_with_http_info(**kwargs) # noqa: E501 return data - def handle_rule_engine_request_using_post2_with_http_info(self, **kwargs): # noqa: E501 + def handle_rule_engine_request_using_post3_with_http_info(self, **kwargs): # noqa: E501 """Push user message to the rule engine (handleRuleEngineRequest) # noqa: E501 Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.handle_rule_engine_request_using_post2_with_http_info(async_req=True) + >>> thread = api.handle_rule_engine_request_using_post3_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -311,7 +438,7 @@ def handle_rule_engine_request_using_post2_with_http_info(self, **kwargs): # no if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method handle_rule_engine_request_using_post2" % key + " to method handle_rule_engine_request_using_post3" % key ) params[key] = val del params['kwargs'] diff --git a/tb_rest_client/api/api_pe/scheduler_event_controller_api.py b/tb_rest_client/api/api_pe/scheduler_event_controller_api.py index 6415465f..b2c00de2 100644 --- a/tb_rest_client/api/api_pe/scheduler_event_controller_api.py +++ b/tb_rest_client/api/api_pe/scheduler_event_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -827,7 +827,7 @@ def get_scheduler_events_using_get_with_http_info(self, **kwargs): # noqa: E501 def save_scheduler_event_using_post(self, **kwargs): # noqa: E501 """Save Scheduler Event (saveSchedulerEvent) # noqa: E501 - Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Scheduler Event entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_scheduler_event_using_post(async_req=True) @@ -849,7 +849,7 @@ def save_scheduler_event_using_post(self, **kwargs): # noqa: E501 def save_scheduler_event_using_post_with_http_info(self, **kwargs): # noqa: E501 """Save Scheduler Event (saveSchedulerEvent) # noqa: E501 - Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Scheduler Event entity. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_scheduler_event_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_pe/self_registration_controller_api.py b/tb_rest_client/api/api_pe/self_registration_controller_api.py index 097acc61..6c6f7156 100644 --- a/tb_rest_client/api/api_pe/self_registration_controller_api.py +++ b/tb_rest_client/api/api_pe/self_registration_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,43 +32,43 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def get_privacy_policy_using_get(self, **kwargs): # noqa: E501 - """Get Privacy Policy for Self Registration form (getPrivacyPolicy) # noqa: E501 + def delete_self_registration_params_using_delete(self, domain_name, **kwargs): # noqa: E501 + """deleteSelfRegistrationParams # noqa: E501 - Fetch the Privacy Policy based on the domain name from the request. Available for non-authorized users. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_privacy_policy_using_get(async_req=True) + >>> thread = api.delete_self_registration_params_using_delete(domain_name, async_req=True) >>> result = thread.get() :param async_req bool - :return: str + :param str domain_name: domainName (required) + :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_privacy_policy_using_get_with_http_info(**kwargs) # noqa: E501 + return self.delete_self_registration_params_using_delete_with_http_info(domain_name, **kwargs) # noqa: E501 else: - (data) = self.get_privacy_policy_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.delete_self_registration_params_using_delete_with_http_info(domain_name, **kwargs) # noqa: E501 return data - def get_privacy_policy_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Get Privacy Policy for Self Registration form (getPrivacyPolicy) # noqa: E501 + def delete_self_registration_params_using_delete_with_http_info(self, domain_name, **kwargs): # noqa: E501 + """deleteSelfRegistrationParams # noqa: E501 - Fetch the Privacy Policy based on the domain name from the request. Available for non-authorized users. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_privacy_policy_using_get_with_http_info(async_req=True) + >>> thread = api.delete_self_registration_params_using_delete_with_http_info(domain_name, async_req=True) >>> result = thread.get() :param async_req bool - :return: str + :param str domain_name: domainName (required) + :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['domain_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -79,14 +79,20 @@ def get_privacy_policy_using_get_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_privacy_policy_using_get" % key + " to method delete_self_registration_params_using_delete" % key ) params[key] = val del params['kwargs'] + # verify the required parameter 'domain_name' is set + if ('domain_name' not in params or + params['domain_name'] is None): + raise ValueError("Missing the required parameter `domain_name` when calling `delete_self_registration_params_using_delete`") # noqa: E501 collection_formats = {} path_params = {} + if 'domain_name' in params: + path_params['domainName'] = params['domain_name'] # noqa: E501 query_params = [] @@ -101,17 +107,17 @@ def get_privacy_policy_using_get_with_http_info(self, **kwargs): # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/noauth/selfRegistration/privacyPolicy', 'GET', + '/api/selfRegistration/selfRegistrationParams/{domainName}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='DeferredResultResponseEntity', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -119,38 +125,38 @@ def get_privacy_policy_using_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_self_registration_params_using_get(self, **kwargs): # noqa: E501 - """Get Self Registration parameters (getSelfRegistrationParams) # noqa: E501 + def get_privacy_policy_using_get(self, **kwargs): # noqa: E501 + """Get Privacy Policy for Self Registration form (getPrivacyPolicy) # noqa: E501 - Fetch the Self Registration parameters object for the tenant of the current user. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the white labeling resource. # noqa: E501 + Fetch the Privacy Policy based on the domain name from the request. Available for non-authorized users. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_self_registration_params_using_get(async_req=True) + >>> thread = api.get_privacy_policy_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :return: SelfRegistrationParams + :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_self_registration_params_using_get_with_http_info(**kwargs) # noqa: E501 + return self.get_privacy_policy_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_self_registration_params_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_privacy_policy_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_self_registration_params_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Get Self Registration parameters (getSelfRegistrationParams) # noqa: E501 + def get_privacy_policy_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get Privacy Policy for Self Registration form (getPrivacyPolicy) # noqa: E501 - Fetch the Self Registration parameters object for the tenant of the current user. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the white labeling resource. # noqa: E501 + Fetch the Privacy Policy based on the domain name from the request. Available for non-authorized users. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_self_registration_params_using_get_with_http_info(async_req=True) + >>> thread = api.get_privacy_policy_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: SelfRegistrationParams + :return: str If the method is called asynchronously, returns the request thread. """ @@ -166,7 +172,7 @@ def get_self_registration_params_using_get_with_http_info(self, **kwargs): # no if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_self_registration_params_using_get" % key + " to method get_privacy_policy_using_get" % key ) params[key] = val del params['kwargs'] @@ -188,17 +194,17 @@ def get_self_registration_params_using_get_with_http_info(self, **kwargs): # no ['application/json']) # noqa: E501 # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/api/selfRegistration/selfRegistrationParams', 'GET', + '/api/noauth/selfRegistration/privacyPolicy', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='SelfRegistrationParams', # noqa: E501 + response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -206,43 +212,43 @@ def get_self_registration_params_using_get_with_http_info(self, **kwargs): # no _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def delete_self_registration_params_using_delete(self, domain_name, **kwargs): # noqa: E501 - """deleteSelfRegistrationParams # noqa: E501 + def get_self_registration_params_using_get(self, **kwargs): # noqa: E501 + """Get Self Registration parameters (getSelfRegistrationParams) # noqa: E501 + Fetch the Self Registration parameters object for the tenant of the current user. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the white labeling resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_self_registration_params_using_delete(domain_name, async_req=True) + >>> thread = api.get_self_registration_params_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param str domain_name: domainName (required) - :return: DeferredResultResponseEntity + :return: SelfRegistrationParams If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_self_registration_params_using_delete_with_http_info(domain_name, **kwargs) # noqa: E501 + return self.get_self_registration_params_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.delete_self_registration_params_using_delete_with_http_info(domain_name, **kwargs) # noqa: E501 + (data) = self.get_self_registration_params_using_get_with_http_info(**kwargs) # noqa: E501 return data - def delete_self_registration_params_using_delete_with_http_info(self, domain_name, **kwargs): # noqa: E501 - """deleteSelfRegistrationParams # noqa: E501 + def get_self_registration_params_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get Self Registration parameters (getSelfRegistrationParams) # noqa: E501 + Fetch the Self Registration parameters object for the tenant of the current user. Available for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the white labeling resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_self_registration_params_using_delete_with_http_info(domain_name, async_req=True) + >>> thread = api.get_self_registration_params_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str domain_name: domainName (required) - :return: DeferredResultResponseEntity + :return: SelfRegistrationParams If the method is called asynchronously, returns the request thread. """ - all_params = ['domain_name'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -253,20 +259,14 @@ def delete_self_registration_params_using_delete_with_http_info(self, domain_nam if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_self_registration_params_using_delete" % key + " to method get_self_registration_params_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'domain_name' is set - if ('domain_name' not in params or - params['domain_name'] is None): - raise ValueError("Missing the required parameter `domain_name` when calling `delete_self_registration_params_using_delete`") # noqa: E501 collection_formats = {} path_params = {} - if 'domain_name' in params: - path_params['domainName'] = params['domain_name'] # noqa: E501 query_params = [] @@ -284,14 +284,14 @@ def delete_self_registration_params_using_delete_with_http_info(self, domain_nam auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/selfRegistration/selfRegistrationParams/{domainName}', 'DELETE', + '/api/selfRegistration/selfRegistrationParams', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='DeferredResultResponseEntity', # noqa: E501 + response_type='SelfRegistrationParams', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/tb_rest_client/api/api_pe/sign_up_controller_api.py b/tb_rest_client/api/api_pe/sign_up_controller_api.py index 24d4939a..47dab231 100644 --- a/tb_rest_client/api/api_pe/sign_up_controller_api.py +++ b/tb_rest_client/api/api_pe/sign_up_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,91 +32,6 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def accept_privacy_policy_and_terms_of_use_using_post(self, **kwargs): # noqa: E501 - """acceptPrivacyPolicyAndTermsOfUse # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.accept_privacy_policy_and_terms_of_use_using_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: JsonNode - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.accept_privacy_policy_and_terms_of_use_using_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.accept_privacy_policy_and_terms_of_use_using_post_with_http_info(**kwargs) # noqa: E501 - return data - - def accept_privacy_policy_and_terms_of_use_using_post_with_http_info(self, **kwargs): # noqa: E501 - """acceptPrivacyPolicyAndTermsOfUse # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.accept_privacy_policy_and_terms_of_use_using_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: JsonNode - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method accept_privacy_policy_and_terms_of_use_using_post" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/signup/acceptPrivacyPolicyAndTermsOfUse', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JsonNode', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def accept_privacy_policy_using_post(self, **kwargs): # noqa: E501 """Accept privacy policy (acceptPrivacyPolicy) # noqa: E501 @@ -291,43 +206,47 @@ def accept_terms_of_use_using_post_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def activate_cloud_email_using_get(self, email_code, **kwargs): # noqa: E501 - """activateCloudEmail # noqa: E501 + def activate_email_using_get(self, email_code, **kwargs): # noqa: E501 + """Activate User using code from Email (activateEmail) # noqa: E501 + Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_cloud_email_using_get(email_code, async_req=True) + >>> thread = api.activate_email_using_get(email_code, async_req=True) >>> result = thread.get() :param async_req bool - :param str email_code: emailCode (required) + :param str email_code: Activation token. (required) + :param str pkg_name: Optional package name of the mobile application. :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.activate_cloud_email_using_get_with_http_info(email_code, **kwargs) # noqa: E501 + return self.activate_email_using_get_with_http_info(email_code, **kwargs) # noqa: E501 else: - (data) = self.activate_cloud_email_using_get_with_http_info(email_code, **kwargs) # noqa: E501 + (data) = self.activate_email_using_get_with_http_info(email_code, **kwargs) # noqa: E501 return data - def activate_cloud_email_using_get_with_http_info(self, email_code, **kwargs): # noqa: E501 - """activateCloudEmail # noqa: E501 + def activate_email_using_get_with_http_info(self, email_code, **kwargs): # noqa: E501 + """Activate User using code from Email (activateEmail) # noqa: E501 + Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_cloud_email_using_get_with_http_info(email_code, async_req=True) + >>> thread = api.activate_email_using_get_with_http_info(email_code, async_req=True) >>> result = thread.get() :param async_req bool - :param str email_code: emailCode (required) + :param str email_code: Activation token. (required) + :param str pkg_name: Optional package name of the mobile application. :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['email_code'] # noqa: E501 + all_params = ['email_code', 'pkg_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -338,14 +257,14 @@ def activate_cloud_email_using_get_with_http_info(self, email_code, **kwargs): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method activate_cloud_email_using_get" % key + " to method activate_email_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'email_code' is set if ('email_code' not in params or params['email_code'] is None): - raise ValueError("Missing the required parameter `email_code` when calling `activate_cloud_email_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `email_code` when calling `activate_email_using_get`") # noqa: E501 collection_formats = {} @@ -354,6 +273,8 @@ def activate_cloud_email_using_get_with_http_info(self, email_code, **kwargs): query_params = [] if 'email_code' in params: query_params.append(('emailCode', params['email_code'])) # noqa: E501 + if 'pkg_name' in params: + query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 header_params = {} @@ -369,7 +290,7 @@ def activate_cloud_email_using_get_with_http_info(self, email_code, **kwargs): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/api/noauth/cloud/activateEmail{?emailCode}', 'GET', + '/api/noauth/activateEmail{?emailCode,pkgName}', 'GET', path_params, query_params, header_params, @@ -384,43 +305,47 @@ def activate_cloud_email_using_get_with_http_info(self, email_code, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def activate_cloud_user_by_email_code_using_post(self, email_code, **kwargs): # noqa: E501 - """activateCloudUserByEmailCode # noqa: E501 + def activate_user_by_email_code_using_post(self, email_code, **kwargs): # noqa: E501 + """Activate and login using code from Email (activateUserByEmailCode) # noqa: E501 + Activate the user using code(link) from the activation email and return the JWT Token. Sends the notification and email about user activation. Checks that user was not activated yet. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_cloud_user_by_email_code_using_post(email_code, async_req=True) + >>> thread = api.activate_user_by_email_code_using_post(email_code, async_req=True) >>> result = thread.get() :param async_req bool - :param str email_code: emailCode (required) - :return: JsonNode + :param str email_code: Activation token. (required) + :param str pkg_name: Optional package name of the mobile application. + :return: JWTPair If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.activate_cloud_user_by_email_code_using_post_with_http_info(email_code, **kwargs) # noqa: E501 + return self.activate_user_by_email_code_using_post_with_http_info(email_code, **kwargs) # noqa: E501 else: - (data) = self.activate_cloud_user_by_email_code_using_post_with_http_info(email_code, **kwargs) # noqa: E501 + (data) = self.activate_user_by_email_code_using_post_with_http_info(email_code, **kwargs) # noqa: E501 return data - def activate_cloud_user_by_email_code_using_post_with_http_info(self, email_code, **kwargs): # noqa: E501 - """activateCloudUserByEmailCode # noqa: E501 + def activate_user_by_email_code_using_post_with_http_info(self, email_code, **kwargs): # noqa: E501 + """Activate and login using code from Email (activateUserByEmailCode) # noqa: E501 + Activate the user using code(link) from the activation email and return the JWT Token. Sends the notification and email about user activation. Checks that user was not activated yet. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_cloud_user_by_email_code_using_post_with_http_info(email_code, async_req=True) + >>> thread = api.activate_user_by_email_code_using_post_with_http_info(email_code, async_req=True) >>> result = thread.get() :param async_req bool - :param str email_code: emailCode (required) - :return: JsonNode + :param str email_code: Activation token. (required) + :param str pkg_name: Optional package name of the mobile application. + :return: JWTPair If the method is called asynchronously, returns the request thread. """ - all_params = ['email_code'] # noqa: E501 + all_params = ['email_code', 'pkg_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -431,14 +356,14 @@ def activate_cloud_user_by_email_code_using_post_with_http_info(self, email_code if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method activate_cloud_user_by_email_code_using_post" % key + " to method activate_user_by_email_code_using_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'email_code' is set if ('email_code' not in params or params['email_code'] is None): - raise ValueError("Missing the required parameter `email_code` when calling `activate_cloud_user_by_email_code_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `email_code` when calling `activate_user_by_email_code_using_post`") # noqa: E501 collection_formats = {} @@ -447,6 +372,8 @@ def activate_cloud_user_by_email_code_using_post_with_http_info(self, email_code query_params = [] if 'email_code' in params: query_params.append(('emailCode', params['email_code'])) # noqa: E501 + if 'pkg_name' in params: + query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 header_params = {} @@ -462,14 +389,14 @@ def activate_cloud_user_by_email_code_using_post_with_http_info(self, email_code auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/api/noauth/cloud/activateByEmailCode{?emailCode}', 'POST', + '/api/noauth/activateByEmailCode{?emailCode,pkgName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='JsonNode', # noqa: E501 + response_type='JWTPair', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -477,47 +404,45 @@ def activate_cloud_user_by_email_code_using_post_with_http_info(self, email_code _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def activate_email_using_get(self, email_code, **kwargs): # noqa: E501 - """Activate User using code from Email (activateEmail) # noqa: E501 + def mobile_login_using_get(self, pkg_name, **kwargs): # noqa: E501 + """Mobile Login redirect (mobileLogin) # noqa: E501 - Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet. # noqa: E501 + This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_email_using_get(email_code, async_req=True) + >>> thread = api.mobile_login_using_get(pkg_name, async_req=True) >>> result = thread.get() :param async_req bool - :param str email_code: Activation token. (required) - :param str pkg_name: Optional package name of the mobile application. + :param str pkg_name: Mobile app package name. Used to identify the application and build the redirect link. (required) :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.activate_email_using_get_with_http_info(email_code, **kwargs) # noqa: E501 + return self.mobile_login_using_get_with_http_info(pkg_name, **kwargs) # noqa: E501 else: - (data) = self.activate_email_using_get_with_http_info(email_code, **kwargs) # noqa: E501 + (data) = self.mobile_login_using_get_with_http_info(pkg_name, **kwargs) # noqa: E501 return data - def activate_email_using_get_with_http_info(self, email_code, **kwargs): # noqa: E501 - """Activate User using code from Email (activateEmail) # noqa: E501 + def mobile_login_using_get_with_http_info(self, pkg_name, **kwargs): # noqa: E501 + """Mobile Login redirect (mobileLogin) # noqa: E501 - Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet. # noqa: E501 + This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_email_using_get_with_http_info(email_code, async_req=True) + >>> thread = api.mobile_login_using_get_with_http_info(pkg_name, async_req=True) >>> result = thread.get() :param async_req bool - :param str email_code: Activation token. (required) - :param str pkg_name: Optional package name of the mobile application. + :param str pkg_name: Mobile app package name. Used to identify the application and build the redirect link. (required) :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['email_code', 'pkg_name'] # noqa: E501 + all_params = ['pkg_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -528,22 +453,20 @@ def activate_email_using_get_with_http_info(self, email_code, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method activate_email_using_get" % key + " to method mobile_login_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'email_code' is set - if ('email_code' not in params or - params['email_code'] is None): - raise ValueError("Missing the required parameter `email_code` when calling `activate_email_using_get`") # noqa: E501 + # verify the required parameter 'pkg_name' is set + if ('pkg_name' not in params or + params['pkg_name'] is None): + raise ValueError("Missing the required parameter `pkg_name` when calling `mobile_login_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'email_code' in params: - query_params.append(('emailCode', params['email_code'])) # noqa: E501 if 'pkg_name' in params: query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 @@ -561,7 +484,7 @@ def activate_email_using_get_with_http_info(self, email_code, **kwargs): # noqa auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/api/noauth/activateEmail{?emailCode,pkgName}', 'GET', + '/api/noauth/login{?pkgName}', 'GET', path_params, query_params, header_params, @@ -576,47 +499,43 @@ def activate_email_using_get_with_http_info(self, email_code, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def activate_user_by_email_code_using_post(self, email_code, **kwargs): # noqa: E501 - """Activate and login using code from Email (activateUserByEmailCode) # noqa: E501 + def privacy_policy_accepted_using_get(self, **kwargs): # noqa: E501 + """Check privacy policy (privacyPolicyAccepted) # noqa: E501 - Activate the user using code(link) from the activation email and return the JWT Token. Sends the notification and email about user activation. Checks that user was not activated yet. # noqa: E501 + Checks that current user accepted the privacy policy. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_user_by_email_code_using_post(email_code, async_req=True) + >>> thread = api.privacy_policy_accepted_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param str email_code: Activation token. (required) - :param str pkg_name: Optional package name of the mobile application. - :return: JWTTokenPair + :return: bool If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.activate_user_by_email_code_using_post_with_http_info(email_code, **kwargs) # noqa: E501 + return self.privacy_policy_accepted_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.activate_user_by_email_code_using_post_with_http_info(email_code, **kwargs) # noqa: E501 + (data) = self.privacy_policy_accepted_using_get_with_http_info(**kwargs) # noqa: E501 return data - def activate_user_by_email_code_using_post_with_http_info(self, email_code, **kwargs): # noqa: E501 - """Activate and login using code from Email (activateUserByEmailCode) # noqa: E501 + def privacy_policy_accepted_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Check privacy policy (privacyPolicyAccepted) # noqa: E501 - Activate the user using code(link) from the activation email and return the JWT Token. Sends the notification and email about user activation. Checks that user was not activated yet. # noqa: E501 + Checks that current user accepted the privacy policy. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_user_by_email_code_using_post_with_http_info(email_code, async_req=True) + >>> thread = api.privacy_policy_accepted_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str email_code: Activation token. (required) - :param str pkg_name: Optional package name of the mobile application. - :return: JWTTokenPair + :return: bool If the method is called asynchronously, returns the request thread. """ - all_params = ['email_code', 'pkg_name'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -627,24 +546,16 @@ def activate_user_by_email_code_using_post_with_http_info(self, email_code, **kw if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method activate_user_by_email_code_using_post" % key + " to method privacy_policy_accepted_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'email_code' is set - if ('email_code' not in params or - params['email_code'] is None): - raise ValueError("Missing the required parameter `email_code` when calling `activate_user_by_email_code_using_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'email_code' in params: - query_params.append(('emailCode', params['email_code'])) # noqa: E501 - if 'pkg_name' in params: - query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 header_params = {} @@ -657,17 +568,17 @@ def activate_user_by_email_code_using_post_with_http_info(self, email_code, **kw ['application/json']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/noauth/activateByEmailCode{?emailCode,pkgName}', 'POST', + '/api/signup/privacyPolicyAccepted', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='JWTTokenPair', # noqa: E501 + response_type='bool', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -675,43 +586,47 @@ def activate_user_by_email_code_using_post_with_http_info(self, email_code, **kw _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def delete_tenant_account_using_post(self, **kwargs): # noqa: E501 - """deleteTenantAccount # noqa: E501 + def resend_email_activation_using_post(self, email, **kwargs): # noqa: E501 + """Resend Activation Email (resendEmailActivation) # noqa: E501 + Request to resend the activation email for the user. Checks that user was not activated yet. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_tenant_account_using_post(async_req=True) + >>> thread = api.resend_email_activation_using_post(email, async_req=True) >>> result = thread.get() :param async_req bool - :param DeleteTenantRequest body: + :param str email: Email of the user. (required) + :param str pkg_name: Optional package name of the mobile application. :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_tenant_account_using_post_with_http_info(**kwargs) # noqa: E501 + return self.resend_email_activation_using_post_with_http_info(email, **kwargs) # noqa: E501 else: - (data) = self.delete_tenant_account_using_post_with_http_info(**kwargs) # noqa: E501 + (data) = self.resend_email_activation_using_post_with_http_info(email, **kwargs) # noqa: E501 return data - def delete_tenant_account_using_post_with_http_info(self, **kwargs): # noqa: E501 - """deleteTenantAccount # noqa: E501 + def resend_email_activation_using_post_with_http_info(self, email, **kwargs): # noqa: E501 + """Resend Activation Email (resendEmailActivation) # noqa: E501 + Request to resend the activation email for the user. Checks that user was not activated yet. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_tenant_account_using_post_with_http_info(async_req=True) + >>> thread = api.resend_email_activation_using_post_with_http_info(email, async_req=True) >>> result = thread.get() :param async_req bool - :param DeleteTenantRequest body: + :param str email: Email of the user. (required) + :param str pkg_name: Optional package name of the mobile application. :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['email', 'pkg_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -722,16 +637,24 @@ def delete_tenant_account_using_post_with_http_info(self, **kwargs): # noqa: E5 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_tenant_account_using_post" % key + " to method resend_email_activation_using_post" % key ) params[key] = val del params['kwargs'] + # verify the required parameter 'email' is set + if ('email' not in params or + params['email'] is None): + raise ValueError("Missing the required parameter `email` when calling `resend_email_activation_using_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'email' in params: + query_params.append(('email', params['email'])) # noqa: E501 + if 'pkg_name' in params: + query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 header_params = {} @@ -739,562 +662,12 @@ def delete_tenant_account_using_post_with_http_info(self, **kwargs): # noqa: E5 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/signup/tenantAccount', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_recaptcha_public_key_using_get(self, **kwargs): # noqa: E501 - """getRecaptchaPublicKey # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_recaptcha_public_key_using_get(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_recaptcha_public_key_using_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_recaptcha_public_key_using_get_with_http_info(**kwargs) # noqa: E501 - return data - - def get_recaptcha_public_key_using_get_with_http_info(self, **kwargs): # noqa: E501 - """getRecaptchaPublicKey # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_recaptcha_public_key_using_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_recaptcha_public_key_using_get" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['text/plain', 'application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/noauth/signup/recaptchaPublicKey', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def is_display_welcome_using_get(self, **kwargs): # noqa: E501 - """isDisplayWelcome # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.is_display_welcome_using_get(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: bool - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.is_display_welcome_using_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.is_display_welcome_using_get_with_http_info(**kwargs) # noqa: E501 - return data - - def is_display_welcome_using_get_with_http_info(self, **kwargs): # noqa: E501 - """isDisplayWelcome # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.is_display_welcome_using_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: bool - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method is_display_welcome_using_get" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/signup/displayWelcome', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='bool', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def mobile_login_using_get(self, pkg_name, **kwargs): # noqa: E501 - """Mobile Login redirect (mobileLogin) # noqa: E501 - - This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.mobile_login_using_get(pkg_name, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str pkg_name: Mobile app package name. Used to identify the application and build the redirect link. (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.mobile_login_using_get_with_http_info(pkg_name, **kwargs) # noqa: E501 - else: - (data) = self.mobile_login_using_get_with_http_info(pkg_name, **kwargs) # noqa: E501 - return data - - def mobile_login_using_get_with_http_info(self, pkg_name, **kwargs): # noqa: E501 - """Mobile Login redirect (mobileLogin) # noqa: E501 - - This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.mobile_login_using_get_with_http_info(pkg_name, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str pkg_name: Mobile app package name. Used to identify the application and build the redirect link. (required) - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['pkg_name'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method mobile_login_using_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'pkg_name' is set - if ('pkg_name' not in params or - params['pkg_name'] is None): - raise ValueError("Missing the required parameter `pkg_name` when calling `mobile_login_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pkg_name' in params: - query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/noauth/login{?pkgName}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def privacy_policy_accepted_using_get(self, **kwargs): # noqa: E501 - """Check privacy policy (privacyPolicyAccepted) # noqa: E501 - - Checks that current user accepted the privacy policy. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.privacy_policy_accepted_using_get(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: bool - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.privacy_policy_accepted_using_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.privacy_policy_accepted_using_get_with_http_info(**kwargs) # noqa: E501 - return data - - def privacy_policy_accepted_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Check privacy policy (privacyPolicyAccepted) # noqa: E501 - - Checks that current user accepted the privacy policy. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.privacy_policy_accepted_using_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: bool - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method privacy_policy_accepted_using_get" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/signup/privacyPolicyAccepted', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='bool', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def resend_cloud_email_activation_using_post(self, email, **kwargs): # noqa: E501 - """resendCloudEmailActivation # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.resend_cloud_email_activation_using_post(email, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str email: email (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.resend_cloud_email_activation_using_post_with_http_info(email, **kwargs) # noqa: E501 - else: - (data) = self.resend_cloud_email_activation_using_post_with_http_info(email, **kwargs) # noqa: E501 - return data - - def resend_cloud_email_activation_using_post_with_http_info(self, email, **kwargs): # noqa: E501 - """resendCloudEmailActivation # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.resend_cloud_email_activation_using_post_with_http_info(email, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str email: email (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['email'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method resend_cloud_email_activation_using_post" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'email' is set - if ('email' not in params or - params['email'] is None): - raise ValueError("Missing the required parameter `email` when calling `resend_cloud_email_activation_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'email' in params: - query_params.append(('email', params['email'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/noauth/cloud/resendEmailActivation{?email}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def resend_email_activation_using_post(self, email, **kwargs): # noqa: E501 - """Resend Activation Email (resendEmailActivation) # noqa: E501 - - Request to resend the activation email for the user. Checks that user was not activated yet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.resend_email_activation_using_post(email, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str email: Email of the user. (required) - :param str pkg_name: Optional package name of the mobile application. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.resend_email_activation_using_post_with_http_info(email, **kwargs) # noqa: E501 - else: - (data) = self.resend_email_activation_using_post_with_http_info(email, **kwargs) # noqa: E501 - return data - - def resend_email_activation_using_post_with_http_info(self, email, **kwargs): # noqa: E501 - """Resend Activation Email (resendEmailActivation) # noqa: E501 - - Request to resend the activation email for the user. Checks that user was not activated yet. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.resend_email_activation_using_post_with_http_info(email, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str email: Email of the user. (required) - :param str pkg_name: Optional package name of the mobile application. - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['email', 'pkg_name'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method resend_email_activation_using_post" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'email' is set - if ('email' not in params or - params['email'] is None): - raise ValueError("Missing the required parameter `email` when calling `resend_email_activation_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'email' in params: - query_params.append(('email', params['email'])) # noqa: E501 - if 'pkg_name' in params: - query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/noauth/resendEmailActivation{?email,pkgName}', 'POST', @@ -1312,91 +685,6 @@ def resend_email_activation_using_post_with_http_info(self, email, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def set_not_display_welcome_using_post(self, **kwargs): # noqa: E501 - """setNotDisplayWelcome # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_not_display_welcome_using_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.set_not_display_welcome_using_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.set_not_display_welcome_using_post_with_http_info(**kwargs) # noqa: E501 - return data - - def set_not_display_welcome_using_post_with_http_info(self, **kwargs): # noqa: E501 - """setNotDisplayWelcome # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.set_not_display_welcome_using_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method set_not_display_welcome_using_post" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/signup/notDisplayWelcome', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def sign_up_using_post(self, **kwargs): # noqa: E501 """User Sign Up (signUp) # noqa: E501 diff --git a/tb_rest_client/api/api_pe/solution_controller_api.py b/tb_rest_client/api/api_pe/solution_controller_api.py index 77bdb7af..68c1c74e 100644 --- a/tb_rest_client/api/api_pe/solution_controller_api.py +++ b/tb_rest_client/api/api_pe/solution_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/tb_resource_controller_api.py b/tb_rest_client/api/api_pe/tb_resource_controller_api.py index 38088bc9..6965648e 100644 --- a/tb_rest_client/api/api_pe/tb_resource_controller_api.py +++ b/tb_rest_client/api/api_pe/tb_resource_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,13 +32,13 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def delete_resource_using_delete1(self, resource_id, **kwargs): # noqa: E501 + def delete_resource_using_delete(self, resource_id, **kwargs): # noqa: E501 """Delete Resource (deleteResource) # noqa: E501 Deletes the Resource. Referencing non-existing Resource Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_using_delete1(resource_id, async_req=True) + >>> thread = api.delete_resource_using_delete(resource_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -49,18 +49,18 @@ def delete_resource_using_delete1(self, resource_id, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_resource_using_delete1_with_http_info(resource_id, **kwargs) # noqa: E501 + return self.delete_resource_using_delete_with_http_info(resource_id, **kwargs) # noqa: E501 else: - (data) = self.delete_resource_using_delete1_with_http_info(resource_id, **kwargs) # noqa: E501 + (data) = self.delete_resource_using_delete_with_http_info(resource_id, **kwargs) # noqa: E501 return data - def delete_resource_using_delete1_with_http_info(self, resource_id, **kwargs): # noqa: E501 + def delete_resource_using_delete_with_http_info(self, resource_id, **kwargs): # noqa: E501 """Delete Resource (deleteResource) # noqa: E501 Deletes the Resource. Referencing non-existing Resource Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_using_delete1_with_http_info(resource_id, async_req=True) + >>> thread = api.delete_resource_using_delete_with_http_info(resource_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -81,14 +81,14 @@ def delete_resource_using_delete1_with_http_info(self, resource_id, **kwargs): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_resource_using_delete1" % key + " to method delete_resource_using_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'resource_id' is set if ('resource_id' not in params or params['resource_id'] is None): - raise ValueError("Missing the required parameter `resource_id` when calling `delete_resource_using_delete1`") # noqa: E501 + raise ValueError("Missing the required parameter `resource_id` when calling `delete_resource_using_delete`") # noqa: E501 collection_formats = {} @@ -234,7 +234,7 @@ def get_lwm2m_list_objects_page_using_get(self, page_size, page, **kwargs): # n :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the resource title. + :param str text_search: The case insensitive 'substring' filter based on the resource title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: list[LwM2mObject] @@ -260,7 +260,7 @@ def get_lwm2m_list_objects_page_using_get_with_http_info(self, page_size, page, :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the resource title. + :param str text_search: The case insensitive 'substring' filter based on the resource title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: list[LwM2mObject] @@ -650,7 +650,7 @@ def get_resources_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the resource title. + :param str text_search: The case insensitive 'substring' filter based on the resource title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTbResourceInfo @@ -676,7 +676,7 @@ def get_resources_using_get_with_http_info(self, page_size, page, **kwargs): # :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the resource title. + :param str text_search: The case insensitive 'substring' filter based on the resource title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTbResourceInfo @@ -756,7 +756,7 @@ def get_resources_using_get_with_http_info(self, page_size, page, **kwargs): # def save_resource_using_post(self, **kwargs): # noqa: E501 """Create Or Update Resource (saveResource) # noqa: E501 - Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. Resource combination of the title with the key is unique in the scope of tenant. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. Resource combination of the title with the key is unique in the scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Resource entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_resource_using_post(async_req=True) @@ -778,7 +778,7 @@ def save_resource_using_post(self, **kwargs): # noqa: E501 def save_resource_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Resource (saveResource) # noqa: E501 - Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. Resource combination of the title with the key is unique in the scope of tenant. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. Resource combination of the title with the key is unique in the scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Resource entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_resource_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_pe/telemetry_controller_api.py b/tb_rest_client/api/api_pe/telemetry_controller_api.py index 6665059d..203eaa15 100644 --- a/tb_rest_client/api/api_pe/telemetry_controller_api.py +++ b/tb_rest_client/api/api_pe/telemetry_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -606,7 +606,7 @@ def get_attribute_keys_using_get_with_http_info(self, entity_type, entity_id, ** def get_attributes_by_scope_using_get(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Get attributes by scope (getAttributesByScope) # noqa: E501 - Returns all attributes of a specified scope that belong to specified entity. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. Use optional 'keys' parameter to return specific attributes. Example of the result: ```json [ {\"key\": \"stringAttributeKey\", \"value\": \"value\", \"lastUpdateTs\": 1609459200000}, {\"key\": \"booleanAttributeKey\", \"value\": false, \"lastUpdateTs\": 1609459200001}, {\"key\": \"doubleAttributeKey\", \"value\": 42.2, \"lastUpdateTs\": 1609459200002}, {\"key\": \"longKeyExample\", \"value\": 73, \"lastUpdateTs\": 1609459200003}, {\"key\": \"jsonKeyExample\", \"value\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} }, \"lastUpdateTs\": 1609459200004 } ] ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Returns all attributes of a specified scope that belong to specified entity. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices; * CLIENT_SCOPE - supported for devices. Use optional 'keys' parameter to return specific attributes. Example of the result: ```json [ {\"key\": \"stringAttributeKey\", \"value\": \"value\", \"lastUpdateTs\": 1609459200000}, {\"key\": \"booleanAttributeKey\", \"value\": false, \"lastUpdateTs\": 1609459200001}, {\"key\": \"doubleAttributeKey\", \"value\": 42.2, \"lastUpdateTs\": 1609459200002}, {\"key\": \"longKeyExample\", \"value\": 73, \"lastUpdateTs\": 1609459200003}, {\"key\": \"jsonKeyExample\", \"value\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} }, \"lastUpdateTs\": 1609459200004 } ] ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attributes_by_scope_using_get(entity_type, entity_id, scope, async_req=True) @@ -631,7 +631,7 @@ def get_attributes_by_scope_using_get(self, entity_type, entity_id, scope, **kwa def get_attributes_by_scope_using_get_with_http_info(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Get attributes by scope (getAttributesByScope) # noqa: E501 - Returns all attributes of a specified scope that belong to specified entity. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. Use optional 'keys' parameter to return specific attributes. Example of the result: ```json [ {\"key\": \"stringAttributeKey\", \"value\": \"value\", \"lastUpdateTs\": 1609459200000}, {\"key\": \"booleanAttributeKey\", \"value\": false, \"lastUpdateTs\": 1609459200001}, {\"key\": \"doubleAttributeKey\", \"value\": 42.2, \"lastUpdateTs\": 1609459200002}, {\"key\": \"longKeyExample\", \"value\": 73, \"lastUpdateTs\": 1609459200003}, {\"key\": \"jsonKeyExample\", \"value\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} }, \"lastUpdateTs\": 1609459200004 } ] ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Returns all attributes of a specified scope that belong to specified entity. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices; * CLIENT_SCOPE - supported for devices. Use optional 'keys' parameter to return specific attributes. Example of the result: ```json [ {\"key\": \"stringAttributeKey\", \"value\": \"value\", \"lastUpdateTs\": 1609459200000}, {\"key\": \"booleanAttributeKey\", \"value\": false, \"lastUpdateTs\": 1609459200001}, {\"key\": \"doubleAttributeKey\", \"value\": 42.2, \"lastUpdateTs\": 1609459200002}, {\"key\": \"longKeyExample\", \"value\": 73, \"lastUpdateTs\": 1609459200003}, {\"key\": \"jsonKeyExample\", \"value\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} }, \"lastUpdateTs\": 1609459200004 } ] ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_attributes_by_scope_using_get_with_http_info(entity_type, entity_id, scope, async_req=True) @@ -1300,7 +1300,7 @@ def save_device_attributes_using_post_with_http_info(self, device_id, scope, **k def save_entity_attributes_v1_using_post(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Save entity attributes (saveEntityAttributesV1) # noqa: E501 - Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_attributes_v1_using_post(entity_type, entity_id, scope, async_req=True) @@ -1325,7 +1325,7 @@ def save_entity_attributes_v1_using_post(self, entity_type, entity_id, scope, ** def save_entity_attributes_v1_using_post_with_http_info(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Save entity attributes (saveEntityAttributesV1) # noqa: E501 - Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_attributes_v1_using_post_with_http_info(entity_type, entity_id, scope, async_req=True) @@ -1419,7 +1419,7 @@ def save_entity_attributes_v1_using_post_with_http_info(self, entity_type, entit def save_entity_attributes_v2_using_post(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Save entity attributes (saveEntityAttributesV2) # noqa: E501 - Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_attributes_v2_using_post(entity_type, entity_id, scope, async_req=True) @@ -1444,7 +1444,7 @@ def save_entity_attributes_v2_using_post(self, entity_type, entity_id, scope, ** def save_entity_attributes_v2_using_post_with_http_info(self, entity_type, entity_id, scope, **kwargs): # noqa: E501 """Save entity attributes (saveEntityAttributesV2) # noqa: E501 - Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * CLIENT_SCOPE - supported for devices; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: * SERVER_SCOPE - supported for all entity types; * SHARED_SCOPE - supported for devices. The request payload is a JSON object with key-value format of attributes to create or update. For example: ```json { \"stringKey\":\"value1\", \"booleanKey\":true, \"doubleKey\":42.0, \"longKey\":73, \"jsonKey\": { \"someNumber\": 42, \"someArray\": [1,2,3], \"someNestedObject\": {\"key\": \"value\"} } } ``` Referencing a non-existing entity Id or invalid entity type will cause an error. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_entity_attributes_v2_using_post_with_http_info(entity_type, entity_id, scope, async_req=True) diff --git a/tb_rest_client/api/api_pe/tenant_controller_api.py b/tb_rest_client/api/api_pe/tenant_controller_api.py index 4b6ae57d..b931a594 100644 --- a/tb_rest_client/api/api_pe/tenant_controller_api.py +++ b/tb_rest_client/api/api_pe/tenant_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -329,7 +329,7 @@ def get_tenant_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant name. + :param str text_search: The case insensitive 'substring' filter based on the tenant name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenantInfo @@ -355,7 +355,7 @@ def get_tenant_infos_using_get_with_http_info(self, page_size, page, **kwargs): :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant name. + :param str text_search: The case insensitive 'substring' filter based on the tenant name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenantInfo @@ -537,7 +537,7 @@ def get_tenants_using_get(self, page_size, page, **kwargs): # noqa: E501 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant name. + :param str text_search: The case insensitive 'substring' filter based on the tenant name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenant @@ -563,7 +563,7 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant name. + :param str text_search: The case insensitive 'substring' filter based on the tenant name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenant @@ -643,7 +643,7 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no def save_tenant_using_post(self, **kwargs): # noqa: E501 """Create Or update Tenant (saveTenant) # noqa: E501 - Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Default Rule Chain and Device profile are also generated for the new tenants automatically. The newly created Tenant Id will be present in the response. Specify existing Tenant Id id to update the Tenant. Referencing non-existing Tenant Id will cause 'Not Found' error. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Default Rule Chain and Device profile are also generated for the new tenants automatically. The newly created Tenant Id will be present in the response. Specify existing Tenant Id id to update the Tenant. Referencing non-existing Tenant Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Tenant entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_tenant_using_post(async_req=True) @@ -665,7 +665,7 @@ def save_tenant_using_post(self, **kwargs): # noqa: E501 def save_tenant_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or update Tenant (saveTenant) # noqa: E501 - Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Default Rule Chain and Device profile are also generated for the new tenants automatically. The newly created Tenant Id will be present in the response. Specify existing Tenant Id id to update the Tenant. Referencing non-existing Tenant Id will cause 'Not Found' error. Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Default Rule Chain and Device profile are also generated for the new tenants automatically. The newly created Tenant Id will be present in the response. Specify existing Tenant Id id to update the Tenant. Referencing non-existing Tenant Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Tenant entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_tenant_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_pe/tenant_profile_controller_api.py b/tb_rest_client/api/api_pe/tenant_profile_controller_api.py index 8e9d6542..3532e251 100644 --- a/tb_rest_client/api/api_pe/tenant_profile_controller_api.py +++ b/tb_rest_client/api/api_pe/tenant_profile_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -416,7 +416,7 @@ def get_tenant_profile_infos_using_get(self, page_size, page, **kwargs): # noqa :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant profile name. + :param str text_search: The case insensitive 'substring' filter based on the tenant profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityInfo @@ -442,7 +442,7 @@ def get_tenant_profile_infos_using_get_with_http_info(self, page_size, page, **k :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant profile name. + :param str text_search: The case insensitive 'substring' filter based on the tenant profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataEntityInfo @@ -519,6 +519,99 @@ def get_tenant_profile_infos_using_get_with_http_info(self, page_size, page, **k _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_tenant_profiles_by_ids_using_get(self, ids, **kwargs): # noqa: E501 + """getTenantProfilesByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_profiles_by_ids_using_get(ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ids: ids (required) + :return: list[TenantProfile] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_tenant_profiles_by_ids_using_get_with_http_info(ids, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_profiles_by_ids_using_get_with_http_info(ids, **kwargs) # noqa: E501 + return data + + def get_tenant_profiles_by_ids_using_get_with_http_info(self, ids, **kwargs): # noqa: E501 + """getTenantProfilesByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_profiles_by_ids_using_get_with_http_info(ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ids: ids (required) + :return: list[TenantProfile] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ids'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_profiles_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ids' is set + if ('ids' not in params or + params['ids'] is None): + raise ValueError("Missing the required parameter `ids` when calling `get_tenant_profiles_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'ids' in params: + query_params.append(('ids', params['ids'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenantProfiles{?ids}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TenantProfile]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_tenant_profiles_using_get(self, page_size, page, **kwargs): # noqa: E501 """Get Tenant Profiles (getTenantProfiles) # noqa: E501 @@ -531,7 +624,7 @@ def get_tenant_profiles_using_get(self, page_size, page, **kwargs): # noqa: E50 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant profile name. + :param str text_search: The case insensitive 'substring' filter based on the tenant profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenantProfile @@ -557,7 +650,7 @@ def get_tenant_profiles_using_get_with_http_info(self, page_size, page, **kwargs :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the tenant profile name. + :param str text_search: The case insensitive 'substring' filter based on the tenant profile name. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataTenantProfile @@ -637,7 +730,7 @@ def get_tenant_profiles_using_get_with_http_info(self, page_size, page, **kwargs def save_tenant_profile_using_post(self, **kwargs): # noqa: E501 """Create Or update Tenant Profile (saveTenantProfile) # noqa: E501 - Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Tenant Profile Id will be present in the response. Specify existing Tenant Profile Id id to update the Tenant Profile. Referencing non-existing Tenant Profile Id will cause 'Not Found' error. Update of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. The **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. You have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. Let's review the example of tenant profile data below: ```json { \"name\": \"Default\", \"description\": \"Default tenant profile\", \"isolatedTbCore\": false, \"isolatedTbRuleEngine\": false, \"profileData\": { \"configuration\": { \"type\": \"DEFAULT\", \"maxDevices\": 0, \"maxAssets\": 0, \"maxCustomers\": 0, \"maxUsers\": 0, \"maxDashboards\": 0, \"maxRuleChains\": 0, \"maxResourcesInBytes\": 0, \"maxOtaPackagesInBytes\": 0, \"transportTenantMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\", \"transportDeviceMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\", \"maxTransportMessages\": 10000000, \"maxTransportDataPoints\": 10000000, \"maxREExecutions\": 4000000, \"maxJSExecutions\": 5000000, \"maxDPStorageDays\": 0, \"maxRuleNodeExecutionsPerMessage\": 50, \"maxEmails\": 0, \"maxSms\": 0, \"maxCreatedAlarms\": 1000, \"defaultStorageTtlDays\": 0, \"alarmsTtlDays\": 0, \"rpcTtlDays\": 0, \"warnThreshold\": 0 } }, \"default\": true } ``` Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Tenant Profile Id will be present in the response. Specify existing Tenant Profile Id id to update the Tenant Profile. Referencing non-existing Tenant Profile Id will cause 'Not Found' error. Update of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. The **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. You have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. Let's review the example of tenant profile data below: ```json { \"name\": \"Default\", \"description\": \"Default tenant profile\", \"isolatedTbRuleEngine\": false, \"profileData\": { \"configuration\": { \"type\": \"DEFAULT\", \"maxDevices\": 0, \"maxAssets\": 0, \"maxCustomers\": 0, \"maxUsers\": 0, \"maxDashboards\": 0, \"maxRuleChains\": 0, \"maxResourcesInBytes\": 0, \"maxOtaPackagesInBytes\": 0, \"transportTenantMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\", \"transportDeviceMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\", \"maxTransportMessages\": 10000000, \"maxTransportDataPoints\": 10000000, \"maxREExecutions\": 4000000, \"maxJSExecutions\": 5000000, \"maxDPStorageDays\": 0, \"maxRuleNodeExecutionsPerMessage\": 50, \"maxEmails\": 0, \"maxSms\": 0, \"maxCreatedAlarms\": 1000, \"defaultStorageTtlDays\": 0, \"alarmsTtlDays\": 0, \"rpcTtlDays\": 0, \"warnThreshold\": 0 } }, \"default\": true } ```Remove 'id', from the request body example (below) to create new Tenant Profile entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_tenant_profile_using_post(async_req=True) @@ -659,7 +752,7 @@ def save_tenant_profile_using_post(self, **kwargs): # noqa: E501 def save_tenant_profile_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or update Tenant Profile (saveTenantProfile) # noqa: E501 - Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Tenant Profile Id will be present in the response. Specify existing Tenant Profile Id id to update the Tenant Profile. Referencing non-existing Tenant Profile Id will cause 'Not Found' error. Update of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. The **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. You have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. Let's review the example of tenant profile data below: ```json { \"name\": \"Default\", \"description\": \"Default tenant profile\", \"isolatedTbCore\": false, \"isolatedTbRuleEngine\": false, \"profileData\": { \"configuration\": { \"type\": \"DEFAULT\", \"maxDevices\": 0, \"maxAssets\": 0, \"maxCustomers\": 0, \"maxUsers\": 0, \"maxDashboards\": 0, \"maxRuleChains\": 0, \"maxResourcesInBytes\": 0, \"maxOtaPackagesInBytes\": 0, \"transportTenantMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\", \"transportDeviceMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\", \"maxTransportMessages\": 10000000, \"maxTransportDataPoints\": 10000000, \"maxREExecutions\": 4000000, \"maxJSExecutions\": 5000000, \"maxDPStorageDays\": 0, \"maxRuleNodeExecutionsPerMessage\": 50, \"maxEmails\": 0, \"maxSms\": 0, \"maxCreatedAlarms\": 1000, \"defaultStorageTtlDays\": 0, \"alarmsTtlDays\": 0, \"rpcTtlDays\": 0, \"warnThreshold\": 0 } }, \"default\": true } ``` Available for users with 'SYS_ADMIN' authority. # noqa: E501 + Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Tenant Profile Id will be present in the response. Specify existing Tenant Profile Id id to update the Tenant Profile. Referencing non-existing Tenant Profile Id will cause 'Not Found' error. Update of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. The **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. You have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. Let's review the example of tenant profile data below: ```json { \"name\": \"Default\", \"description\": \"Default tenant profile\", \"isolatedTbRuleEngine\": false, \"profileData\": { \"configuration\": { \"type\": \"DEFAULT\", \"maxDevices\": 0, \"maxAssets\": 0, \"maxCustomers\": 0, \"maxUsers\": 0, \"maxDashboards\": 0, \"maxRuleChains\": 0, \"maxResourcesInBytes\": 0, \"maxOtaPackagesInBytes\": 0, \"transportTenantMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\", \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\", \"transportDeviceMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\", \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\", \"maxTransportMessages\": 10000000, \"maxTransportDataPoints\": 10000000, \"maxREExecutions\": 4000000, \"maxJSExecutions\": 5000000, \"maxDPStorageDays\": 0, \"maxRuleNodeExecutionsPerMessage\": 50, \"maxEmails\": 0, \"maxSms\": 0, \"maxCreatedAlarms\": 1000, \"defaultStorageTtlDays\": 0, \"alarmsTtlDays\": 0, \"rpcTtlDays\": 0, \"warnThreshold\": 0 } }, \"default\": true } ```Remove 'id', from the request body example (below) to create new Tenant Profile entity. Available for users with 'SYS_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_tenant_profile_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_pe/two_factor_auth_config_controller_api.py b/tb_rest_client/api/api_pe/two_factor_auth_config_controller_api.py new file mode 100644 index 00000000..7112ca48 --- /dev/null +++ b/tb_rest_client/api/api_pe/two_factor_auth_config_controller_api.py @@ -0,0 +1,876 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class TwoFactorAuthConfigControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_two_fa_account_config_using_delete(self, provider_type, **kwargs): # noqa: E501 + """Delete 2FA account config (deleteTwoFaAccountConfig) # noqa: E501 + + Delete 2FA config for a given 2FA provider type. Returns whole account's 2FA settings object. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_two_fa_account_config_using_delete(provider_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str provider_type: providerType (required) + :return: AccountTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_two_fa_account_config_using_delete_with_http_info(provider_type, **kwargs) # noqa: E501 + else: + (data) = self.delete_two_fa_account_config_using_delete_with_http_info(provider_type, **kwargs) # noqa: E501 + return data + + def delete_two_fa_account_config_using_delete_with_http_info(self, provider_type, **kwargs): # noqa: E501 + """Delete 2FA account config (deleteTwoFaAccountConfig) # noqa: E501 + + Delete 2FA config for a given 2FA provider type. Returns whole account's 2FA settings object. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_two_fa_account_config_using_delete_with_http_info(provider_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str provider_type: providerType (required) + :return: AccountTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['provider_type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_two_fa_account_config_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'provider_type' is set + if ('provider_type' not in params or + params['provider_type'] is None): + raise ValueError("Missing the required parameter `provider_type` when calling `delete_two_fa_account_config_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'provider_type' in params: + query_params.append(('providerType', params['provider_type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/2fa/account/config{?providerType}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccountTwoFaSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def generate_two_fa_account_config_using_post(self, provider_type, **kwargs): # noqa: E501 + """Generate 2FA account config (generateTwoFaAccountConfig) # noqa: E501 + + Generate new 2FA account config template for specified provider type. For TOTP, this will return a corresponding account config template with a generated OTP auth URL (with new random secret key for each API call) that can be then converted to a QR code to scan with an authenticator app. Example: ``` { \"providerType\": \"TOTP\", \"useByDefault\": false, \"authUrl\": \"otpauth://totp/TB%202FA:tenant@thingsboard.org?issuer=TB+2FA&secret=PNJDNWJVAK4ZTUYT7RFGPQLXA7XGU7PX\" } ``` For EMAIL, the generated config will contain email from user's account: ``` { \"providerType\": \"EMAIL\", \"useByDefault\": false, \"email\": \"tenant@thingsboard.org\" } ``` For SMS 2FA this method will just return a config with empty/default values as there is nothing to generate/preset: ``` { \"providerType\": \"SMS\", \"useByDefault\": false, \"phoneNumber\": null } ``` Will throw an error (Bad Request) if the provider is not configured for usage. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_two_fa_account_config_using_post(provider_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str provider_type: 2FA provider type to generate new account config for (required) + :return: TwoFaAccountConfig + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.generate_two_fa_account_config_using_post_with_http_info(provider_type, **kwargs) # noqa: E501 + else: + (data) = self.generate_two_fa_account_config_using_post_with_http_info(provider_type, **kwargs) # noqa: E501 + return data + + def generate_two_fa_account_config_using_post_with_http_info(self, provider_type, **kwargs): # noqa: E501 + """Generate 2FA account config (generateTwoFaAccountConfig) # noqa: E501 + + Generate new 2FA account config template for specified provider type. For TOTP, this will return a corresponding account config template with a generated OTP auth URL (with new random secret key for each API call) that can be then converted to a QR code to scan with an authenticator app. Example: ``` { \"providerType\": \"TOTP\", \"useByDefault\": false, \"authUrl\": \"otpauth://totp/TB%202FA:tenant@thingsboard.org?issuer=TB+2FA&secret=PNJDNWJVAK4ZTUYT7RFGPQLXA7XGU7PX\" } ``` For EMAIL, the generated config will contain email from user's account: ``` { \"providerType\": \"EMAIL\", \"useByDefault\": false, \"email\": \"tenant@thingsboard.org\" } ``` For SMS 2FA this method will just return a config with empty/default values as there is nothing to generate/preset: ``` { \"providerType\": \"SMS\", \"useByDefault\": false, \"phoneNumber\": null } ``` Will throw an error (Bad Request) if the provider is not configured for usage. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_two_fa_account_config_using_post_with_http_info(provider_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str provider_type: 2FA provider type to generate new account config for (required) + :return: TwoFaAccountConfig + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['provider_type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method generate_two_fa_account_config_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'provider_type' is set + if ('provider_type' not in params or + params['provider_type'] is None): + raise ValueError("Missing the required parameter `provider_type` when calling `generate_two_fa_account_config_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'provider_type' in params: + query_params.append(('providerType', params['provider_type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/2fa/account/config/generate{?providerType}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TwoFaAccountConfig', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_account_two_fa_settings_using_get(self, **kwargs): # noqa: E501 + """Get account 2FA settings (getAccountTwoFaSettings) # noqa: E501 + + Get user's account 2FA configuration. Configuration contains configs for different 2FA providers. Example: ``` { \"configs\": { \"EMAIL\": { \"providerType\": \"EMAIL\", \"useByDefault\": true, \"email\": \"tenant@thingsboard.org\" }, \"TOTP\": { \"providerType\": \"TOTP\", \"useByDefault\": false, \"authUrl\": \"otpauth://totp/TB%202FA:tenant@thingsboard.org?issuer=TB+2FA&secret=P6Z2TLYTASOGP6LCJZAD24ETT5DACNNX\" }, \"SMS\": { \"providerType\": \"SMS\", \"useByDefault\": false, \"phoneNumber\": \"+380501253652\" } } } ``` Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_account_two_fa_settings_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: AccountTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_account_two_fa_settings_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_account_two_fa_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_account_two_fa_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get account 2FA settings (getAccountTwoFaSettings) # noqa: E501 + + Get user's account 2FA configuration. Configuration contains configs for different 2FA providers. Example: ``` { \"configs\": { \"EMAIL\": { \"providerType\": \"EMAIL\", \"useByDefault\": true, \"email\": \"tenant@thingsboard.org\" }, \"TOTP\": { \"providerType\": \"TOTP\", \"useByDefault\": false, \"authUrl\": \"otpauth://totp/TB%202FA:tenant@thingsboard.org?issuer=TB+2FA&secret=P6Z2TLYTASOGP6LCJZAD24ETT5DACNNX\" }, \"SMS\": { \"providerType\": \"SMS\", \"useByDefault\": false, \"phoneNumber\": \"+380501253652\" } } } ``` Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_account_two_fa_settings_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: AccountTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_account_two_fa_settings_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/2fa/account/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccountTwoFaSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_available_two_fa_providers_using_get(self, **kwargs): # noqa: E501 + """Get available 2FA providers (getAvailableTwoFaProviders) # noqa: E501 + + Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_available_two_fa_providers_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_available_two_fa_providers_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_available_two_fa_providers_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_available_two_fa_providers_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get available 2FA providers (getAvailableTwoFaProviders) # noqa: E501 + + Get the list of provider types available for user to use (the ones configured by tenant or sysadmin). Example of response: ``` [ \"TOTP\", \"EMAIL\", \"SMS\" ] ``` Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_available_two_fa_providers_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_available_two_fa_providers_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/2fa/providers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_platform_two_fa_settings_using_get(self, **kwargs): # noqa: E501 + """Get platform 2FA settings (getPlatformTwoFaSettings) # noqa: E501 + + Get platform settings for 2FA. The settings are described for savePlatformTwoFaSettings API method. If 2FA is not configured, then an empty response will be returned. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_platform_two_fa_settings_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: PlatformTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_platform_two_fa_settings_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_platform_two_fa_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_platform_two_fa_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get platform 2FA settings (getPlatformTwoFaSettings) # noqa: E501 + + Get platform settings for 2FA. The settings are described for savePlatformTwoFaSettings API method. If 2FA is not configured, then an empty response will be returned. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_platform_two_fa_settings_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: PlatformTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_platform_two_fa_settings_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/2fa/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PlatformTwoFaSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_platform_two_fa_settings_using_post(self, **kwargs): # noqa: E501 + """Save platform 2FA settings (savePlatformTwoFaSettings) # noqa: E501 + + Save 2FA settings for platform. The settings have following properties: - `useSystemTwoFactorAuthSettings` - option for tenant admins to use 2FA settings configured by sysadmin. If this param is set to true, then the settings will not be validated for constraints (if it is a tenant admin; for sysadmin this param is ignored). - `providers` - the list of 2FA providers' configs. Users will only be allowed to use 2FA providers from this list. - `minVerificationCodeSendPeriod` - minimal period in seconds to wait after verification code send request to send next request. - `verificationCodeCheckRateLimit` - rate limit configuration for verification code checking. The format is standard: 'amountOfRequests:periodInSeconds'. The value of '1:60' would limit verification code checking requests to one per minute. - `maxVerificationFailuresBeforeUserLockout` - maximum number of verification failures before a user gets disabled. - `totalAllowedTimeForVerification` - total amount of time in seconds allotted for verification. Basically, this property sets a lifetime for pre-verification token. If not set, default value of 30 minutes is used. TOTP 2FA provider config has following settings: - `issuerName` - issuer name that will be displayed in an authenticator app near a username. Must not be blank. For SMS 2FA provider: - `smsVerificationMessageTemplate` - verification message template. Available template variables are ${code} and ${userEmail}. It must not be blank and must contain verification code variable. - `verificationCodeLifetime` - verification code lifetime in seconds. Required to be positive. For EMAIL provider type: - `verificationCodeLifetime` - the same as for SMS. Example of the settings: ``` { \"useSystemTwoFactorAuthSettings\": false, \"providers\": [ { \"providerType\": \"TOTP\", \"issuerName\": \"TB\" }, { \"providerType\": \"EMAIL\", \"verificationCodeLifetime\": 60 }, { \"providerType\": \"SMS\", \"verificationCodeLifetime\": 60, \"smsVerificationMessageTemplate\": \"Here is your verification code: ${code}\" } ], \"minVerificationCodeSendPeriod\": 60, \"verificationCodeCheckRateLimit\": \"3:900\", \"maxVerificationFailuresBeforeUserLockout\": 10, \"totalAllowedTimeForVerification\": 600 } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_platform_two_fa_settings_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PlatformTwoFaSettings body: + :return: PlatformTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_platform_two_fa_settings_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_platform_two_fa_settings_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_platform_two_fa_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save platform 2FA settings (savePlatformTwoFaSettings) # noqa: E501 + + Save 2FA settings for platform. The settings have following properties: - `useSystemTwoFactorAuthSettings` - option for tenant admins to use 2FA settings configured by sysadmin. If this param is set to true, then the settings will not be validated for constraints (if it is a tenant admin; for sysadmin this param is ignored). - `providers` - the list of 2FA providers' configs. Users will only be allowed to use 2FA providers from this list. - `minVerificationCodeSendPeriod` - minimal period in seconds to wait after verification code send request to send next request. - `verificationCodeCheckRateLimit` - rate limit configuration for verification code checking. The format is standard: 'amountOfRequests:periodInSeconds'. The value of '1:60' would limit verification code checking requests to one per minute. - `maxVerificationFailuresBeforeUserLockout` - maximum number of verification failures before a user gets disabled. - `totalAllowedTimeForVerification` - total amount of time in seconds allotted for verification. Basically, this property sets a lifetime for pre-verification token. If not set, default value of 30 minutes is used. TOTP 2FA provider config has following settings: - `issuerName` - issuer name that will be displayed in an authenticator app near a username. Must not be blank. For SMS 2FA provider: - `smsVerificationMessageTemplate` - verification message template. Available template variables are ${code} and ${userEmail}. It must not be blank and must contain verification code variable. - `verificationCodeLifetime` - verification code lifetime in seconds. Required to be positive. For EMAIL provider type: - `verificationCodeLifetime` - the same as for SMS. Example of the settings: ``` { \"useSystemTwoFactorAuthSettings\": false, \"providers\": [ { \"providerType\": \"TOTP\", \"issuerName\": \"TB\" }, { \"providerType\": \"EMAIL\", \"verificationCodeLifetime\": 60 }, { \"providerType\": \"SMS\", \"verificationCodeLifetime\": 60, \"smsVerificationMessageTemplate\": \"Here is your verification code: ${code}\" } ], \"minVerificationCodeSendPeriod\": 60, \"verificationCodeCheckRateLimit\": \"3:900\", \"maxVerificationFailuresBeforeUserLockout\": 10, \"totalAllowedTimeForVerification\": 600 } ``` Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_platform_two_fa_settings_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PlatformTwoFaSettings body: + :return: PlatformTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_platform_two_fa_settings_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/2fa/settings', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PlatformTwoFaSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def submit_two_fa_account_config_using_post(self, **kwargs): # noqa: E501 + """Submit 2FA account config (submitTwoFaAccountConfig) # noqa: E501 + + Submit 2FA account config to prepare for a future verification. Basically, this method will send a verification code for a given account config, if this has sense for a chosen 2FA provider. This code is needed to then verify and save the account config. Example of EMAIL 2FA account config: ``` { \"providerType\": \"EMAIL\", \"useByDefault\": true, \"email\": \"separate-email-for-2fa@thingsboard.org\" } ``` Example of SMS 2FA account config: ``` { \"providerType\": \"SMS\", \"useByDefault\": false, \"phoneNumber\": \"+38012312321\" } ``` For TOTP this method does nothing. Will throw an error (Bad Request) if submitted account config is not valid, or if the provider is not configured for usage. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_two_fa_account_config_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TwoFaAccountConfig body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.submit_two_fa_account_config_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.submit_two_fa_account_config_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def submit_two_fa_account_config_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Submit 2FA account config (submitTwoFaAccountConfig) # noqa: E501 + + Submit 2FA account config to prepare for a future verification. Basically, this method will send a verification code for a given account config, if this has sense for a chosen 2FA provider. This code is needed to then verify and save the account config. Example of EMAIL 2FA account config: ``` { \"providerType\": \"EMAIL\", \"useByDefault\": true, \"email\": \"separate-email-for-2fa@thingsboard.org\" } ``` Example of SMS 2FA account config: ``` { \"providerType\": \"SMS\", \"useByDefault\": false, \"phoneNumber\": \"+38012312321\" } ``` For TOTP this method does nothing. Will throw an error (Bad Request) if submitted account config is not valid, or if the provider is not configured for usage. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_two_fa_account_config_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TwoFaAccountConfig body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method submit_two_fa_account_config_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/2fa/account/config/submit', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_two_fa_account_config_using_put(self, provider_type, **kwargs): # noqa: E501 + """Update 2FA account config (updateTwoFaAccountConfig) # noqa: E501 + + Update config for a given provider type. Update request example: ``` { \"useByDefault\": true } ``` Returns whole account's 2FA settings object. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_two_fa_account_config_using_put(provider_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str provider_type: providerType (required) + :param TwoFaAccountConfigUpdateRequest body: + :return: AccountTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_two_fa_account_config_using_put_with_http_info(provider_type, **kwargs) # noqa: E501 + else: + (data) = self.update_two_fa_account_config_using_put_with_http_info(provider_type, **kwargs) # noqa: E501 + return data + + def update_two_fa_account_config_using_put_with_http_info(self, provider_type, **kwargs): # noqa: E501 + """Update 2FA account config (updateTwoFaAccountConfig) # noqa: E501 + + Update config for a given provider type. Update request example: ``` { \"useByDefault\": true } ``` Returns whole account's 2FA settings object. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_two_fa_account_config_using_put_with_http_info(provider_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str provider_type: providerType (required) + :param TwoFaAccountConfigUpdateRequest body: + :return: AccountTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['provider_type', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_two_fa_account_config_using_put" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'provider_type' is set + if ('provider_type' not in params or + params['provider_type'] is None): + raise ValueError("Missing the required parameter `provider_type` when calling `update_two_fa_account_config_using_put`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'provider_type' in params: + query_params.append(('providerType', params['provider_type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/2fa/account/config{?providerType}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccountTwoFaSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def verify_and_save_two_fa_account_config_using_post(self, **kwargs): # noqa: E501 + """Verify and save 2FA account config (verifyAndSaveTwoFaAccountConfig) # noqa: E501 + + Checks the verification code for submitted config, and if it is correct, saves the provided account config. Returns whole account's 2FA settings object. Will throw an error (Bad Request) if the provider is not configured for usage. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_and_save_two_fa_account_config_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TwoFaAccountConfig body: + :param str verification_code: verificationCode + :return: AccountTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.verify_and_save_two_fa_account_config_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.verify_and_save_two_fa_account_config_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def verify_and_save_two_fa_account_config_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Verify and save 2FA account config (verifyAndSaveTwoFaAccountConfig) # noqa: E501 + + Checks the verification code for submitted config, and if it is correct, saves the provided account config. Returns whole account's 2FA settings object. Will throw an error (Bad Request) if the provider is not configured for usage. Available for any authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_and_save_two_fa_account_config_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TwoFaAccountConfig body: + :param str verification_code: verificationCode + :return: AccountTwoFaSettings + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'verification_code'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method verify_and_save_two_fa_account_config_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'verification_code' in params: + query_params.append(('verificationCode', params['verification_code'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/2fa/account/config{?verificationCode}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccountTwoFaSettings', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/two_factor_auth_controller_api.py b/tb_rest_client/api/api_pe/two_factor_auth_controller_api.py new file mode 100644 index 00000000..2b88cae8 --- /dev/null +++ b/tb_rest_client/api/api_pe/two_factor_auth_controller_api.py @@ -0,0 +1,318 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class TwoFactorAuthControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def check_two_fa_verification_code_using_post(self, provider_type, verification_code, **kwargs): # noqa: E501 + """Check 2FA verification code (checkTwoFaVerificationCode) # noqa: E501 + + Checks 2FA verification code, and if it is correct the method returns a regular access and refresh token pair. The API method is rate limited (using rate limit config from TwoFactorAuthSettings), and also will block a user after X unsuccessful verification attempts if such behavior is configured (in TwoFactorAuthSettings). Will return a Bad Request error if provider is not configured for usage, and Too Many Requests error if rate limits are exceeded. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.check_two_fa_verification_code_using_post(provider_type, verification_code, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str provider_type: providerType (required) + :param str verification_code: verificationCode (required) + :return: JWTPair + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.check_two_fa_verification_code_using_post_with_http_info(provider_type, verification_code, **kwargs) # noqa: E501 + else: + (data) = self.check_two_fa_verification_code_using_post_with_http_info(provider_type, verification_code, **kwargs) # noqa: E501 + return data + + def check_two_fa_verification_code_using_post_with_http_info(self, provider_type, verification_code, **kwargs): # noqa: E501 + """Check 2FA verification code (checkTwoFaVerificationCode) # noqa: E501 + + Checks 2FA verification code, and if it is correct the method returns a regular access and refresh token pair. The API method is rate limited (using rate limit config from TwoFactorAuthSettings), and also will block a user after X unsuccessful verification attempts if such behavior is configured (in TwoFactorAuthSettings). Will return a Bad Request error if provider is not configured for usage, and Too Many Requests error if rate limits are exceeded. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.check_two_fa_verification_code_using_post_with_http_info(provider_type, verification_code, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str provider_type: providerType (required) + :param str verification_code: verificationCode (required) + :return: JWTPair + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['provider_type', 'verification_code'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method check_two_fa_verification_code_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'provider_type' is set + if ('provider_type' not in params or + params['provider_type'] is None): + raise ValueError("Missing the required parameter `provider_type` when calling `check_two_fa_verification_code_using_post`") # noqa: E501 + # verify the required parameter 'verification_code' is set + if ('verification_code' not in params or + params['verification_code'] is None): + raise ValueError("Missing the required parameter `verification_code` when calling `check_two_fa_verification_code_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'provider_type' in params: + query_params.append(('providerType', params['provider_type'])) # noqa: E501 + if 'verification_code' in params: + query_params.append(('verificationCode', params['verification_code'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/auth/2fa/verification/check{?providerType,verificationCode}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JWTPair', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_available_two_fa_providers_using_get1(self, **kwargs): # noqa: E501 + """Get available 2FA providers (getAvailableTwoFaProviders) # noqa: E501 + + Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_available_two_fa_providers_using_get1(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[TwoFaProviderInfo] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_available_two_fa_providers_using_get1_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_available_two_fa_providers_using_get1_with_http_info(**kwargs) # noqa: E501 + return data + + def get_available_two_fa_providers_using_get1_with_http_info(self, **kwargs): # noqa: E501 + """Get available 2FA providers (getAvailableTwoFaProviders) # noqa: E501 + + Get the list of 2FA provider infos available for user to use. Example: ``` [ { \"type\": \"EMAIL\", \"default\": true, \"contact\": \"ab*****ko@gmail.com\" }, { \"type\": \"TOTP\", \"default\": false, \"contact\": null }, { \"type\": \"SMS\", \"default\": false, \"contact\": \"+38********12\" } ] ``` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_available_two_fa_providers_using_get1_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[TwoFaProviderInfo] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_available_two_fa_providers_using_get1" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/auth/2fa/providers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TwoFaProviderInfo]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def request_two_fa_verification_code_using_post(self, provider_type, **kwargs): # noqa: E501 + """Request 2FA verification code (requestTwoFaVerificationCode) # noqa: E501 + + Request 2FA verification code. To make a request to this endpoint, you need an access token with the scope of PRE_VERIFICATION_TOKEN, which is issued on username/password auth if 2FA is enabled. The API method is rate limited (using rate limit config from TwoFactorAuthSettings). Will return a Bad Request error if provider is not configured for usage, and Too Many Requests error if rate limits are exceeded. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.request_two_fa_verification_code_using_post(provider_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str provider_type: providerType (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.request_two_fa_verification_code_using_post_with_http_info(provider_type, **kwargs) # noqa: E501 + else: + (data) = self.request_two_fa_verification_code_using_post_with_http_info(provider_type, **kwargs) # noqa: E501 + return data + + def request_two_fa_verification_code_using_post_with_http_info(self, provider_type, **kwargs): # noqa: E501 + """Request 2FA verification code (requestTwoFaVerificationCode) # noqa: E501 + + Request 2FA verification code. To make a request to this endpoint, you need an access token with the scope of PRE_VERIFICATION_TOKEN, which is issued on username/password auth if 2FA is enabled. The API method is rate limited (using rate limit config from TwoFactorAuthSettings). Will return a Bad Request error if provider is not configured for usage, and Too Many Requests error if rate limits are exceeded. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.request_two_fa_verification_code_using_post_with_http_info(provider_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str provider_type: providerType (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['provider_type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method request_two_fa_verification_code_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'provider_type' is set + if ('provider_type' not in params or + params['provider_type'] is None): + raise ValueError("Missing the required parameter `provider_type` when calling `request_two_fa_verification_code_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'provider_type' in params: + query_params.append(('providerType', params['provider_type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/auth/2fa/verification/send{?providerType}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/ui_settings_controller_api.py b/tb_rest_client/api/api_pe/ui_settings_controller_api.py index 79691528..9dcf1a22 100644 --- a/tb_rest_client/api/api_pe/ui_settings_controller_api.py +++ b/tb_rest_client/api/api_pe/ui_settings_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/usage_info_controller_api.py b/tb_rest_client/api/api_pe/usage_info_controller_api.py new file mode 100644 index 00000000..45df9369 --- /dev/null +++ b/tb_rest_client/api/api_pe/usage_info_controller_api.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class UsageInfoControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_tenant_usage_info_using_get(self, **kwargs): # noqa: E501 + """getTenantUsageInfo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_usage_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: UsageInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_tenant_usage_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_tenant_usage_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_tenant_usage_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getTenantUsageInfo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_usage_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: UsageInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_usage_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/usage', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UsageInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/user_controller_api.py b/tb_rest_client/api/api_pe/user_controller_api.py index 17c92e97..1bdb60e8 100644 --- a/tb_rest_client/api/api_pe/user_controller_api.py +++ b/tb_rest_client/api/api_pe/user_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,45 +32,47 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def delete_user_using_delete(self, user_id, **kwargs): # noqa: E501 - """Delete User (deleteUser) # noqa: E501 + def delete_user_settings_using_delete(self, paths, type, **kwargs): # noqa: E501 + """Delete user settings (deleteUserSettings) # noqa: E501 - Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). # noqa: E501 + Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_user_using_delete(user_id, async_req=True) + >>> thread = api.delete_user_settings_using_delete(paths, type, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str paths: paths (required) + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_user_using_delete_with_http_info(user_id, **kwargs) # noqa: E501 + return self.delete_user_settings_using_delete_with_http_info(paths, type, **kwargs) # noqa: E501 else: - (data) = self.delete_user_using_delete_with_http_info(user_id, **kwargs) # noqa: E501 + (data) = self.delete_user_settings_using_delete_with_http_info(paths, type, **kwargs) # noqa: E501 return data - def delete_user_using_delete_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Delete User (deleteUser) # noqa: E501 + def delete_user_settings_using_delete_with_http_info(self, paths, type, **kwargs): # noqa: E501 + """Delete user settings (deleteUserSettings) # noqa: E501 - Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). # noqa: E501 + Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_user_using_delete_with_http_info(user_id, async_req=True) + >>> thread = api.delete_user_settings_using_delete_with_http_info(paths, type, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str paths: paths (required) + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['user_id'] # noqa: E501 + all_params = ['paths', 'type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -81,20 +83,26 @@ def delete_user_using_delete_with_http_info(self, user_id, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_user_using_delete" % key + " to method delete_user_settings_using_delete" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in params or - params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_user_using_delete`") # noqa: E501 + # verify the required parameter 'paths' is set + if ('paths' not in params or + params['paths'] is None): + raise ValueError("Missing the required parameter `paths` when calling `delete_user_settings_using_delete`") # noqa: E501 + # verify the required parameter 'type' is set + if ('type' not in params or + params['type'] is None): + raise ValueError("Missing the required parameter `type` when calling `delete_user_settings_using_delete`") # noqa: E501 collection_formats = {} path_params = {} - if 'user_id' in params: - path_params['userId'] = params['user_id'] # noqa: E501 + if 'paths' in params: + path_params['paths'] = params['paths'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 query_params = [] @@ -112,7 +120,7 @@ def delete_user_using_delete_with_http_info(self, user_id, **kwargs): # noqa: E auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/{userId}', 'DELETE', + '/api/user/settings/{type}/{paths}', 'DELETE', path_params, query_params, header_params, @@ -127,40 +135,135 @@ def delete_user_using_delete_with_http_info(self, user_id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_activation_link_using_get(self, user_id, **kwargs): # noqa: E501 - """Get the activation link (getActivationLink) # noqa: E501 + def delete_user_settings_using_delete1(self, paths, **kwargs): # noqa: E501 + """Delete user settings (deleteUserSettings) # noqa: E501 - Get the activation link for the user. The base url for activation link is configurable in the general settings of system administrator. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_activation_link_using_get(user_id, async_req=True) + >>> thread = api.delete_user_settings_using_delete1(paths, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str paths: paths (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_user_settings_using_delete1_with_http_info(paths, **kwargs) # noqa: E501 + else: + (data) = self.delete_user_settings_using_delete1_with_http_info(paths, **kwargs) # noqa: E501 + return data + + def delete_user_settings_using_delete1_with_http_info(self, paths, **kwargs): # noqa: E501 + """Delete user settings (deleteUserSettings) # noqa: E501 + + Delete user settings by specifying list of json element xpaths. Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_settings_using_delete1_with_http_info(paths, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str paths: paths (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['paths'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_user_settings_using_delete1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'paths' is set + if ('paths' not in params or + params['paths'] is None): + raise ValueError("Missing the required parameter `paths` when calling `delete_user_settings_using_delete1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'paths' in params: + path_params['paths'] = params['paths'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/settings/{paths}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_user_using_delete(self, user_id, **kwargs): # noqa: E501 + """Delete User (deleteUser) # noqa: E501 + + Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_using_delete(user_id, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_activation_link_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + return self.delete_user_using_delete_with_http_info(user_id, **kwargs) # noqa: E501 else: - (data) = self.get_activation_link_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + (data) = self.delete_user_using_delete_with_http_info(user_id, **kwargs) # noqa: E501 return data - def get_activation_link_using_get_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Get the activation link (getActivationLink) # noqa: E501 + def delete_user_using_delete_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Delete User (deleteUser) # noqa: E501 - Get the activation link for the user. The base url for activation link is configurable in the general settings of system administrator. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_activation_link_using_get_with_http_info(user_id, async_req=True) + >>> thread = api.delete_user_using_delete_with_http_info(user_id, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: str + :return: None If the method is called asynchronously, returns the request thread. """ @@ -176,14 +279,14 @@ def get_activation_link_using_get_with_http_info(self, user_id, **kwargs): # no if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_activation_link_using_get" % key + " to method delete_user_using_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'user_id' is set if ('user_id' not in params or params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `get_activation_link_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `user_id` when calling `delete_user_using_delete`") # noqa: E501 collection_formats = {} @@ -201,20 +304,20 @@ def get_activation_link_using_get_with_http_info(self, user_id, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/{userId}/activationLink', 'GET', + '/api/user/{userId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -222,48 +325,48 @@ def get_activation_link_using_get_with_http_info(self, user_id, **kwargs): # no _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_all_customer_users_using_get(self, page_size, page, **kwargs): # noqa: E501 - """Get Customer Users (getCustomerUsers) # noqa: E501 + def find_users_by_query_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Find users by query (findUsersByQuery) # noqa: E501 - Returns a page of users for the current tenant with authority 'CUSTOMER_USER'. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns page of user data objects. Search is been executed by email, firstName and lastName fields. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_customer_users_using_get(page_size, page, async_req=True) + >>> thread = api.find_users_by_query_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. + :param str text_search: The case insensitive 'substring' filter based on the user email. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataUser + :return: PageDataUserEmailInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_all_customer_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.find_users_by_query_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_all_customer_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.find_users_by_query_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_all_customer_users_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """Get Customer Users (getCustomerUsers) # noqa: E501 + def find_users_by_query_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Find users by query (findUsersByQuery) # noqa: E501 - Returns a page of users for the current tenant with authority 'CUSTOMER_USER'. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns page of user data objects. Search is been executed by email, firstName and lastName fields. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_customer_users_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.find_users_by_query_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. + :param str text_search: The case insensitive 'substring' filter based on the user email. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataUser + :return: PageDataUserEmailInfo If the method is called asynchronously, returns the request thread. """ @@ -279,18 +382,18 @@ def get_all_customer_users_using_get_with_http_info(self, page_size, page, **kwa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_all_customer_users_using_get" % key + " to method find_users_by_query_using_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError("Missing the required parameter `page_size` when calling `get_all_customer_users_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `find_users_by_query_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError("Missing the required parameter `page` when calling `get_all_customer_users_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `find_users_by_query_using_get`") # noqa: E501 collection_formats = {} @@ -322,14 +425,14 @@ def get_all_customer_users_using_get_with_http_info(self, page_size, page, **kwa auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/customer/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + '/api/users/info{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataUser', # noqa: E501 + response_type='PageDataUserEmailInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -337,55 +440,45 @@ def get_all_customer_users_using_get_with_http_info(self, page_size, page, **kwa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_customer_users_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 - """Get Customer Users (getCustomerUsers) # noqa: E501 + def get_activation_link_using_get(self, user_id, **kwargs): # noqa: E501 + """Get the activation link (getActivationLink) # noqa: E501 - Returns a page of users owned by customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Get the activation link for the user. The base url for activation link is configurable in the general settings of system administrator. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_customer_users_using_get(customer_id, page_size, page, async_req=True) + >>> thread = api.get_activation_link_using_get(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param int page_size: Maximum amount of entities in a one page (required) - :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. - :param str sort_property: Property of entity to sort by - :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataUser + :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: str If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_customer_users_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return self.get_activation_link_using_get_with_http_info(user_id, **kwargs) # noqa: E501 else: - (data) = self.get_customer_users_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + (data) = self.get_activation_link_using_get_with_http_info(user_id, **kwargs) # noqa: E501 return data - def get_customer_users_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 - """Get Customer Users (getCustomerUsers) # noqa: E501 + def get_activation_link_using_get_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Get the activation link (getActivationLink) # noqa: E501 - Returns a page of users owned by customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Get the activation link for the user. The base url for activation link is configurable in the general settings of system administrator. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_customer_users_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> thread = api.get_activation_link_using_get_with_http_info(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param int page_size: Maximum amount of entities in a one page (required) - :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. - :param str sort_property: Property of entity to sort by - :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataUser + :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['customer_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['user_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -396,40 +489,22 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_customer_users_using_get" % key + " to method get_activation_link_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'customer_id' is set - if ('customer_id' not in params or - params['customer_id'] is None): - raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_users_using_get`") # noqa: E501 - # verify the required parameter 'page_size' is set - if ('page_size' not in params or - params['page_size'] is None): - raise ValueError("Missing the required parameter `page_size` when calling `get_customer_users_using_get`") # noqa: E501 - # verify the required parameter 'page' is set - if ('page' not in params or - params['page'] is None): - raise ValueError("Missing the required parameter `page` when calling `get_customer_users_using_get`") # noqa: E501 + # verify the required parameter 'user_id' is set + if ('user_id' not in params or + params['user_id'] is None): + raise ValueError("Missing the required parameter `user_id` when calling `get_activation_link_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'customer_id' in params: - path_params['customerId'] = params['customer_id'] # noqa: E501 + if 'user_id' in params: + path_params['userId'] = params['user_id'] # noqa: E501 query_params = [] - if 'page_size' in params: - query_params.append(('pageSize', params['page_size'])) # noqa: E501 - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'text_search' in params: - query_params.append(('textSearch', params['text_search'])) # noqa: E501 - if 'sort_property' in params: - query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 - if 'sort_order' in params: - query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} @@ -439,20 +514,20 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['text/plain', 'application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/customer/{customerId}/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + '/api/user/{userId}/activationLink', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataUser', # noqa: E501 + response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -460,20 +535,19 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_admins_using_get(self, tenant_id, page_size, page, **kwargs): # noqa: E501 - """Get Tenant Users (getTenantAdmins) # noqa: E501 + def get_all_customer_users_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get Customer Users (getCustomerUsers) # noqa: E501 - Returns a page of users owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns a page of users for the current tenant with authority 'CUSTOMER_USER'. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tenant_admins_using_get(tenant_id, page_size, page, async_req=True) + >>> thread = api.get_all_customer_users_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. + :param str text_search: The case insensitive 'substring' filter based on the user email. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataUser @@ -482,25 +556,24 @@ def get_tenant_admins_using_get(self, tenant_id, page_size, page, **kwargs): # """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_tenant_admins_using_get_with_http_info(tenant_id, page_size, page, **kwargs) # noqa: E501 + return self.get_all_customer_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_admins_using_get_with_http_info(tenant_id, page_size, page, **kwargs) # noqa: E501 + (data) = self.get_all_customer_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, **kwargs): # noqa: E501 - """Get Tenant Users (getTenantAdmins) # noqa: E501 + def get_all_customer_users_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get Customer Users (getCustomerUsers) # noqa: E501 - Returns a page of users owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns a page of users for the current tenant with authority 'CUSTOMER_USER'. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tenant_admins_using_get_with_http_info(tenant_id, page_size, page, async_req=True) + >>> thread = api.get_all_customer_users_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. + :param str text_search: The case insensitive 'substring' filter based on the user email. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataUser @@ -508,7 +581,7 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, returns the request thread. """ - all_params = ['tenant_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -519,28 +592,22 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_tenant_admins_using_get" % key + " to method get_all_customer_users_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'tenant_id' is set - if ('tenant_id' not in params or - params['tenant_id'] is None): - raise ValueError("Missing the required parameter `tenant_id` when calling `get_tenant_admins_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set if ('page_size' not in params or params['page_size'] is None): - raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_admins_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_all_customer_users_using_get`") # noqa: E501 # verify the required parameter 'page' is set if ('page' not in params or params['page'] is None): - raise ValueError("Missing the required parameter `page` when calling `get_tenant_admins_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_all_customer_users_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'tenant_id' in params: - path_params['tenantId'] = params['tenant_id'] # noqa: E501 query_params = [] if 'page_size' in params: @@ -568,14 +635,1393 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenant/{tenantId}/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + '/api/customer/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUser', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_user_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get All User Infos for current user (getAllUserInfos) # noqa: E501 + + Returns a page of user info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_user_infos_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUserInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_all_user_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_all_user_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_all_user_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get All User Infos for current user (getAllUserInfos) # noqa: E501 + + Returns a page of user info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_user_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUserInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'include_customers', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_user_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_all_user_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_all_user_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/userInfos/all{?includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUserInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_customer_user_infos_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer user Infos (getCustomerUserInfos) # noqa: E501 + + Returns a page of user info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_user_infos_using_get(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUserInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_customer_user_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_user_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_customer_user_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer user Infos (getCustomerUserInfos) # noqa: E501 + + Returns a page of user info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_user_infos_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param bool include_customers: Include customer or sub-customer entities + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUserInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['customer_id', 'page_size', 'page', 'include_customers', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer_user_infos_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'customer_id' is set + if ('customer_id' not in params or + params['customer_id'] is None): + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_user_infos_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_user_infos_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_customer_user_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'include_customers' in params: + query_params.append(('includeCustomers', params['include_customers'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/userInfos{?includeCustomers,page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUserInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_customer_users_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Users (getCustomerUsers) # noqa: E501 + + Returns a page of users owned by customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_users_using_get(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_customer_users_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_users_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_customer_users_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """Get Customer Users (getCustomerUsers) # noqa: E501 + + Returns a page of users owned by customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_customer_users_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['customer_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_customer_users_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'customer_id' is set + if ('customer_id' not in params or + params['customer_id'] is None): + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_users_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_users_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_customer_users_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUser', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_tenant_admins_using_get(self, tenant_id, page_size, page, **kwargs): # noqa: E501 + """Get Tenant Users (getTenantAdmins) # noqa: E501 + + Returns a page of users owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_admins_using_get(tenant_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_tenant_admins_using_get_with_http_info(tenant_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_admins_using_get_with_http_info(tenant_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, **kwargs): # noqa: E501 + """Get Tenant Users (getTenantAdmins) # noqa: E501 + + Returns a page of users owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'SYS_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tenant_admins_using_get_with_http_info(tenant_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['tenant_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tenant_admins_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'tenant_id' is set + if ('tenant_id' not in params or + params['tenant_id'] is None): + raise ValueError("Missing the required parameter `tenant_id` when calling `get_tenant_admins_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_admins_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_tenant_admins_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'tenant_id' in params: + path_params['tenantId'] = params['tenant_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenant/{tenantId}/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUser', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_by_id_using_get(self, user_id, **kwargs): # noqa: E501 + """Get User (getUserById) # noqa: E501 + + Fetch the User object based on the provided User Id. If the user has the authority of 'SYS_ADMIN', the server does not perform additional checks. If the user has the authority of 'TENANT_ADMIN', the server checks that the requested user is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the requested user is owned by the same customer. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_by_id_using_get(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: User + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_by_id_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + else: + (data) = self.get_user_by_id_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + return data + + def get_user_by_id_using_get_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Get User (getUserById) # noqa: E501 + + Fetch the User object based on the provided User Id. If the user has the authority of 'SYS_ADMIN', the server does not perform additional checks. If the user has the authority of 'TENANT_ADMIN', the server checks that the requested user is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the requested user is owned by the same customer. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_by_id_using_get_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: User + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'user_id' is set + if ('user_id' not in params or + params['user_id'] is None): + raise ValueError("Missing the required parameter `user_id` when calling `get_user_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in params: + path_params['userId'] = params['user_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/{userId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='User', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_dashboards_info_using_get(self, **kwargs): # noqa: E501 + """Get information about last visited and starred dashboards (getLastVisitedDashboards) # noqa: E501 + + Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_dashboards_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: UserDashboardsInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_dashboards_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_user_dashboards_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_user_dashboards_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get information about last visited and starred dashboards (getLastVisitedDashboards) # noqa: E501 + + Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_dashboards_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: UserDashboardsInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_dashboards_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/dashboards', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserDashboardsInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_info_by_id_using_get(self, user_id, **kwargs): # noqa: E501 + """Get User info (getUserInfoById) # noqa: E501 + + Fetch the User info object based on the provided User Id. If the user has the authority of 'SYS_ADMIN', the server does not perform additional checks. If the user has the authority of 'TENANT_ADMIN', the server checks that the requested user is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the requested user is owned by the same customer. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_info_by_id_using_get(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: UserInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_info_by_id_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + else: + (data) = self.get_user_info_by_id_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + return data + + def get_user_info_by_id_using_get_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Get User info (getUserInfoById) # noqa: E501 + + Fetch the User info object based on the provided User Id. If the user has the authority of 'SYS_ADMIN', the server does not perform additional checks. If the user has the authority of 'TENANT_ADMIN', the server checks that the requested user is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the requested user is owned by the same customer. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_info_by_id_using_get_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: UserInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_info_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'user_id' is set + if ('user_id' not in params or + params['user_id'] is None): + raise ValueError("Missing the required parameter `user_id` when calling `get_user_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in params: + path_params['userId'] = params['user_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/info/{userId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_settings_using_get(self, **kwargs): # noqa: E501 + """Get user settings (getUserSettings) # noqa: E501 + + Fetch the User settings based on authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_settings_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: JsonNode + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_settings_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_user_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_user_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Get user settings (getUserSettings) # noqa: E501 + + Fetch the User settings based on authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_settings_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: JsonNode + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_settings_using_get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/settings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JsonNode', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_settings_using_get1(self, type, **kwargs): # noqa: E501 + """Get user settings (getUserSettings) # noqa: E501 + + Fetch the User settings based on authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_settings_using_get1(type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) + :return: JsonNode + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_settings_using_get1_with_http_info(type, **kwargs) # noqa: E501 + else: + (data) = self.get_user_settings_using_get1_with_http_info(type, **kwargs) # noqa: E501 + return data + + def get_user_settings_using_get1_with_http_info(self, type, **kwargs): # noqa: E501 + """Get user settings (getUserSettings) # noqa: E501 + + Fetch the User settings based on authorized user. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_settings_using_get1_with_http_info(type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) + :return: JsonNode + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_settings_using_get1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'type' is set + if ('type' not in params or + params['type'] is None): + raise ValueError("Missing the required parameter `type` when calling `get_user_settings_using_get1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/settings/{type}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JsonNode', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_token_using_get(self, user_id, **kwargs): # noqa: E501 + """Get User Token (getUserToken) # noqa: E501 + + Returns the token of the User based on the provided User Id. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_token_using_get(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: JWTPair + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_token_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + else: + (data) = self.get_user_token_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + return data + + def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E501 + """Get User Token (getUserToken) # noqa: E501 + + Returns the token of the User based on the provided User Id. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_token_using_get_with_http_info(user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :return: JWTPair + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_token_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'user_id' is set + if ('user_id' not in params or + params['user_id'] is None): + raise ValueError("Missing the required parameter `user_id` when calling `get_user_token_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in params: + path_params['userId'] = params['user_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/{userId}/token', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JWTPair', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_users_using_get(self, page_size, page, **kwargs): # noqa: E501 + """Get Users (getUsers) # noqa: E501 + + Returns a page of user objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_users_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_user_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_user_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_user_users_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """Get Users (getUsers) # noqa: E501 + + Returns a page of user objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_users_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_users_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_user_users_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_user_users_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUser', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_users_by_entity_group_id_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 + """Get users by Entity Group Id (getUsersByEntityGroupId) # noqa: E501 + + Returns a page of user objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_users_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_users_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_users_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_users_by_entity_group_id_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 + """Get users by Entity Group Id (getUsersByEntityGroupId) # noqa: E501 + + Returns a page of user objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_users_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUser + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_group_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_users_by_entity_group_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_group_id' is set + if ('entity_group_id' not in params or + params['entity_group_id'] is None): + raise ValueError("Missing the required parameter `entity_group_id` when calling `get_users_by_entity_group_id_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_users_by_entity_group_id_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_users_by_entity_group_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_group_id' in params: + path_params['entityGroupId'] = params['entity_group_id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroup/{entityGroupId}/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataUser', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_users_by_ids_using_get(self, user_ids, **kwargs): # noqa: E501 + """Get Users By Ids (getUsersByIds) # noqa: E501 + + Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_users_by_ids_using_get(user_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user_ids: A list of user ids, separated by comma ',' (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_users_by_ids_using_get_with_http_info(user_ids, **kwargs) # noqa: E501 + else: + (data) = self.get_users_by_ids_using_get_with_http_info(user_ids, **kwargs) # noqa: E501 + return data + + def get_users_by_ids_using_get_with_http_info(self, user_ids, **kwargs): # noqa: E501 + """Get Users By Ids (getUsersByIds) # noqa: E501 + + Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_users_by_ids_using_get_with_http_info(user_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str user_ids: A list of user ids, separated by comma ',' (required) + :return: list[User] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user_ids'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_users_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'user_ids' is set + if ('user_ids' not in params or + params['user_ids'] is None): + raise ValueError("Missing the required parameter `user_ids` when calling `get_users_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'user_ids' in params: + query_params.append(('userIds', params['user_ids'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/users{?userIds}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataUser', # noqa: E501 + response_type='list[User]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -583,45 +2029,55 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_user_by_id_using_get(self, user_id, **kwargs): # noqa: E501 - """Get User (getUserById) # noqa: E501 + def get_users_for_assign_using_get(self, alarm_id, page_size, page, **kwargs): # noqa: E501 + """Get usersForAssign (getUsersForAssign) # noqa: E501 - Fetch the User object based on the provided User Id. If the user has the authority of 'SYS_ADMIN', the server does not perform additional checks. If the user has the authority of 'TENANT_ADMIN', the server checks that the requested user is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the requested user is owned by the same customer. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns page of user data objects that can be assigned to provided alarmId. Search is been executed by email, firstName and lastName fields. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_by_id_using_get(user_id, async_req=True) + >>> thread = api.get_users_for_assign_using_get(alarm_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: User + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUserEmailInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_user_by_id_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + return self.get_users_for_assign_using_get_with_http_info(alarm_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_user_by_id_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + (data) = self.get_users_for_assign_using_get_with_http_info(alarm_id, page_size, page, **kwargs) # noqa: E501 return data - def get_user_by_id_using_get_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Get User (getUserById) # noqa: E501 + def get_users_for_assign_using_get_with_http_info(self, alarm_id, page_size, page, **kwargs): # noqa: E501 + """Get usersForAssign (getUsersForAssign) # noqa: E501 - Fetch the User object based on the provided User Id. If the user has the authority of 'SYS_ADMIN', the server does not perform additional checks. If the user has the authority of 'TENANT_ADMIN', the server checks that the requested user is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the requested user is owned by the same customer. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Returns page of user data objects that can be assigned to provided alarmId. Search is been executed by email, firstName and lastName fields. You can 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. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_by_id_using_get_with_http_info(user_id, async_req=True) + >>> thread = api.get_users_for_assign_using_get_with_http_info(alarm_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: User + :param str alarm_id: A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param int page_size: Maximum amount of entities in a one page (required) + :param int page: Sequence number of page starting from 0 (required) + :param str text_search: The case insensitive 'substring' filter based on the user email. + :param str sort_property: Property of entity to sort by + :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :return: PageDataUserEmailInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['user_id'] # noqa: E501 + all_params = ['alarm_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -632,22 +2088,40 @@ def get_user_by_id_using_get_with_http_info(self, user_id, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_user_by_id_using_get" % key + " to method get_users_for_assign_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in params or - params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `get_user_by_id_using_get`") # noqa: E501 + # verify the required parameter 'alarm_id' is set + if ('alarm_id' not in params or + params['alarm_id'] is None): + raise ValueError("Missing the required parameter `alarm_id` when calling `get_users_for_assign_using_get`") # noqa: E501 + # verify the required parameter 'page_size' is set + if ('page_size' not in params or + params['page_size'] is None): + raise ValueError("Missing the required parameter `page_size` when calling `get_users_for_assign_using_get`") # noqa: E501 + # verify the required parameter 'page' is set + if ('page' not in params or + params['page'] is None): + raise ValueError("Missing the required parameter `page` when calling `get_users_for_assign_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'user_id' in params: - path_params['userId'] = params['user_id'] # noqa: E501 + if 'alarm_id' in params: + path_params['alarmId'] = params['alarm_id'] # noqa: E501 query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'text_search' in params: + query_params.append(('textSearch', params['text_search'])) # noqa: E501 + if 'sort_property' in params: + query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 + if 'sort_order' in params: + query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} @@ -663,14 +2137,14 @@ def get_user_by_id_using_get_with_http_info(self, user_id, **kwargs): # noqa: E auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/{userId}', 'GET', + '/api/users/assign/{alarmId}{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='User', # noqa: E501 + response_type='PageDataUserEmailInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -678,45 +2152,43 @@ def get_user_by_id_using_get_with_http_info(self, user_id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_user_token_using_get(self, user_id, **kwargs): # noqa: E501 - """Get User Token (getUserToken) # noqa: E501 + def is_user_token_access_enabled_using_get(self, **kwargs): # noqa: E501 + """Check Token Access Enabled (isUserTokenAccessEnabled) # noqa: E501 - Returns the token of the User based on the provided User Id. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant. # noqa: E501 + Checks that the system is configured to allow administrators to impersonate themself as other users. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to login as any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to login as any customer user. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_token_using_get(user_id, async_req=True) + >>> thread = api.is_user_token_access_enabled_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: JWTTokenPair + :return: bool If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_user_token_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + return self.is_user_token_access_enabled_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_user_token_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + (data) = self.is_user_token_access_enabled_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Get User Token (getUserToken) # noqa: E501 + def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # noqa: E501 + """Check Token Access Enabled (isUserTokenAccessEnabled) # noqa: E501 - Returns the token of the User based on the provided User Id. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant. # noqa: E501 + Checks that the system is configured to allow administrators to impersonate themself as other users. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to login as any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to login as any customer user. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_token_using_get_with_http_info(user_id, async_req=True) + >>> thread = api.is_user_token_access_enabled_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :return: JWTTokenPair + :return: bool If the method is called asynchronously, returns the request thread. """ - all_params = ['user_id'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -727,20 +2199,14 @@ def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_user_token_using_get" % key + " to method is_user_token_access_enabled_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in params or - params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `get_user_token_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'user_id' in params: - path_params['userId'] = params['user_id'] # noqa: E501 query_params = [] @@ -758,14 +2224,14 @@ def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/{userId}/token', 'GET', + '/api/user/tokenAccessEnabled', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='JWTPair', # noqa: E501 + response_type='bool', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -773,53 +2239,45 @@ def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_user_users_using_get(self, page_size, page, **kwargs): # noqa: E501 - """Get Users (getUsers) # noqa: E501 + def put_user_settings_using_put(self, **kwargs): # noqa: E501 + """Update user settings (saveUserSettings) # noqa: E501 - Returns a page of user objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_users_using_get(page_size, page, async_req=True) + >>> thread = api.put_user_settings_using_put(async_req=True) >>> result = thread.get() :param async_req bool - :param int page_size: Maximum amount of entities in a one page (required) - :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. - :param str sort_property: Property of entity to sort by - :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataUser + :param JsonNode body: + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_user_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.put_user_settings_using_put_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_user_users_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.put_user_settings_using_put_with_http_info(**kwargs) # noqa: E501 return data - def get_user_users_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """Get Users (getUsers) # noqa: E501 + def put_user_settings_using_put_with_http_info(self, **kwargs): # noqa: E501 + """Update user settings (saveUserSettings) # noqa: E501 - Returns a page of user objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_user_users_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.put_user_settings_using_put_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param int page_size: Maximum amount of entities in a one page (required) - :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. - :param str sort_property: Property of entity to sort by - :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataUser + :param JsonNode body: + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -830,34 +2288,16 @@ def get_user_users_using_get_with_http_info(self, page_size, page, **kwargs): # if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_user_users_using_get" % key + " to method put_user_settings_using_put" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'page_size' is set - if ('page_size' not in params or - params['page_size'] is None): - raise ValueError("Missing the required parameter `page_size` when calling `get_user_users_using_get`") # noqa: E501 - # verify the required parameter 'page' is set - if ('page' not in params or - params['page'] is None): - raise ValueError("Missing the required parameter `page` when calling `get_user_users_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'page_size' in params: - query_params.append(('pageSize', params['page_size'])) # noqa: E501 - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'text_search' in params: - query_params.append(('textSearch', params['text_search'])) # noqa: E501 - if 'sort_property' in params: - query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 - if 'sort_order' in params: - query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} @@ -865,22 +2305,24 @@ def get_user_users_using_get_with_http_info(self, page_size, page, **kwargs): # local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( + if 'body' in params: + body_params = params['body'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + '/api/user/settings', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataUser', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -888,55 +2330,47 @@ def get_user_users_using_get_with_http_info(self, page_size, page, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_users_by_entity_group_id_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 - """Get users by Entity Group Id (getUsersByEntityGroupId) # noqa: E501 + def put_user_settings_using_put1(self, type, **kwargs): # noqa: E501 + """Update user settings (saveUserSettings) # noqa: E501 - Returns a page of user objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) + >>> thread = api.put_user_settings_using_put1(type, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param int page_size: Maximum amount of entities in a one page (required) - :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. - :param str sort_property: Property of entity to sort by - :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataUser + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) + :param JsonNode body: + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_users_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + return self.put_user_settings_using_put1_with_http_info(type, **kwargs) # noqa: E501 else: - (data) = self.get_users_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + (data) = self.put_user_settings_using_put1_with_http_info(type, **kwargs) # noqa: E501 return data - def get_users_by_entity_group_id_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 - """Get users by Entity Group Id (getUsersByEntityGroupId) # noqa: E501 + def put_user_settings_using_put1_with_http_info(self, type, **kwargs): # noqa: E501 + """Update user settings (saveUserSettings) # noqa: E501 - Returns a page of user objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Security check is performed to verify that the user has 'READ' permission for specified group. # noqa: E501 + Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30} # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) + >>> thread = api.put_user_settings_using_put1_with_http_info(type, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_group_id: A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :param int page_size: Maximum amount of entities in a one page (required) - :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the user email. - :param str sort_property: Property of entity to sort by - :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) - :return: PageDataUser + :param str type: Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\". (required) + :param JsonNode body: + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_group_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['type', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -947,40 +2381,22 @@ def get_users_by_entity_group_id_using_get_with_http_info(self, entity_group_id, if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_users_by_entity_group_id_using_get" % key + " to method put_user_settings_using_put1" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'entity_group_id' is set - if ('entity_group_id' not in params or - params['entity_group_id'] is None): - raise ValueError("Missing the required parameter `entity_group_id` when calling `get_users_by_entity_group_id_using_get`") # noqa: E501 - # verify the required parameter 'page_size' is set - if ('page_size' not in params or - params['page_size'] is None): - raise ValueError("Missing the required parameter `page_size` when calling `get_users_by_entity_group_id_using_get`") # noqa: E501 - # verify the required parameter 'page' is set - if ('page' not in params or - params['page'] is None): - raise ValueError("Missing the required parameter `page` when calling `get_users_by_entity_group_id_using_get`") # noqa: E501 + # verify the required parameter 'type' is set + if ('type' not in params or + params['type'] is None): + raise ValueError("Missing the required parameter `type` when calling `put_user_settings_using_put1`") # noqa: E501 collection_formats = {} path_params = {} - if 'entity_group_id' in params: - path_params['entityGroupId'] = params['entity_group_id'] # noqa: E501 + if 'type' in params: + path_params['type'] = params['type'] # noqa: E501 query_params = [] - if 'page_size' in params: - query_params.append(('pageSize', params['page_size'])) # noqa: E501 - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'text_search' in params: - query_params.append(('textSearch', params['text_search'])) # noqa: E501 - if 'sort_property' in params: - query_params.append(('sortProperty', params['sort_property'])) # noqa: E501 - if 'sort_order' in params: - query_params.append(('sortOrder', params['sort_order'])) # noqa: E501 header_params = {} @@ -988,22 +2404,24 @@ def get_users_by_entity_group_id_using_get_with_http_info(self, entity_group_id, local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( + if 'body' in params: + body_params = params['body'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entityGroup/{entityGroupId}/users{?page,pageSize,sortOrder,sortProperty,textSearch}', 'GET', + '/api/user/settings/{type}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataUser', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1011,45 +2429,47 @@ def get_users_by_entity_group_id_using_get_with_http_info(self, entity_group_id, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_users_by_ids_using_get(self, user_ids, **kwargs): # noqa: E501 - """Get Users By Ids (getUsersByIds) # noqa: E501 + def report_user_dashboard_action_using_get(self, dashboard_id, action, **kwargs): # noqa: E501 + """Report action of User over the dashboard (reportUserDashboardAction) # noqa: E501 - Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Report action of User over the dashboard. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_by_ids_using_get(user_ids, async_req=True) + >>> thread = api.report_user_dashboard_action_using_get(dashboard_id, action, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_ids: A list of user ids, separated by comma ',' (required) - :return: list[User] + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str action: Dashboard action, one of: \"visit\", \"star\" or \"unstar\". (required) + :return: UserDashboardsInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_users_by_ids_using_get_with_http_info(user_ids, **kwargs) # noqa: E501 + return self.report_user_dashboard_action_using_get_with_http_info(dashboard_id, action, **kwargs) # noqa: E501 else: - (data) = self.get_users_by_ids_using_get_with_http_info(user_ids, **kwargs) # noqa: E501 + (data) = self.report_user_dashboard_action_using_get_with_http_info(dashboard_id, action, **kwargs) # noqa: E501 return data - def get_users_by_ids_using_get_with_http_info(self, user_ids, **kwargs): # noqa: E501 - """Get Users By Ids (getUsersByIds) # noqa: E501 + def report_user_dashboard_action_using_get_with_http_info(self, dashboard_id, action, **kwargs): # noqa: E501 + """Report action of User over the dashboard (reportUserDashboardAction) # noqa: E501 - Requested users must be owned by tenant or assigned to customer which user is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Report action of User over the dashboard. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_by_ids_using_get_with_http_info(user_ids, async_req=True) + >>> thread = api.report_user_dashboard_action_using_get_with_http_info(dashboard_id, action, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_ids: A list of user ids, separated by comma ',' (required) - :return: list[User] + :param str dashboard_id: A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :param str action: Dashboard action, one of: \"visit\", \"star\" or \"unstar\". (required) + :return: UserDashboardsInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['user_ids'] # noqa: E501 + all_params = ['dashboard_id', 'action'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1060,22 +2480,28 @@ def get_users_by_ids_using_get_with_http_info(self, user_ids, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_users_by_ids_using_get" % key + " to method report_user_dashboard_action_using_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'user_ids' is set - if ('user_ids' not in params or - params['user_ids'] is None): - raise ValueError("Missing the required parameter `user_ids` when calling `get_users_by_ids_using_get`") # noqa: E501 + # verify the required parameter 'dashboard_id' is set + if ('dashboard_id' not in params or + params['dashboard_id'] is None): + raise ValueError("Missing the required parameter `dashboard_id` when calling `report_user_dashboard_action_using_get`") # noqa: E501 + # verify the required parameter 'action' is set + if ('action' not in params or + params['action'] is None): + raise ValueError("Missing the required parameter `action` when calling `report_user_dashboard_action_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'dashboard_id' in params: + path_params['dashboardId'] = params['dashboard_id'] # noqa: E501 + if 'action' in params: + path_params['action'] = params['action'] # noqa: E501 query_params = [] - if 'user_ids' in params: - query_params.append(('userIds', params['user_ids'])) # noqa: E501 header_params = {} @@ -1091,14 +2517,14 @@ def get_users_by_ids_using_get_with_http_info(self, user_ids, **kwargs): # noqa auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/users{?userIds}', 'GET', + '/api/user/dashboards/{dashboardId}/{action}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[User]', # noqa: E501 + response_type='UserDashboardsInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1106,43 +2532,45 @@ def get_users_by_ids_using_get_with_http_info(self, user_ids, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def is_user_token_access_enabled_using_get(self, **kwargs): # noqa: E501 - """Check Token Access Enabled (isUserTokenAccessEnabled) # noqa: E501 + def save_user_settings_using_post(self, **kwargs): # noqa: E501 + """Save user settings (saveUserSettings) # noqa: E501 - Checks that the system is configured to allow administrators to impersonate themself as other users. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to login as any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to login as any customer user. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Save user settings represented in json format for authorized user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.is_user_token_access_enabled_using_get(async_req=True) + >>> thread = api.save_user_settings_using_post(async_req=True) >>> result = thread.get() :param async_req bool - :return: bool + :param JsonNode body: + :return: JsonNode If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.is_user_token_access_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + return self.save_user_settings_using_post_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.is_user_token_access_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.save_user_settings_using_post_with_http_info(**kwargs) # noqa: E501 return data - def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # noqa: E501 - """Check Token Access Enabled (isUserTokenAccessEnabled) # noqa: E501 + def save_user_settings_using_post_with_http_info(self, **kwargs): # noqa: E501 + """Save user settings (saveUserSettings) # noqa: E501 - Checks that the system is configured to allow administrators to impersonate themself as other users. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to login as any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to login as any customer user. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + Save user settings represented in json format for authorized user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.is_user_token_access_enabled_using_get_with_http_info(async_req=True) + >>> thread = api.save_user_settings_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: bool + :param JsonNode body: + :return: JsonNode If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1153,7 +2581,7 @@ def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # no if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method is_user_token_access_enabled_using_get" % key + " to method save_user_settings_using_post" % key ) params[key] = val del params['kwargs'] @@ -1170,22 +2598,28 @@ def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # no local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/tokenAccessEnabled', 'GET', + '/api/user/settings', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='bool', # noqa: E501 + response_type='JsonNode', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1196,7 +2630,7 @@ def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # no def save_user_using_post(self, **kwargs): # noqa: E501 """Save Or update User (saveUser) # noqa: E501 - Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created User Id will be present in the response. Specify existing User Id to update the device. Referencing non-existing User Id will cause 'Not Found' error. Device email is unique for entire platform setup. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created User Id will be present in the response. Specify existing User Id to update the device. Referencing non-existing User Id will cause 'Not Found' error. Device email is unique for entire platform setup. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new User entity. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_user_using_post(async_req=True) @@ -1206,6 +2640,7 @@ def save_user_using_post(self, **kwargs): # noqa: E501 :param User body: :param bool send_activation_mail: Send activation email (or use activation link) :param str entity_group_id: entityGroupId + :param str entity_group_ids: entityGroupIds :return: User If the method is called asynchronously, returns the request thread. @@ -1220,7 +2655,7 @@ def save_user_using_post(self, **kwargs): # noqa: E501 def save_user_using_post_with_http_info(self, **kwargs): # noqa: E501 """Save Or update User (saveUser) # noqa: E501 - Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created User Id will be present in the response. Specify existing User Id to update the device. Referencing non-existing User Id will cause 'Not Found' error. Device email is unique for entire platform setup. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created User Id will be present in the response. Specify existing User Id to update the device. Referencing non-existing User Id will cause 'Not Found' error. Device email is unique for entire platform setup. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new User entity. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_user_using_post_with_http_info(async_req=True) @@ -1230,12 +2665,13 @@ def save_user_using_post_with_http_info(self, **kwargs): # noqa: E501 :param User body: :param bool send_activation_mail: Send activation email (or use activation link) :param str entity_group_id: entityGroupId + :param str entity_group_ids: entityGroupIds :return: User If the method is called asynchronously, returns the request thread. """ - all_params = ['body', 'send_activation_mail', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'send_activation_mail', 'entity_group_id', 'entity_group_ids'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1260,6 +2696,8 @@ def save_user_using_post_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('sendActivationMail', params['send_activation_mail'])) # noqa: E501 if 'entity_group_id' in params: query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 + if 'entity_group_ids' in params: + query_params.append(('entityGroupIds', params['entity_group_ids'])) # noqa: E501 header_params = {} @@ -1281,7 +2719,7 @@ def save_user_using_post_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user{?entityGroupId,sendActivationMail}', 'POST', + '/api/user{?entityGroupId,entityGroupIds,sendActivationMail}', 'POST', path_params, query_params, header_params, @@ -1394,7 +2832,7 @@ def send_activation_email_using_post_with_http_info(self, email, **kwargs): # n def set_user_credentials_enabled_using_post(self, user_id, **kwargs): # noqa: E501 """Enable/Disable User credentials (setUserCredentialsEnabled) # noqa: E501 - Enables or Disables user credentials. Useful when you would like to block user account without deleting it. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Enables or Disables user credentials. Useful when you would like to block user account without deleting it. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_user_credentials_enabled_using_post(user_id, async_req=True) @@ -1417,7 +2855,7 @@ def set_user_credentials_enabled_using_post(self, user_id, **kwargs): # noqa: E def set_user_credentials_enabled_using_post_with_http_info(self, user_id, **kwargs): # noqa: E501 """Enable/Disable User credentials (setUserCredentialsEnabled) # noqa: E501 - Enables or Disables user credentials. Useful when you would like to block user account without deleting it. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 + Enables or Disables user credentials. Useful when you would like to block user account without deleting it. You can 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. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_user_credentials_enabled_using_post_with_http_info(user_id, async_req=True) diff --git a/tb_rest_client/api/api_pe/user_permissions_controller_api.py b/tb_rest_client/api/api_pe/user_permissions_controller_api.py index aed29be1..7af2029f 100644 --- a/tb_rest_client/api/api_pe/user_permissions_controller_api.py +++ b/tb_rest_client/api/api_pe/user_permissions_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/api/api_pe/white_labeling_controller_api.py b/tb_rest_client/api/api_pe/white_labeling_controller_api.py index fcda70ed..02a27722 100644 --- a/tb_rest_client/api/api_pe/white_labeling_controller_api.py +++ b/tb_rest_client/api/api_pe/white_labeling_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,101 +32,6 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def get_app_theme_css_using_post(self, **kwargs): # noqa: E501 - """Get Application Theme CSS # noqa: E501 - - Generates the application theme CSS based on the provided Palette Settings # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_app_theme_css_using_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PaletteSettings body: - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_app_theme_css_using_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_app_theme_css_using_post_with_http_info(**kwargs) # noqa: E501 - return data - - def get_app_theme_css_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Get Application Theme CSS # noqa: E501 - - Generates the application theme CSS based on the provided Palette Settings # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_app_theme_css_using_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PaletteSettings body: - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_app_theme_css_using_post" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['text/plain', 'application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/whiteLabel/appThemeCss', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def get_current_login_white_label_params_using_get(self, **kwargs): # noqa: E501 """Get Login White Labeling configuration (getCurrentWhiteLabelParams) # noqa: E501 @@ -301,140 +206,41 @@ def get_current_white_label_params_using_get_with_http_info(self, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_login_theme_css_using_post(self, **kwargs): # noqa: E501 - """Get Login Theme CSS # noqa: E501 - - Generates the login theme CSS based on the provided Palette Settings # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_login_theme_css_using_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PaletteSettings body: - :param bool dark_foreground: Dark foreground enabled flag - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_login_theme_css_using_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_login_theme_css_using_post_with_http_info(**kwargs) # noqa: E501 - return data - - def get_login_theme_css_using_post_with_http_info(self, **kwargs): # noqa: E501 - """Get Login Theme CSS # noqa: E501 - - Generates the login theme CSS based on the provided Palette Settings # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_login_theme_css_using_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PaletteSettings body: - :param bool dark_foreground: Dark foreground enabled flag - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'dark_foreground'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_login_theme_css_using_post" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'dark_foreground' in params: - query_params.append(('darkForeground', params['dark_foreground'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['text/plain', 'application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/noauth/whiteLabel/loginThemeCss{?darkForeground}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_login_white_label_params_using_get(self, logo_image_checksum, favicon_checksum, **kwargs): # noqa: E501 + def get_login_white_label_params_using_get(self, **kwargs): # noqa: E501 """Get Login White Labeling parameters # noqa: E501 Returns login white-labeling parameters based on the hostname from request. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_login_white_label_params_using_get(logo_image_checksum, favicon_checksum, async_req=True) + >>> thread = api.get_login_white_label_params_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param str logo_image_checksum: Logo image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'logoImageUrl' will be null. (required) - :param str favicon_checksum: Favicon image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'faviconImageUrl' will be null. (required) + :param str logo_image_checksum: Logo image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'logoImageUrl' will be null. + :param str favicon_checksum: Favicon image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'faviconImageUrl' will be null. :return: LoginWhiteLabelingParams If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_login_white_label_params_using_get_with_http_info(logo_image_checksum, favicon_checksum, **kwargs) # noqa: E501 + return self.get_login_white_label_params_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_login_white_label_params_using_get_with_http_info(logo_image_checksum, favicon_checksum, **kwargs) # noqa: E501 + (data) = self.get_login_white_label_params_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_login_white_label_params_using_get_with_http_info(self, logo_image_checksum, favicon_checksum, **kwargs): # noqa: E501 + def get_login_white_label_params_using_get_with_http_info(self, **kwargs): # noqa: E501 """Get Login White Labeling parameters # noqa: E501 Returns login white-labeling parameters based on the hostname from request. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_login_white_label_params_using_get_with_http_info(logo_image_checksum, favicon_checksum, async_req=True) + >>> thread = api.get_login_white_label_params_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str logo_image_checksum: Logo image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'logoImageUrl' will be null. (required) - :param str favicon_checksum: Favicon image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'faviconImageUrl' will be null. (required) + :param str logo_image_checksum: Logo image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'logoImageUrl' will be null. + :param str favicon_checksum: Favicon image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'faviconImageUrl' will be null. :return: LoginWhiteLabelingParams If the method is called asynchronously, returns the request thread. @@ -455,14 +261,6 @@ def get_login_white_label_params_using_get_with_http_info(self, logo_image_check ) params[key] = val del params['kwargs'] - # verify the required parameter 'logo_image_checksum' is set - if ('logo_image_checksum' not in params or - params['logo_image_checksum'] is None): - raise ValueError("Missing the required parameter `logo_image_checksum` when calling `get_login_white_label_params_using_get`") # noqa: E501 - # verify the required parameter 'favicon_checksum' is set - if ('favicon_checksum' not in params or - params['favicon_checksum'] is None): - raise ValueError("Missing the required parameter `favicon_checksum` when calling `get_login_white_label_params_using_get`") # noqa: E501 collection_formats = {} @@ -503,41 +301,41 @@ def get_login_white_label_params_using_get_with_http_info(self, logo_image_check _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_white_label_params_using_get(self, logo_image_checksum, favicon_checksum, **kwargs): # noqa: E501 + def get_white_label_params_using_get(self, **kwargs): # noqa: E501 """Get White Labeling parameters # noqa: E501 Returns white-labeling parameters for the current user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_white_label_params_using_get(logo_image_checksum, favicon_checksum, async_req=True) + >>> thread = api.get_white_label_params_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param str logo_image_checksum: Logo image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'logoImageUrl' will be null. (required) - :param str favicon_checksum: Favicon image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'faviconImageUrl' will be null. (required) + :param str logo_image_checksum: Logo image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'logoImageUrl' will be null. + :param str favicon_checksum: Favicon image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'faviconImageUrl' will be null. :return: WhiteLabelingParams If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_white_label_params_using_get_with_http_info(logo_image_checksum, favicon_checksum, **kwargs) # noqa: E501 + return self.get_white_label_params_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_white_label_params_using_get_with_http_info(logo_image_checksum, favicon_checksum, **kwargs) # noqa: E501 + (data) = self.get_white_label_params_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_white_label_params_using_get_with_http_info(self, logo_image_checksum, favicon_checksum, **kwargs): # noqa: E501 + def get_white_label_params_using_get_with_http_info(self, **kwargs): # noqa: E501 """Get White Labeling parameters # noqa: E501 Returns white-labeling parameters for the current user. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_white_label_params_using_get_with_http_info(logo_image_checksum, favicon_checksum, async_req=True) + >>> thread = api.get_white_label_params_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str logo_image_checksum: Logo image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'logoImageUrl' will be null. (required) - :param str favicon_checksum: Favicon image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'faviconImageUrl' will be null. (required) + :param str logo_image_checksum: Logo image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'logoImageUrl' will be null. + :param str favicon_checksum: Favicon image checksum. Expects value from the browser cache to compare it with the value from settings. If value matches, the 'faviconImageUrl' will be null. :return: WhiteLabelingParams If the method is called asynchronously, returns the request thread. @@ -558,14 +356,6 @@ def get_white_label_params_using_get_with_http_info(self, logo_image_checksum, f ) params[key] = val del params['kwargs'] - # verify the required parameter 'logo_image_checksum' is set - if ('logo_image_checksum' not in params or - params['logo_image_checksum'] is None): - raise ValueError("Missing the required parameter `logo_image_checksum` when calling `get_white_label_params_using_get`") # noqa: E501 - # verify the required parameter 'favicon_checksum' is set - if ('favicon_checksum' not in params or - params['favicon_checksum'] is None): - raise ValueError("Missing the required parameter `favicon_checksum` when calling `get_white_label_params_using_get`") # noqa: E501 collection_formats = {} @@ -1064,88 +854,3 @@ def save_white_label_params_using_post_with_http_info(self, **kwargs): # noqa: _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def tenant_white_labeling_allowed_using_get(self, **kwargs): # noqa: E501 - """tenantWhiteLabelingAllowed # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.tenant_white_labeling_allowed_using_get(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.tenant_white_labeling_allowed_using_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.tenant_white_labeling_allowed_using_get_with_http_info(**kwargs) # noqa: E501 - return data - - def tenant_white_labeling_allowed_using_get_with_http_info(self, **kwargs): # noqa: E501 - """tenantWhiteLabelingAllowed # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.tenant_white_labeling_allowed_using_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method tenant_white_labeling_allowed_using_get" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['X-Authorization'] # noqa: E501 - - return self.api_client.call_api( - '/api/tenant/whiteLabelingAllowed', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/tb_rest_client/api/api_pe/widget_type_controller_api.py b/tb_rest_client/api/api_pe/widget_type_controller_api.py index 7295f41c..b5c1751e 100644 --- a/tb_rest_client/api/api_pe/widget_type_controller_api.py +++ b/tb_rest_client/api/api_pe/widget_type_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -645,7 +645,7 @@ def get_widget_type_using_get_with_http_info(self, is_system, bundle_alias, alia def save_widget_type_using_post(self, **kwargs): # noqa: E501 """Create Or Update Widget Type (saveWidgetType) # noqa: E501 - Create or update the Widget Type. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Type Id will be present in the response. Specify existing Widget Type id to update the Widget Type. Referencing non-existing Widget Type Id will cause 'Not Found' error. Widget Type alias is unique in the scope of Widget Bundle. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Widget Type. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Type Id will be present in the response. Specify existing Widget Type id to update the Widget Type. Referencing non-existing Widget Type Id will cause 'Not Found' error. Widget Type alias is unique in the scope of Widget Bundle. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' rom the request body example (below) to create new Widget Type entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_widget_type_using_post(async_req=True) @@ -667,7 +667,7 @@ def save_widget_type_using_post(self, **kwargs): # noqa: E501 def save_widget_type_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Widget Type (saveWidgetType) # noqa: E501 - Create or update the Widget Type. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Type Id will be present in the response. Specify existing Widget Type id to update the Widget Type. Referencing non-existing Widget Type Id will cause 'Not Found' error. Widget Type alias is unique in the scope of Widget Bundle. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Widget Type. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Type Id will be present in the response. Specify existing Widget Type id to update the Widget Type. Referencing non-existing Widget Type Id will cause 'Not Found' error. Widget Type alias is unique in the scope of Widget Bundle. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' rom the request body example (below) to create new Widget Type entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_widget_type_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/api/api_pe/widgets_bundle_controller_api.py b/tb_rest_client/api/api_pe/widgets_bundle_controller_api.py index 790ab49f..eff96997 100644 --- a/tb_rest_client/api/api_pe/widgets_bundle_controller_api.py +++ b/tb_rest_client/api/api_pe/widgets_bundle_controller_api.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3PAAS-RC1 + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -222,6 +222,101 @@ def get_widgets_bundle_by_id_using_get_with_http_info(self, widgets_bundle_id, * _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_widgets_bundles_by_ids_using_get(self, widgets_bundle_ids, **kwargs): # noqa: E501 + """Get Widgets Bundles By Ids (getWidgetsBundlesByIds) # noqa: E501 + + Requested widgets bundles must be system level or owned by tenant of the user which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_widgets_bundles_by_ids_using_get(widgets_bundle_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str widgets_bundle_ids: A list of widgets bundle ids, separated by comma ',' (required) + :return: list[WidgetsBundle] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_widgets_bundles_by_ids_using_get_with_http_info(widgets_bundle_ids, **kwargs) # noqa: E501 + else: + (data) = self.get_widgets_bundles_by_ids_using_get_with_http_info(widgets_bundle_ids, **kwargs) # noqa: E501 + return data + + def get_widgets_bundles_by_ids_using_get_with_http_info(self, widgets_bundle_ids, **kwargs): # noqa: E501 + """Get Widgets Bundles By Ids (getWidgetsBundlesByIds) # noqa: E501 + + Requested widgets bundles must be system level or owned by tenant of the user which is performing the request. Security check is performed to verify that the user has 'READ' permission for the entity (entities). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_widgets_bundles_by_ids_using_get_with_http_info(widgets_bundle_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str widgets_bundle_ids: A list of widgets bundle ids, separated by comma ',' (required) + :return: list[WidgetsBundle] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['widgets_bundle_ids'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_widgets_bundles_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'widgets_bundle_ids' is set + if ('widgets_bundle_ids' not in params or + params['widgets_bundle_ids'] is None): + raise ValueError("Missing the required parameter `widgets_bundle_ids` when calling `get_widgets_bundles_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'widgets_bundle_ids' in params: + query_params.append(('widgetsBundleIds', params['widgets_bundle_ids'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/widgetsBundles{?widgetsBundleIds}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[WidgetsBundle]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def get_widgets_bundles_using_get(self, **kwargs): # noqa: E501 """Get all Widget Bundles (getWidgetsBundles) # noqa: E501 @@ -321,7 +416,7 @@ def get_widgets_bundles_using_get1(self, page_size, page, **kwargs): # noqa: E5 :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the widget bundle title. + :param str text_search: The case insensitive 'substring' filter based on the widget bundle title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataWidgetsBundle @@ -347,7 +442,7 @@ def get_widgets_bundles_using_get1_with_http_info(self, page_size, page, **kwarg :param async_req bool :param int page_size: Maximum amount of entities in a one page (required) :param int page: Sequence number of page starting from 0 (required) - :param str text_search: The case insensitive 'startsWith' filter based on the widget bundle title. + :param str text_search: The case insensitive 'substring' filter based on the widget bundle title. :param str sort_property: Property of entity to sort by :param str sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) :return: PageDataWidgetsBundle @@ -427,7 +522,7 @@ def get_widgets_bundles_using_get1_with_http_info(self, page_size, page, **kwarg def save_widgets_bundle_using_post(self, **kwargs): # noqa: E501 """Create Or Update Widget Bundle (saveWidgetsBundle) # noqa: E501 - Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error. Widget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error. Widget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_widgets_bundle_using_post(async_req=True) @@ -449,7 +544,7 @@ def save_widgets_bundle_using_post(self, **kwargs): # noqa: E501 def save_widgets_bundle_using_post_with_http_info(self, **kwargs): # noqa: E501 """Create Or Update Widget Bundle (saveWidgetsBundle) # noqa: E501 - Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error. Widget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 + Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error. Widget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.save_widgets_bundle_using_post_with_http_info(async_req=True) diff --git a/tb_rest_client/models/models_ce/__init__.py b/tb_rest_client/models/models_ce/__init__.py index f8be6c62..78c86191 100644 --- a/tb_rest_client/models/models_ce/__init__.py +++ b/tb_rest_client/models/models_ce/__init__.py @@ -2,7 +2,6 @@ from .json_node import JsonNode from .page_data_edge import PageDataEdge from .tenant_info import TenantInfo -from .debug_rule_node_event_filter import DebugRuleNodeEventFilter from .admin_settings_id import AdminSettingsId from .entity_data import EntityData from .page_data_device import PageDataDevice @@ -260,8 +259,6 @@ from .server_security_config import ServerSecurityConfig from .no_sec_lw_m2_m_bootstrap_server_credential import NoSecLwM2MBootstrapServerCredential from .rule_chain_output_labels_usage import RuleChainOutputLabelsUsage -from .psk_lw_m2_m_bootstrap_server_credential import PSKLwM2MBootstrapServerCredential -from .rpk_lw_m2_m_bootstrap_server_credential import RPKLwM2MBootstrapServerCredential from .asset_info import AssetInfo from .page_data_device_info import PageDataDeviceInfo from .entity_view_info import EntityViewInfo @@ -302,3 +299,82 @@ from .alarm_comment import AlarmComment from .alarm_comment_id import AlarmCommentId from .alarm_comment_info import AlarmCommentInfo +from .alarm_assignee import AlarmAssignee +from .alarm_assignment_notification_rule_trigger_config import AlarmAssignmentNotificationRuleTriggerConfig +from .alarm_comment_notification_rule_trigger_config import AlarmCommentNotificationRuleTriggerConfig +from .alarm_count_query import AlarmCountQuery +from .alarm_comment_notification_rule_trigger_config import AlarmCommentNotificationRuleTriggerConfig +from .all_users_filter import AllUsersFilter +from .api_usage_limit_notification_rule_trigger_config import ApiUsageLimitNotificationRuleTriggerConfig +from .asset_profile import AssetProfile +from .asset_profile_id import AssetProfileId +from .asset_profile_info import AssetProfileInfo +from .clear_rule import ClearRule +from .comparison_ts_value import ComparisonTsValue +from .customer_users_filter import CustomerUsersFilter +from .delivery_method_notification_template import DeliveryMethodNotificationTemplate +from .device_activity_notification_rule_trigger_config import DeviceActivityNotificationRuleTriggerConfig +from .edge_install_instructions import EdgeInstallInstructions +from .email_delivery_method_notification_template import EmailDeliveryMethodNotificationTemplate +from .entities_limit_notification_rule_trigger_config import EntitiesLimitNotificationRuleTriggerConfig +from .entity_action_notification_rule_trigger_config import EntityActionNotificationRuleTriggerConfig +from .escalated_notification_rule_recipients_config import EscalatedNotificationRuleRecipientsConfig +from .event_info import EventInfo +from .features_info import FeaturesInfo +from .last_visited_dashboard_info import LastVisitedDashboardInfo +from .new_platform_version_notification_rule_trigger_config import NewPlatformVersionNotificationRuleTriggerConfig +from .notification import Notification +from .notification_delivery_method_config import NotificationDeliveryMethodConfig +from .notification_id import NotificationId +from .notification_info import NotificationInfo +from .notification_request import NotificationRequest +from .notification_request_config import NotificationRequestConfig +from .notification_request_id import NotificationRequestId +from .notification_request_info import NotificationRequestInfo +from .notification_request_preview import NotificationRequestPreview +from .notification_request_stats import NotificationRequestStats +from .notification_rule import NotificationRule +from .notification_rule_config import NotificationRuleConfig +from .notification_rule_id import NotificationRuleId +from .notification_rule_info import NotificationRuleInfo +from .notification_rule_recipients_config import NotificationRuleRecipientsConfig +from .notification_rule_trigger_config import NotificationRuleTriggerConfig +from .notification_settings import NotificationSettings +from .notification_target import NotificationTarget +from .notification_target_config import NotificationTargetConfig +from .notification_target_id import NotificationTargetId +from .notification_template import NotificationTemplate +from .notification_template_config import NotificationTemplateConfig +from .notification_template_id import NotificationTemplateId +from .originator_entity_owner_users_filter import OriginatorEntityOwnerUsersFilter +from .page_data_alarm_comment_info import PageDataAlarmCommentInfo +from .page_data_asset_profile import PageDataAssetProfile +from .page_data_asset_profile_info import PageDataAssetProfileInfo +from .page_data_event_info import PageDataEventInfo +from .page_data_notification import PageDataNotification +from .page_data_notification_request_info import PageDataNotificationRequestInfo +from .page_data_notification_rule_info import PageDataNotificationRuleInfo +from .page_data_notification_target import PageDataNotificationTarget +from .page_data_notification_template import PageDataNotificationTemplate +from .page_data_user_email_info import PageDataUserEmailInfo +from .platform_users_notification_target_config import PlatformUsersNotificationTargetConfig +from .repository_settings_info import RepositorySettingsInfo +from .rule_chain_debug_event_filter import RuleChainDebugEventFilter +from .rule_engine_component_lifecycle_event_notification_rule_trigger_config import RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig +from .slack_conversation import SlackConversation +from .slack_delivery_method_notification_template import SlackDeliveryMethodNotificationTemplate +from .slack_notification_delivery_method_config import SlackNotificationDeliveryMethodConfig +from .slack_notification_target_config import SlackNotificationTargetConfig +from .sms_delivery_method_notification_template import SmsDeliveryMethodNotificationTemplate +from .starred_dashboard_info import StarredDashboardInfo +from .system_administrators_filter import SystemAdministratorsFilter +from .system_info import SystemInfo +from .system_info_data import SystemInfoData +from .tenant_administrators_filter import TenantAdministratorsFilter +from .usage_info import UsageInfo +from .user_dashboards_info import UserDashboardsInfo +from .user_email_info import UserEmailInfo +from .user_list_filter import UserListFilter +from .users_filter import UsersFilter +from .web_delivery_method_notification_template import WebDeliveryMethodNotificationTemplate +from .x509_certificate_chain_provision_configuration import X509CertificateChainProvisionConfiguration diff --git a/tb_rest_client/models/models_ce/account_two_fa_settings.py b/tb_rest_client/models/models_ce/account_two_fa_settings.py index 4faef57a..bc09f86d 100644 --- a/tb_rest_client/models/models_ce/account_two_fa_settings.py +++ b/tb_rest_client/models/models_ce/account_two_fa_settings.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AccountTwoFaSettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/activate_user_request.py b/tb_rest_client/models/models_ce/activate_user_request.py index 9853e510..b9318e1c 100644 --- a/tb_rest_client/models/models_ce/activate_user_request.py +++ b/tb_rest_client/models/models_ce/activate_user_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ActivateUserRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/admin_settings.py b/tb_rest_client/models/models_ce/admin_settings.py index 741389e0..5955a935 100644 --- a/tb_rest_client/models/models_ce/admin_settings.py +++ b/tb_rest_client/models/models_ce/admin_settings.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AdminSettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/admin_settings_id.py b/tb_rest_client/models/models_ce/admin_settings_id.py index 0313e0c7..b7a6a3e3 100644 --- a/tb_rest_client/models/models_ce/admin_settings_id.py +++ b/tb_rest_client/models/models_ce/admin_settings_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AdminSettingsId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,13 +28,11 @@ class AdminSettingsId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_ce/url_stream_handler.py b/tb_rest_client/models/models_ce/affected_tenant_administrators_filter.py similarity index 84% rename from tb_rest_client/models/models_ce/url_stream_handler.py rename to tb_rest_client/models/models_ce/affected_tenant_administrators_filter.py index 359d3944..76b405d5 100644 --- a/tb_rest_client/models/models_ce/url_stream_handler.py +++ b/tb_rest_client/models/models_ce/affected_tenant_administrators_filter.py @@ -3,9 +3,9 @@ """ ThingsBoard REST API - For instructions how to authorize requests please visit REST API documentation page. # noqa: E501 + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 2.0 + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import six -class URLStreamHandler(object): +class AffectedTenantAdministratorsFilter(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -34,7 +34,7 @@ class URLStreamHandler(object): } def __init__(self): # noqa: E501 - """URLStreamHandler - a model defined in Swagger""" # noqa: E501 + """AffectedTenantAdministratorsFilter - a model defined in Swagger""" # noqa: E501 self.discriminator = None def to_dict(self): @@ -58,7 +58,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(URLStreamHandler, dict): + if issubclass(AffectedTenantAdministratorsFilter, dict): for key, value in self.items(): result[key] = value @@ -74,7 +74,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, URLStreamHandler): + if not isinstance(other, AffectedTenantAdministratorsFilter): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/mapstring_ts_value.py b/tb_rest_client/models/models_ce/affected_user_filter.py similarity index 75% rename from tb_rest_client/models/models_ce/mapstring_ts_value.py rename to tb_rest_client/models/models_ce/affected_user_filter.py index 4cc159e3..d0e1b975 100644 --- a/tb_rest_client/models/models_ce/mapstring_ts_value.py +++ b/tb_rest_client/models/models_ce/affected_user_filter.py @@ -3,9 +3,9 @@ """ ThingsBoard REST API - For instructions how to authorize requests please visit REST API documentation page. # noqa: E501 + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 2.0 + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,7 @@ import six -class MapstringTsValue(dict): +class AffectedUserFilter(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -29,18 +29,13 @@ class MapstringTsValue(dict): """ swagger_types = { } - if hasattr(dict, "swagger_types"): - swagger_types.update(dict.swagger_types) attribute_map = { } - if hasattr(dict, "attribute_map"): - attribute_map.update(dict.attribute_map) - def __init__(self, *args, **kwargs): # noqa: E501 - """MapstringTsValue - a model defined in Swagger""" # noqa: E501 + def __init__(self): # noqa: E501 + """AffectedUserFilter - a model defined in Swagger""" # noqa: E501 self.discriminator = None - dict.__init__(self, *args, **kwargs) def to_dict(self): """Returns the model properties as a dict""" @@ -63,7 +58,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(MapstringTsValue, dict): + if issubclass(AffectedUserFilter, dict): for key, value in self.items(): result[key] = value @@ -79,7 +74,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, MapstringTsValue): + if not isinstance(other, AffectedUserFilter): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/alarm.py b/tb_rest_client/models/models_ce/alarm.py index 463157ec..42afa72a 100644 --- a/tb_rest_client/models/models_ce/alarm.py +++ b/tb_rest_client/models/models_ce/alarm.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Alarm(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -36,16 +36,20 @@ class Alarm(object): 'type': 'str', 'originator': 'EntityId', 'severity': 'str', - 'status': 'str', + 'acknowledged': 'bool', + 'cleared': 'bool', + 'assignee_id': 'UserId', 'start_ts': 'int', 'end_ts': 'int', 'ack_ts': 'int', 'clear_ts': 'int', + 'assign_ts': 'int', 'details': 'JsonNode', 'propagate': 'bool', 'propagate_to_owner': 'bool', 'propagate_to_tenant': 'bool', - 'propagate_relation_types': 'list[str]' + 'propagate_relation_types': 'list[str]', + 'status': 'str' } attribute_map = { @@ -57,19 +61,23 @@ class Alarm(object): 'type': 'type', 'originator': 'originator', 'severity': 'severity', - 'status': 'status', + 'acknowledged': 'acknowledged', + 'cleared': 'cleared', + 'assignee_id': 'assigneeId', 'start_ts': 'startTs', 'end_ts': 'endTs', 'ack_ts': 'ackTs', 'clear_ts': 'clearTs', + 'assign_ts': 'assignTs', 'details': 'details', 'propagate': 'propagate', 'propagate_to_owner': 'propagateToOwner', 'propagate_to_tenant': 'propagateToTenant', - 'propagate_relation_types': 'propagateRelationTypes' + 'propagate_relation_types': 'propagateRelationTypes', + 'status': 'status' } - def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, status=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, details=None, propagate=None, propagate_to_owner=None, propagate_to_tenant=None, propagate_relation_types=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, acknowledged=None, cleared=None, assignee_id=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, assign_ts=None, details=None, propagate=None, propagate_to_owner=None, propagate_to_tenant=None, propagate_relation_types=None, status=None): # noqa: E501 """Alarm - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None @@ -79,16 +87,20 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self._type = None self._originator = None self._severity = None - self._status = None + self._acknowledged = None + self._cleared = None + self._assignee_id = None self._start_ts = None self._end_ts = None self._ack_ts = None self._clear_ts = None + self._assign_ts = None self._details = None self._propagate = None self._propagate_to_owner = None self._propagate_to_tenant = None self._propagate_relation_types = None + self._status = None self.discriminator = None if id is not None: self.id = id @@ -102,7 +114,10 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.type = type self.originator = originator self.severity = severity - self.status = status + self.acknowledged = acknowledged + self.cleared = cleared + if assignee_id is not None: + self.assignee_id = assignee_id if start_ts is not None: self.start_ts = start_ts if end_ts is not None: @@ -111,6 +126,8 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.ack_ts = ack_ts if clear_ts is not None: self.clear_ts = clear_ts + if assign_ts is not None: + self.assign_ts = assign_ts if details is not None: self.details = details if propagate is not None: @@ -121,6 +138,7 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.propagate_to_tenant = propagate_to_tenant if propagate_relation_types is not None: self.propagate_relation_types = propagate_relation_types + self.status = status @property def id(self): @@ -313,35 +331,75 @@ def severity(self, severity): self._severity = severity @property - def status(self): - """Gets the status of this Alarm. # noqa: E501 + def acknowledged(self): + """Gets the acknowledged of this Alarm. # noqa: E501 - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :return: The status of this Alarm. # noqa: E501 - :rtype: str + :return: The acknowledged of this Alarm. # noqa: E501 + :rtype: bool """ - return self._status + return self._acknowledged - @status.setter - def status(self, status): - """Sets the status of this Alarm. + @acknowledged.setter + def acknowledged(self, acknowledged): + """Sets the acknowledged of this Alarm. - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :param status: The status of this Alarm. # noqa: E501 - :type: str + :param acknowledged: The acknowledged of this Alarm. # noqa: E501 + :type: bool """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) + if acknowledged is None: + raise ValueError("Invalid value for `acknowledged`, must not be `None`") # noqa: E501 - self._status = status + self._acknowledged = acknowledged + + @property + def cleared(self): + """Gets the cleared of this Alarm. # noqa: E501 + + Cleared # noqa: E501 + + :return: The cleared of this Alarm. # noqa: E501 + :rtype: bool + """ + return self._cleared + + @cleared.setter + def cleared(self, cleared): + """Sets the cleared of this Alarm. + + Cleared # noqa: E501 + + :param cleared: The cleared of this Alarm. # noqa: E501 + :type: bool + """ + if cleared is None: + raise ValueError("Invalid value for `cleared`, must not be `None`") # noqa: E501 + + self._cleared = cleared + + @property + def assignee_id(self): + """Gets the assignee_id of this Alarm. # noqa: E501 + + + :return: The assignee_id of this Alarm. # noqa: E501 + :rtype: UserId + """ + return self._assignee_id + + @assignee_id.setter + def assignee_id(self, assignee_id): + """Sets the assignee_id of this Alarm. + + + :param assignee_id: The assignee_id of this Alarm. # noqa: E501 + :type: UserId + """ + + self._assignee_id = assignee_id @property def start_ts(self): @@ -435,6 +493,29 @@ def clear_ts(self, clear_ts): self._clear_ts = clear_ts + @property + def assign_ts(self): + """Gets the assign_ts of this Alarm. # noqa: E501 + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :return: The assign_ts of this Alarm. # noqa: E501 + :rtype: int + """ + return self._assign_ts + + @assign_ts.setter + def assign_ts(self, assign_ts): + """Sets the assign_ts of this Alarm. + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :param assign_ts: The assign_ts of this Alarm. # noqa: E501 + :type: int + """ + + self._assign_ts = assign_ts + @property def details(self): """Gets the details of this Alarm. # noqa: E501 @@ -548,6 +629,37 @@ def propagate_relation_types(self, propagate_relation_types): self._propagate_relation_types = propagate_relation_types + @property + def status(self): + """Gets the status of this Alarm. # noqa: E501 + + status of the Alarm # noqa: E501 + + :return: The status of this Alarm. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Alarm. + + status of the Alarm # noqa: E501 + + :param status: The status of this Alarm. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_ce/alarm_assignee.py b/tb_rest_client/models/models_ce/alarm_assignee.py new file mode 100644 index 00000000..1643dd65 --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_assignee.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmAssignee(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'first_name': 'str', + 'id': 'UserId', + 'last_name': 'str' + } + + attribute_map = { + 'email': 'email', + 'first_name': 'firstName', + 'id': 'id', + 'last_name': 'lastName' + } + + def __init__(self, email=None, first_name=None, id=None, last_name=None): # noqa: E501 + """AlarmAssignee - a model defined in Swagger""" # noqa: E501 + self._email = None + self._first_name = None + self._id = None + self._last_name = None + self.discriminator = None + if email is not None: + self.email = email + if first_name is not None: + self.first_name = first_name + if id is not None: + self.id = id + if last_name is not None: + self.last_name = last_name + + @property + def email(self): + """Gets the email of this AlarmAssignee. # noqa: E501 + + + :return: The email of this AlarmAssignee. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this AlarmAssignee. + + + :param email: The email of this AlarmAssignee. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def first_name(self): + """Gets the first_name of this AlarmAssignee. # noqa: E501 + + + :return: The first_name of this AlarmAssignee. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this AlarmAssignee. + + + :param first_name: The first_name of this AlarmAssignee. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def id(self): + """Gets the id of this AlarmAssignee. # noqa: E501 + + + :return: The id of this AlarmAssignee. # noqa: E501 + :rtype: UserId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AlarmAssignee. + + + :param id: The id of this AlarmAssignee. # noqa: E501 + :type: UserId + """ + + self._id = id + + @property + def last_name(self): + """Gets the last_name of this AlarmAssignee. # noqa: E501 + + + :return: The last_name of this AlarmAssignee. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this AlarmAssignee. + + + :param last_name: The last_name of this AlarmAssignee. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmAssignee, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmAssignee): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/alarm_assignment_notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/alarm_assignment_notification_rule_trigger_config.py new file mode 100644 index 00000000..d9b552c2 --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_assignment_notification_rule_trigger_config.py @@ -0,0 +1,241 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmAssignmentNotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'alarm_severities': 'list[str]', + 'alarm_statuses': 'list[str]', + 'alarm_types': 'list[str]', + 'notify_on': 'list[str]', + 'trigger_type': 'str' + } + + attribute_map = { + 'alarm_severities': 'alarmSeverities', + 'alarm_statuses': 'alarmStatuses', + 'alarm_types': 'alarmTypes', + 'notify_on': 'notifyOn', + 'trigger_type': 'triggerType' + } + + def __init__(self, alarm_severities=None, alarm_statuses=None, alarm_types=None, notify_on=None, trigger_type=None): # noqa: E501 + """AlarmAssignmentNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._alarm_severities = None + self._alarm_statuses = None + self._alarm_types = None + self._notify_on = None + self._trigger_type = None + self.discriminator = None + if alarm_severities is not None: + self.alarm_severities = alarm_severities + if alarm_statuses is not None: + self.alarm_statuses = alarm_statuses + if alarm_types is not None: + self.alarm_types = alarm_types + if notify_on is not None: + self.notify_on = notify_on + if trigger_type is not None: + self.trigger_type = trigger_type + + @property + def alarm_severities(self): + """Gets the alarm_severities of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_severities of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_severities + + @alarm_severities.setter + def alarm_severities(self, alarm_severities): + """Sets the alarm_severities of this AlarmAssignmentNotificationRuleTriggerConfig. + + + :param alarm_severities: The alarm_severities of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["CRITICAL", "INDETERMINATE", "MAJOR", "MINOR", "WARNING"] # noqa: E501 + if not set(alarm_severities).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_severities` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_severities) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_severities = alarm_severities + + @property + def alarm_statuses(self): + """Gets the alarm_statuses of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_statuses of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_statuses + + @alarm_statuses.setter + def alarm_statuses(self, alarm_statuses): + """Sets the alarm_statuses of this AlarmAssignmentNotificationRuleTriggerConfig. + + + :param alarm_statuses: The alarm_statuses of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACK", "ACTIVE", "ANY", "CLEARED", "UNACK"] # noqa: E501 + if not set(alarm_statuses).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_statuses` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_statuses) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_statuses = alarm_statuses + + @property + def alarm_types(self): + """Gets the alarm_types of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_types of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_types + + @alarm_types.setter + def alarm_types(self, alarm_types): + """Sets the alarm_types of this AlarmAssignmentNotificationRuleTriggerConfig. + + + :param alarm_types: The alarm_types of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._alarm_types = alarm_types + + @property + def notify_on(self): + """Gets the notify_on of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._notify_on + + @notify_on.setter + def notify_on(self, notify_on): + """Sets the notify_on of this AlarmAssignmentNotificationRuleTriggerConfig. + + + :param notify_on: The notify_on of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ASSIGNED", "UNASSIGNED"] # noqa: E501 + if not set(notify_on).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `notify_on` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(notify_on) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._notify_on = notify_on + + @property + def trigger_type(self): + """Gets the trigger_type of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this AlarmAssignmentNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmAssignmentNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmAssignmentNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/alarm_comment.py b/tb_rest_client/models/models_ce/alarm_comment.py index c6d9f3f1..07fd7a6b 100644 --- a/tb_rest_client/models/models_ce/alarm_comment.py +++ b/tb_rest_client/models/models_ce/alarm_comment.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.5.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_ce/alarm_comment_id.py b/tb_rest_client/models/models_ce/alarm_comment_id.py index 70c75937..c02fed11 100644 --- a/tb_rest_client/models/models_ce/alarm_comment_id.py +++ b/tb_rest_client/models/models_ce/alarm_comment_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.5.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_ce/alarm_comment_info.py b/tb_rest_client/models/models_ce/alarm_comment_info.py index 5c9f9698..f5199d1a 100644 --- a/tb_rest_client/models/models_ce/alarm_comment_info.py +++ b/tb_rest_client/models/models_ce/alarm_comment_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.5.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_ce/alarm_comment_notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/alarm_comment_notification_rule_trigger_config.py new file mode 100644 index 00000000..7ac5f4a2 --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_comment_notification_rule_trigger_config.py @@ -0,0 +1,260 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmCommentNotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'alarm_severities': 'list[str]', + 'alarm_statuses': 'list[str]', + 'alarm_types': 'list[str]', + 'notify_on_comment_update': 'bool', + 'only_user_comments': 'bool', + 'trigger_type': 'str' + } + + attribute_map = { + 'alarm_severities': 'alarmSeverities', + 'alarm_statuses': 'alarmStatuses', + 'alarm_types': 'alarmTypes', + 'notify_on_comment_update': 'notifyOnCommentUpdate', + 'only_user_comments': 'onlyUserComments', + 'trigger_type': 'triggerType' + } + + def __init__(self, alarm_severities=None, alarm_statuses=None, alarm_types=None, notify_on_comment_update=None, only_user_comments=None, trigger_type=None): # noqa: E501 + """AlarmCommentNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._alarm_severities = None + self._alarm_statuses = None + self._alarm_types = None + self._notify_on_comment_update = None + self._only_user_comments = None + self._trigger_type = None + self.discriminator = None + if alarm_severities is not None: + self.alarm_severities = alarm_severities + if alarm_statuses is not None: + self.alarm_statuses = alarm_statuses + if alarm_types is not None: + self.alarm_types = alarm_types + if notify_on_comment_update is not None: + self.notify_on_comment_update = notify_on_comment_update + if only_user_comments is not None: + self.only_user_comments = only_user_comments + if trigger_type is not None: + self.trigger_type = trigger_type + + @property + def alarm_severities(self): + """Gets the alarm_severities of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_severities of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_severities + + @alarm_severities.setter + def alarm_severities(self, alarm_severities): + """Sets the alarm_severities of this AlarmCommentNotificationRuleTriggerConfig. + + + :param alarm_severities: The alarm_severities of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["CRITICAL", "INDETERMINATE", "MAJOR", "MINOR", "WARNING"] # noqa: E501 + if not set(alarm_severities).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_severities` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_severities) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_severities = alarm_severities + + @property + def alarm_statuses(self): + """Gets the alarm_statuses of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_statuses of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_statuses + + @alarm_statuses.setter + def alarm_statuses(self, alarm_statuses): + """Sets the alarm_statuses of this AlarmCommentNotificationRuleTriggerConfig. + + + :param alarm_statuses: The alarm_statuses of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACK", "ACTIVE", "ANY", "CLEARED", "UNACK"] # noqa: E501 + if not set(alarm_statuses).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_statuses` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_statuses) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_statuses = alarm_statuses + + @property + def alarm_types(self): + """Gets the alarm_types of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_types of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_types + + @alarm_types.setter + def alarm_types(self, alarm_types): + """Sets the alarm_types of this AlarmCommentNotificationRuleTriggerConfig. + + + :param alarm_types: The alarm_types of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._alarm_types = alarm_types + + @property + def notify_on_comment_update(self): + """Gets the notify_on_comment_update of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on_comment_update of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._notify_on_comment_update + + @notify_on_comment_update.setter + def notify_on_comment_update(self, notify_on_comment_update): + """Sets the notify_on_comment_update of this AlarmCommentNotificationRuleTriggerConfig. + + + :param notify_on_comment_update: The notify_on_comment_update of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._notify_on_comment_update = notify_on_comment_update + + @property + def only_user_comments(self): + """Gets the only_user_comments of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The only_user_comments of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._only_user_comments + + @only_user_comments.setter + def only_user_comments(self, only_user_comments): + """Sets the only_user_comments of this AlarmCommentNotificationRuleTriggerConfig. + + + :param only_user_comments: The only_user_comments of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._only_user_comments = only_user_comments + + @property + def trigger_type(self): + """Gets the trigger_type of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this AlarmCommentNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmCommentNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmCommentNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/alarm_condition.py b/tb_rest_client/models/models_ce/alarm_condition.py index 430e2661..80aa5749 100644 --- a/tb_rest_client/models/models_ce/alarm_condition.py +++ b/tb_rest_client/models/models_ce/alarm_condition.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmCondition(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/alarm_condition_filter.py b/tb_rest_client/models/models_ce/alarm_condition_filter.py index b70e5343..2de05f4f 100644 --- a/tb_rest_client/models/models_ce/alarm_condition_filter.py +++ b/tb_rest_client/models/models_ce/alarm_condition_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmConditionFilter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/alarm_condition_filter_key.py b/tb_rest_client/models/models_ce/alarm_condition_filter_key.py index 4020e5fd..ffc4cc04 100644 --- a/tb_rest_client/models/models_ce/alarm_condition_filter_key.py +++ b/tb_rest_client/models/models_ce/alarm_condition_filter_key.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmConditionFilterKey(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/alarm_condition_spec.py b/tb_rest_client/models/models_ce/alarm_condition_spec.py index 11224670..8732a63d 100644 --- a/tb_rest_client/models/models_ce/alarm_condition_spec.py +++ b/tb_rest_client/models/models_ce/alarm_condition_spec.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmConditionSpec(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/alarm_count_query.py b/tb_rest_client/models/models_ce/alarm_count_query.py new file mode 100644 index 00000000..2ded828b --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_count_query.py @@ -0,0 +1,358 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmCountQuery(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assignee_id': 'UserId', + 'end_ts': 'int', + 'entity_filter': 'EntityFilter', + 'key_filters': 'list[KeyFilter]', + 'search_propagated_alarms': 'bool', + 'severity_list': 'list[str]', + 'start_ts': 'int', + 'status_list': 'list[str]', + 'time_window': 'int', + 'type_list': 'list[str]' + } + + attribute_map = { + 'assignee_id': 'assigneeId', + 'end_ts': 'endTs', + 'entity_filter': 'entityFilter', + 'key_filters': 'keyFilters', + 'search_propagated_alarms': 'searchPropagatedAlarms', + 'severity_list': 'severityList', + 'start_ts': 'startTs', + 'status_list': 'statusList', + 'time_window': 'timeWindow', + 'type_list': 'typeList' + } + + def __init__(self, assignee_id=None, end_ts=None, entity_filter=None, key_filters=None, search_propagated_alarms=None, severity_list=None, start_ts=None, status_list=None, time_window=None, type_list=None): # noqa: E501 + """AlarmCountQuery - a model defined in Swagger""" # noqa: E501 + self._assignee_id = None + self._end_ts = None + self._entity_filter = None + self._key_filters = None + self._search_propagated_alarms = None + self._severity_list = None + self._start_ts = None + self._status_list = None + self._time_window = None + self._type_list = None + self.discriminator = None + if assignee_id is not None: + self.assignee_id = assignee_id + if end_ts is not None: + self.end_ts = end_ts + if entity_filter is not None: + self.entity_filter = entity_filter + if key_filters is not None: + self.key_filters = key_filters + if search_propagated_alarms is not None: + self.search_propagated_alarms = search_propagated_alarms + if severity_list is not None: + self.severity_list = severity_list + if start_ts is not None: + self.start_ts = start_ts + if status_list is not None: + self.status_list = status_list + if time_window is not None: + self.time_window = time_window + if type_list is not None: + self.type_list = type_list + + @property + def assignee_id(self): + """Gets the assignee_id of this AlarmCountQuery. # noqa: E501 + + + :return: The assignee_id of this AlarmCountQuery. # noqa: E501 + :rtype: UserId + """ + return self._assignee_id + + @assignee_id.setter + def assignee_id(self, assignee_id): + """Sets the assignee_id of this AlarmCountQuery. + + + :param assignee_id: The assignee_id of this AlarmCountQuery. # noqa: E501 + :type: UserId + """ + + self._assignee_id = assignee_id + + @property + def end_ts(self): + """Gets the end_ts of this AlarmCountQuery. # noqa: E501 + + + :return: The end_ts of this AlarmCountQuery. # noqa: E501 + :rtype: int + """ + return self._end_ts + + @end_ts.setter + def end_ts(self, end_ts): + """Sets the end_ts of this AlarmCountQuery. + + + :param end_ts: The end_ts of this AlarmCountQuery. # noqa: E501 + :type: int + """ + + self._end_ts = end_ts + + @property + def entity_filter(self): + """Gets the entity_filter of this AlarmCountQuery. # noqa: E501 + + + :return: The entity_filter of this AlarmCountQuery. # noqa: E501 + :rtype: EntityFilter + """ + return self._entity_filter + + @entity_filter.setter + def entity_filter(self, entity_filter): + """Sets the entity_filter of this AlarmCountQuery. + + + :param entity_filter: The entity_filter of this AlarmCountQuery. # noqa: E501 + :type: EntityFilter + """ + + self._entity_filter = entity_filter + + @property + def key_filters(self): + """Gets the key_filters of this AlarmCountQuery. # noqa: E501 + + + :return: The key_filters of this AlarmCountQuery. # noqa: E501 + :rtype: list[KeyFilter] + """ + return self._key_filters + + @key_filters.setter + def key_filters(self, key_filters): + """Sets the key_filters of this AlarmCountQuery. + + + :param key_filters: The key_filters of this AlarmCountQuery. # noqa: E501 + :type: list[KeyFilter] + """ + + self._key_filters = key_filters + + @property + def search_propagated_alarms(self): + """Gets the search_propagated_alarms of this AlarmCountQuery. # noqa: E501 + + + :return: The search_propagated_alarms of this AlarmCountQuery. # noqa: E501 + :rtype: bool + """ + return self._search_propagated_alarms + + @search_propagated_alarms.setter + def search_propagated_alarms(self, search_propagated_alarms): + """Sets the search_propagated_alarms of this AlarmCountQuery. + + + :param search_propagated_alarms: The search_propagated_alarms of this AlarmCountQuery. # noqa: E501 + :type: bool + """ + + self._search_propagated_alarms = search_propagated_alarms + + @property + def severity_list(self): + """Gets the severity_list of this AlarmCountQuery. # noqa: E501 + + + :return: The severity_list of this AlarmCountQuery. # noqa: E501 + :rtype: list[str] + """ + return self._severity_list + + @severity_list.setter + def severity_list(self, severity_list): + """Sets the severity_list of this AlarmCountQuery. + + + :param severity_list: The severity_list of this AlarmCountQuery. # noqa: E501 + :type: list[str] + """ + allowed_values = ["CRITICAL", "INDETERMINATE", "MAJOR", "MINOR", "WARNING"] # noqa: E501 + if not set(severity_list).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `severity_list` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(severity_list) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._severity_list = severity_list + + @property + def start_ts(self): + """Gets the start_ts of this AlarmCountQuery. # noqa: E501 + + + :return: The start_ts of this AlarmCountQuery. # noqa: E501 + :rtype: int + """ + return self._start_ts + + @start_ts.setter + def start_ts(self, start_ts): + """Sets the start_ts of this AlarmCountQuery. + + + :param start_ts: The start_ts of this AlarmCountQuery. # noqa: E501 + :type: int + """ + + self._start_ts = start_ts + + @property + def status_list(self): + """Gets the status_list of this AlarmCountQuery. # noqa: E501 + + + :return: The status_list of this AlarmCountQuery. # noqa: E501 + :rtype: list[str] + """ + return self._status_list + + @status_list.setter + def status_list(self, status_list): + """Sets the status_list of this AlarmCountQuery. + + + :param status_list: The status_list of this AlarmCountQuery. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACK", "ACTIVE", "ANY", "CLEARED", "UNACK"] # noqa: E501 + if not set(status_list).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `status_list` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(status_list) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._status_list = status_list + + @property + def time_window(self): + """Gets the time_window of this AlarmCountQuery. # noqa: E501 + + + :return: The time_window of this AlarmCountQuery. # noqa: E501 + :rtype: int + """ + return self._time_window + + @time_window.setter + def time_window(self, time_window): + """Sets the time_window of this AlarmCountQuery. + + + :param time_window: The time_window of this AlarmCountQuery. # noqa: E501 + :type: int + """ + + self._time_window = time_window + + @property + def type_list(self): + """Gets the type_list of this AlarmCountQuery. # noqa: E501 + + + :return: The type_list of this AlarmCountQuery. # noqa: E501 + :rtype: list[str] + """ + return self._type_list + + @type_list.setter + def type_list(self, type_list): + """Sets the type_list of this AlarmCountQuery. + + + :param type_list: The type_list of this AlarmCountQuery. # noqa: E501 + :type: list[str] + """ + + self._type_list = type_list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmCountQuery, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmCountQuery): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/alarm_data.py b/tb_rest_client/models/models_ce/alarm_data.py index 43e77c8e..5630f5d7 100644 --- a/tb_rest_client/models/models_ce/alarm_data.py +++ b/tb_rest_client/models/models_ce/alarm_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -38,17 +38,23 @@ class AlarmData(object): 'type': 'str', 'originator': 'EntityId', 'severity': 'str', - 'status': 'str', + 'acknowledged': 'bool', + 'cleared': 'bool', + 'assignee_id': 'UserId', 'start_ts': 'int', 'end_ts': 'int', 'ack_ts': 'int', 'clear_ts': 'int', + 'assign_ts': 'int', 'details': 'JsonNode', 'propagate': 'bool', + 'originator_name': 'str', 'propagate_to_owner': 'bool', + 'originator_label': 'str', 'propagate_to_tenant': 'bool', + 'assignee': 'AlarmAssignee', 'propagate_relation_types': 'list[str]', - 'originator_name': 'str' + 'status': 'str' } attribute_map = { @@ -62,20 +68,26 @@ class AlarmData(object): 'type': 'type', 'originator': 'originator', 'severity': 'severity', - 'status': 'status', + 'acknowledged': 'acknowledged', + 'cleared': 'cleared', + 'assignee_id': 'assigneeId', 'start_ts': 'startTs', 'end_ts': 'endTs', 'ack_ts': 'ackTs', 'clear_ts': 'clearTs', + 'assign_ts': 'assignTs', 'details': 'details', 'propagate': 'propagate', + 'originator_name': 'originatorName', 'propagate_to_owner': 'propagateToOwner', + 'originator_label': 'originatorLabel', 'propagate_to_tenant': 'propagateToTenant', + 'assignee': 'assignee', 'propagate_relation_types': 'propagateRelationTypes', - 'originator_name': 'originatorName' + 'status': 'status' } - def __init__(self, entity_id=None, latest=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, status=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, details=None, propagate=None, propagate_to_owner=None, propagate_to_tenant=None, propagate_relation_types=None, originator_name=None): # noqa: E501 + def __init__(self, entity_id=None, latest=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, acknowledged=None, cleared=None, assignee_id=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, assign_ts=None, details=None, propagate=None, originator_name=None, propagate_to_owner=None, originator_label=None, propagate_to_tenant=None, assignee=None, propagate_relation_types=None, status=None): # noqa: E501 """AlarmData - a model defined in Swagger""" # noqa: E501 self._entity_id = None self._latest = None @@ -87,17 +99,23 @@ def __init__(self, entity_id=None, latest=None, id=None, created_time=None, tena self._type = None self._originator = None self._severity = None - self._status = None + self._acknowledged = None + self._cleared = None + self._assignee_id = None self._start_ts = None self._end_ts = None self._ack_ts = None self._clear_ts = None + self._assign_ts = None self._details = None self._propagate = None + self._originator_name = None self._propagate_to_owner = None + self._originator_label = None self._propagate_to_tenant = None + self._assignee = None self._propagate_relation_types = None - self._originator_name = None + self._status = None self.discriminator = None if entity_id is not None: self.entity_id = entity_id @@ -115,7 +133,10 @@ def __init__(self, entity_id=None, latest=None, id=None, created_time=None, tena self.type = type self.originator = originator self.severity = severity - self.status = status + self.acknowledged = acknowledged + self.cleared = cleared + if assignee_id is not None: + self.assignee_id = assignee_id if start_ts is not None: self.start_ts = start_ts if end_ts is not None: @@ -124,18 +145,25 @@ def __init__(self, entity_id=None, latest=None, id=None, created_time=None, tena self.ack_ts = ack_ts if clear_ts is not None: self.clear_ts = clear_ts + if assign_ts is not None: + self.assign_ts = assign_ts if details is not None: self.details = details if propagate is not None: self.propagate = propagate + if originator_name is not None: + self.originator_name = originator_name if propagate_to_owner is not None: self.propagate_to_owner = propagate_to_owner + if originator_label is not None: + self.originator_label = originator_label if propagate_to_tenant is not None: self.propagate_to_tenant = propagate_to_tenant + if assignee is not None: + self.assignee = assignee if propagate_relation_types is not None: self.propagate_relation_types = propagate_relation_types - if originator_name is not None: - self.originator_name = originator_name + self.status = status @property def entity_id(self): @@ -370,35 +398,75 @@ def severity(self, severity): self._severity = severity @property - def status(self): - """Gets the status of this AlarmData. # noqa: E501 + def acknowledged(self): + """Gets the acknowledged of this AlarmData. # noqa: E501 - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :return: The status of this AlarmData. # noqa: E501 - :rtype: str + :return: The acknowledged of this AlarmData. # noqa: E501 + :rtype: bool """ - return self._status + return self._acknowledged - @status.setter - def status(self, status): - """Sets the status of this AlarmData. + @acknowledged.setter + def acknowledged(self, acknowledged): + """Sets the acknowledged of this AlarmData. - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :param status: The status of this AlarmData. # noqa: E501 - :type: str + :param acknowledged: The acknowledged of this AlarmData. # noqa: E501 + :type: bool """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) + if acknowledged is None: + raise ValueError("Invalid value for `acknowledged`, must not be `None`") # noqa: E501 - self._status = status + self._acknowledged = acknowledged + + @property + def cleared(self): + """Gets the cleared of this AlarmData. # noqa: E501 + + Cleared # noqa: E501 + + :return: The cleared of this AlarmData. # noqa: E501 + :rtype: bool + """ + return self._cleared + + @cleared.setter + def cleared(self, cleared): + """Sets the cleared of this AlarmData. + + Cleared # noqa: E501 + + :param cleared: The cleared of this AlarmData. # noqa: E501 + :type: bool + """ + if cleared is None: + raise ValueError("Invalid value for `cleared`, must not be `None`") # noqa: E501 + + self._cleared = cleared + + @property + def assignee_id(self): + """Gets the assignee_id of this AlarmData. # noqa: E501 + + + :return: The assignee_id of this AlarmData. # noqa: E501 + :rtype: UserId + """ + return self._assignee_id + + @assignee_id.setter + def assignee_id(self, assignee_id): + """Sets the assignee_id of this AlarmData. + + + :param assignee_id: The assignee_id of this AlarmData. # noqa: E501 + :type: UserId + """ + + self._assignee_id = assignee_id @property def start_ts(self): @@ -492,6 +560,29 @@ def clear_ts(self, clear_ts): self._clear_ts = clear_ts + @property + def assign_ts(self): + """Gets the assign_ts of this AlarmData. # noqa: E501 + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :return: The assign_ts of this AlarmData. # noqa: E501 + :rtype: int + """ + return self._assign_ts + + @assign_ts.setter + def assign_ts(self, assign_ts): + """Sets the assign_ts of this AlarmData. + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :param assign_ts: The assign_ts of this AlarmData. # noqa: E501 + :type: int + """ + + self._assign_ts = assign_ts + @property def details(self): """Gets the details of this AlarmData. # noqa: E501 @@ -536,6 +627,29 @@ def propagate(self, propagate): self._propagate = propagate + @property + def originator_name(self): + """Gets the originator_name of this AlarmData. # noqa: E501 + + Alarm originator name # noqa: E501 + + :return: The originator_name of this AlarmData. # noqa: E501 + :rtype: str + """ + return self._originator_name + + @originator_name.setter + def originator_name(self, originator_name): + """Sets the originator_name of this AlarmData. + + Alarm originator name # noqa: E501 + + :param originator_name: The originator_name of this AlarmData. # noqa: E501 + :type: str + """ + + self._originator_name = originator_name + @property def propagate_to_owner(self): """Gets the propagate_to_owner of this AlarmData. # noqa: E501 @@ -559,6 +673,29 @@ def propagate_to_owner(self, propagate_to_owner): self._propagate_to_owner = propagate_to_owner + @property + def originator_label(self): + """Gets the originator_label of this AlarmData. # noqa: E501 + + Alarm originator label # noqa: E501 + + :return: The originator_label of this AlarmData. # noqa: E501 + :rtype: str + """ + return self._originator_label + + @originator_label.setter + def originator_label(self, originator_label): + """Sets the originator_label of this AlarmData. + + Alarm originator label # noqa: E501 + + :param originator_label: The originator_label of this AlarmData. # noqa: E501 + :type: str + """ + + self._originator_label = originator_label + @property def propagate_to_tenant(self): """Gets the propagate_to_tenant of this AlarmData. # noqa: E501 @@ -582,6 +719,27 @@ def propagate_to_tenant(self, propagate_to_tenant): self._propagate_to_tenant = propagate_to_tenant + @property + def assignee(self): + """Gets the assignee of this AlarmData. # noqa: E501 + + + :return: The assignee of this AlarmData. # noqa: E501 + :rtype: AlarmAssignee + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this AlarmData. + + + :param assignee: The assignee of this AlarmData. # noqa: E501 + :type: AlarmAssignee + """ + + self._assignee = assignee + @property def propagate_relation_types(self): """Gets the propagate_relation_types of this AlarmData. # noqa: E501 @@ -606,27 +764,35 @@ def propagate_relation_types(self, propagate_relation_types): self._propagate_relation_types = propagate_relation_types @property - def originator_name(self): - """Gets the originator_name of this AlarmData. # noqa: E501 + def status(self): + """Gets the status of this AlarmData. # noqa: E501 - Alarm originator name # noqa: E501 + status of the Alarm # noqa: E501 - :return: The originator_name of this AlarmData. # noqa: E501 + :return: The status of this AlarmData. # noqa: E501 :rtype: str """ - return self._originator_name + return self._status - @originator_name.setter - def originator_name(self, originator_name): - """Sets the originator_name of this AlarmData. + @status.setter + def status(self, status): + """Sets the status of this AlarmData. - Alarm originator name # noqa: E501 + status of the Alarm # noqa: E501 - :param originator_name: The originator_name of this AlarmData. # noqa: E501 + :param status: The status of this AlarmData. # noqa: E501 :type: str """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) - self._originator_name = originator_name + self._status = status def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_ce/alarm_data_page_link.py b/tb_rest_client/models/models_ce/alarm_data_page_link.py index b47507c0..d3adc752 100644 --- a/tb_rest_client/models/models_ce/alarm_data_page_link.py +++ b/tb_rest_client/models/models_ce/alarm_data_page_link.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmDataPageLink(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,6 +28,7 @@ class AlarmDataPageLink(object): and the value is json key in definition. """ swagger_types = { + 'assignee_id': 'UserId', 'dynamic': 'bool', 'end_ts': 'int', 'page': 'int', @@ -43,6 +44,7 @@ class AlarmDataPageLink(object): } attribute_map = { + 'assignee_id': 'assigneeId', 'dynamic': 'dynamic', 'end_ts': 'endTs', 'page': 'page', @@ -57,8 +59,9 @@ class AlarmDataPageLink(object): 'type_list': 'typeList' } - def __init__(self, dynamic=None, end_ts=None, page=None, page_size=None, search_propagated_alarms=None, severity_list=None, sort_order=None, start_ts=None, status_list=None, text_search=None, time_window=None, type_list=None): # noqa: E501 + def __init__(self, assignee_id=None, dynamic=None, end_ts=None, page=None, page_size=None, search_propagated_alarms=None, severity_list=None, sort_order=None, start_ts=None, status_list=None, text_search=None, time_window=None, type_list=None): # noqa: E501 """AlarmDataPageLink - a model defined in Swagger""" # noqa: E501 + self._assignee_id = None self._dynamic = None self._end_ts = None self._page = None @@ -72,6 +75,8 @@ def __init__(self, dynamic=None, end_ts=None, page=None, page_size=None, search_ self._time_window = None self._type_list = None self.discriminator = None + if assignee_id is not None: + self.assignee_id = assignee_id if dynamic is not None: self.dynamic = dynamic if end_ts is not None: @@ -97,6 +102,27 @@ def __init__(self, dynamic=None, end_ts=None, page=None, page_size=None, search_ if type_list is not None: self.type_list = type_list + @property + def assignee_id(self): + """Gets the assignee_id of this AlarmDataPageLink. # noqa: E501 + + + :return: The assignee_id of this AlarmDataPageLink. # noqa: E501 + :rtype: UserId + """ + return self._assignee_id + + @assignee_id.setter + def assignee_id(self, assignee_id): + """Sets the assignee_id of this AlarmDataPageLink. + + + :param assignee_id: The assignee_id of this AlarmDataPageLink. # noqa: E501 + :type: UserId + """ + + self._assignee_id = assignee_id + @property def dynamic(self): """Gets the dynamic of this AlarmDataPageLink. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/alarm_data_query.py b/tb_rest_client/models/models_ce/alarm_data_query.py index c584fc3f..a5924119 100644 --- a/tb_rest_client/models/models_ce/alarm_data_query.py +++ b/tb_rest_client/models/models_ce/alarm_data_query.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmDataQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/alarm_id.py b/tb_rest_client/models/models_ce/alarm_id.py index dc6875fe..ce107836 100644 --- a/tb_rest_client/models/models_ce/alarm_id.py +++ b/tb_rest_client/models/models_ce/alarm_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/alarm_info.py b/tb_rest_client/models/models_ce/alarm_info.py index 75d79191..e64f5b24 100644 --- a/tb_rest_client/models/models_ce/alarm_info.py +++ b/tb_rest_client/models/models_ce/alarm_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -36,17 +36,23 @@ class AlarmInfo(object): 'type': 'str', 'originator': 'EntityId', 'severity': 'str', - 'status': 'str', + 'acknowledged': 'bool', + 'cleared': 'bool', + 'assignee_id': 'UserId', 'start_ts': 'int', 'end_ts': 'int', 'ack_ts': 'int', 'clear_ts': 'int', + 'assign_ts': 'int', 'details': 'JsonNode', 'propagate': 'bool', + 'originator_name': 'str', 'propagate_to_owner': 'bool', + 'originator_label': 'str', 'propagate_to_tenant': 'bool', + 'assignee': 'AlarmAssignee', 'propagate_relation_types': 'list[str]', - 'originator_name': 'str' + 'status': 'str' } attribute_map = { @@ -58,20 +64,26 @@ class AlarmInfo(object): 'type': 'type', 'originator': 'originator', 'severity': 'severity', - 'status': 'status', + 'acknowledged': 'acknowledged', + 'cleared': 'cleared', + 'assignee_id': 'assigneeId', 'start_ts': 'startTs', 'end_ts': 'endTs', 'ack_ts': 'ackTs', 'clear_ts': 'clearTs', + 'assign_ts': 'assignTs', 'details': 'details', 'propagate': 'propagate', + 'originator_name': 'originatorName', 'propagate_to_owner': 'propagateToOwner', + 'originator_label': 'originatorLabel', 'propagate_to_tenant': 'propagateToTenant', + 'assignee': 'assignee', 'propagate_relation_types': 'propagateRelationTypes', - 'originator_name': 'originatorName' + 'status': 'status' } - def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, status=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, details=None, propagate=None, propagate_to_owner=None, propagate_to_tenant=None, propagate_relation_types=None, originator_name=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, acknowledged=None, cleared=None, assignee_id=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, assign_ts=None, details=None, propagate=None, originator_name=None, propagate_to_owner=None, originator_label=None, propagate_to_tenant=None, assignee=None, propagate_relation_types=None, status=None): # noqa: E501 """AlarmInfo - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None @@ -81,17 +93,23 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self._type = None self._originator = None self._severity = None - self._status = None + self._acknowledged = None + self._cleared = None + self._assignee_id = None self._start_ts = None self._end_ts = None self._ack_ts = None self._clear_ts = None + self._assign_ts = None self._details = None self._propagate = None + self._originator_name = None self._propagate_to_owner = None + self._originator_label = None self._propagate_to_tenant = None + self._assignee = None self._propagate_relation_types = None - self._originator_name = None + self._status = None self.discriminator = None if id is not None: self.id = id @@ -105,7 +123,10 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.type = type self.originator = originator self.severity = severity - self.status = status + self.acknowledged = acknowledged + self.cleared = cleared + if assignee_id is not None: + self.assignee_id = assignee_id if start_ts is not None: self.start_ts = start_ts if end_ts is not None: @@ -114,18 +135,25 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.ack_ts = ack_ts if clear_ts is not None: self.clear_ts = clear_ts + if assign_ts is not None: + self.assign_ts = assign_ts if details is not None: self.details = details if propagate is not None: self.propagate = propagate + if originator_name is not None: + self.originator_name = originator_name if propagate_to_owner is not None: self.propagate_to_owner = propagate_to_owner + if originator_label is not None: + self.originator_label = originator_label if propagate_to_tenant is not None: self.propagate_to_tenant = propagate_to_tenant + if assignee is not None: + self.assignee = assignee if propagate_relation_types is not None: self.propagate_relation_types = propagate_relation_types - if originator_name is not None: - self.originator_name = originator_name + self.status = status @property def id(self): @@ -318,35 +346,75 @@ def severity(self, severity): self._severity = severity @property - def status(self): - """Gets the status of this AlarmInfo. # noqa: E501 + def acknowledged(self): + """Gets the acknowledged of this AlarmInfo. # noqa: E501 - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :return: The status of this AlarmInfo. # noqa: E501 - :rtype: str + :return: The acknowledged of this AlarmInfo. # noqa: E501 + :rtype: bool """ - return self._status + return self._acknowledged - @status.setter - def status(self, status): - """Sets the status of this AlarmInfo. + @acknowledged.setter + def acknowledged(self, acknowledged): + """Sets the acknowledged of this AlarmInfo. - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :param status: The status of this AlarmInfo. # noqa: E501 - :type: str + :param acknowledged: The acknowledged of this AlarmInfo. # noqa: E501 + :type: bool """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) + if acknowledged is None: + raise ValueError("Invalid value for `acknowledged`, must not be `None`") # noqa: E501 - self._status = status + self._acknowledged = acknowledged + + @property + def cleared(self): + """Gets the cleared of this AlarmInfo. # noqa: E501 + + Cleared # noqa: E501 + + :return: The cleared of this AlarmInfo. # noqa: E501 + :rtype: bool + """ + return self._cleared + + @cleared.setter + def cleared(self, cleared): + """Sets the cleared of this AlarmInfo. + + Cleared # noqa: E501 + + :param cleared: The cleared of this AlarmInfo. # noqa: E501 + :type: bool + """ + if cleared is None: + raise ValueError("Invalid value for `cleared`, must not be `None`") # noqa: E501 + + self._cleared = cleared + + @property + def assignee_id(self): + """Gets the assignee_id of this AlarmInfo. # noqa: E501 + + + :return: The assignee_id of this AlarmInfo. # noqa: E501 + :rtype: UserId + """ + return self._assignee_id + + @assignee_id.setter + def assignee_id(self, assignee_id): + """Sets the assignee_id of this AlarmInfo. + + + :param assignee_id: The assignee_id of this AlarmInfo. # noqa: E501 + :type: UserId + """ + + self._assignee_id = assignee_id @property def start_ts(self): @@ -440,6 +508,29 @@ def clear_ts(self, clear_ts): self._clear_ts = clear_ts + @property + def assign_ts(self): + """Gets the assign_ts of this AlarmInfo. # noqa: E501 + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :return: The assign_ts of this AlarmInfo. # noqa: E501 + :rtype: int + """ + return self._assign_ts + + @assign_ts.setter + def assign_ts(self, assign_ts): + """Sets the assign_ts of this AlarmInfo. + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :param assign_ts: The assign_ts of this AlarmInfo. # noqa: E501 + :type: int + """ + + self._assign_ts = assign_ts + @property def details(self): """Gets the details of this AlarmInfo. # noqa: E501 @@ -484,6 +575,29 @@ def propagate(self, propagate): self._propagate = propagate + @property + def originator_name(self): + """Gets the originator_name of this AlarmInfo. # noqa: E501 + + Alarm originator name # noqa: E501 + + :return: The originator_name of this AlarmInfo. # noqa: E501 + :rtype: str + """ + return self._originator_name + + @originator_name.setter + def originator_name(self, originator_name): + """Sets the originator_name of this AlarmInfo. + + Alarm originator name # noqa: E501 + + :param originator_name: The originator_name of this AlarmInfo. # noqa: E501 + :type: str + """ + + self._originator_name = originator_name + @property def propagate_to_owner(self): """Gets the propagate_to_owner of this AlarmInfo. # noqa: E501 @@ -507,6 +621,29 @@ def propagate_to_owner(self, propagate_to_owner): self._propagate_to_owner = propagate_to_owner + @property + def originator_label(self): + """Gets the originator_label of this AlarmInfo. # noqa: E501 + + Alarm originator label # noqa: E501 + + :return: The originator_label of this AlarmInfo. # noqa: E501 + :rtype: str + """ + return self._originator_label + + @originator_label.setter + def originator_label(self, originator_label): + """Sets the originator_label of this AlarmInfo. + + Alarm originator label # noqa: E501 + + :param originator_label: The originator_label of this AlarmInfo. # noqa: E501 + :type: str + """ + + self._originator_label = originator_label + @property def propagate_to_tenant(self): """Gets the propagate_to_tenant of this AlarmInfo. # noqa: E501 @@ -530,6 +667,27 @@ def propagate_to_tenant(self, propagate_to_tenant): self._propagate_to_tenant = propagate_to_tenant + @property + def assignee(self): + """Gets the assignee of this AlarmInfo. # noqa: E501 + + + :return: The assignee of this AlarmInfo. # noqa: E501 + :rtype: AlarmAssignee + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this AlarmInfo. + + + :param assignee: The assignee of this AlarmInfo. # noqa: E501 + :type: AlarmAssignee + """ + + self._assignee = assignee + @property def propagate_relation_types(self): """Gets the propagate_relation_types of this AlarmInfo. # noqa: E501 @@ -554,27 +712,35 @@ def propagate_relation_types(self, propagate_relation_types): self._propagate_relation_types = propagate_relation_types @property - def originator_name(self): - """Gets the originator_name of this AlarmInfo. # noqa: E501 + def status(self): + """Gets the status of this AlarmInfo. # noqa: E501 - Alarm originator name # noqa: E501 + status of the Alarm # noqa: E501 - :return: The originator_name of this AlarmInfo. # noqa: E501 + :return: The status of this AlarmInfo. # noqa: E501 :rtype: str """ - return self._originator_name + return self._status - @originator_name.setter - def originator_name(self, originator_name): - """Sets the originator_name of this AlarmInfo. + @status.setter + def status(self, status): + """Sets the status of this AlarmInfo. - Alarm originator name # noqa: E501 + status of the Alarm # noqa: E501 - :param originator_name: The originator_name of this AlarmInfo. # noqa: E501 + :param status: The status of this AlarmInfo. # noqa: E501 :type: str """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) - self._originator_name = originator_name + self._status = status def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_ce/alarm_notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/alarm_notification_rule_trigger_config.py new file mode 100644 index 00000000..d827ba02 --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_notification_rule_trigger_config.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 + +class AlarmNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'alarm_severities': 'list[str]', + 'alarm_types': 'list[str]', + 'clear_rule': 'ClearRule', + 'notify_on': 'list[str]', + 'trigger_type': 'str' + } + if hasattr(NotificationRuleTriggerConfig, "swagger_types"): + swagger_types.update(NotificationRuleTriggerConfig.swagger_types) + + attribute_map = { + 'alarm_severities': 'alarmSeverities', + 'alarm_types': 'alarmTypes', + 'clear_rule': 'clearRule', + 'notify_on': 'notifyOn', + 'trigger_type': 'triggerType' + } + if hasattr(NotificationRuleTriggerConfig, "attribute_map"): + attribute_map.update(NotificationRuleTriggerConfig.attribute_map) + + def __init__(self, alarm_severities=None, alarm_types=None, clear_rule=None, notify_on=None, trigger_type=None, *args, **kwargs): # noqa: E501 + """AlarmNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._alarm_severities = None + self._alarm_types = None + self._clear_rule = None + self._notify_on = None + self._trigger_type = None + self.discriminator = None + if alarm_severities is not None: + self.alarm_severities = alarm_severities + if alarm_types is not None: + self.alarm_types = alarm_types + if clear_rule is not None: + self.clear_rule = clear_rule + if notify_on is not None: + self.notify_on = notify_on + if trigger_type is not None: + self.trigger_type = trigger_type + NotificationRuleTriggerConfig.__init__(self, *args, **kwargs) + + @property + def alarm_severities(self): + """Gets the alarm_severities of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_severities of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_severities + + @alarm_severities.setter + def alarm_severities(self, alarm_severities): + """Sets the alarm_severities of this AlarmNotificationRuleTriggerConfig. + + + :param alarm_severities: The alarm_severities of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["CRITICAL", "INDETERMINATE", "MAJOR", "MINOR", "WARNING"] # noqa: E501 + if not set(alarm_severities).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_severities` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_severities) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_severities = alarm_severities + + @property + def alarm_types(self): + """Gets the alarm_types of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_types of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_types + + @alarm_types.setter + def alarm_types(self, alarm_types): + """Sets the alarm_types of this AlarmNotificationRuleTriggerConfig. + + + :param alarm_types: The alarm_types of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._alarm_types = alarm_types + + @property + def clear_rule(self): + """Gets the clear_rule of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The clear_rule of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :rtype: ClearRule + """ + return self._clear_rule + + @clear_rule.setter + def clear_rule(self, clear_rule): + """Sets the clear_rule of this AlarmNotificationRuleTriggerConfig. + + + :param clear_rule: The clear_rule of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :type: ClearRule + """ + + self._clear_rule = clear_rule + + @property + def notify_on(self): + """Gets the notify_on of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._notify_on + + @notify_on.setter + def notify_on(self, notify_on): + """Sets the notify_on of this AlarmNotificationRuleTriggerConfig. + + + :param notify_on: The notify_on of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACKNOWLEDGED", "CLEARED", "CREATED", "SEVERITY_CHANGED"] # noqa: E501 + if not set(notify_on).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `notify_on` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(notify_on) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._notify_on = notify_on + + @property + def trigger_type(self): + """Gets the trigger_type of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this AlarmNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/alarm_rule.py b/tb_rest_client/models/models_ce/alarm_rule.py index 987acdc8..f4027117 100644 --- a/tb_rest_client/models/models_ce/alarm_rule.py +++ b/tb_rest_client/models/models_ce/alarm_rule.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmRule(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/alarm_schedule.py b/tb_rest_client/models/models_ce/alarm_schedule.py index bf35d5a8..030699d0 100644 --- a/tb_rest_client/models/models_ce/alarm_schedule.py +++ b/tb_rest_client/models/models_ce/alarm_schedule.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmSchedule(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/all_users_filter.py b/tb_rest_client/models/models_ce/all_users_filter.py new file mode 100644 index 00000000..1c1c881e --- /dev/null +++ b/tb_rest_client/models/models_ce/all_users_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AllUsersFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """AllUsersFilter - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AllUsersFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AllUsersFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/allow_create_new_devices_device_profile_provision_configuration.py b/tb_rest_client/models/models_ce/allow_create_new_devices_device_profile_provision_configuration.py index 54521b79..61067269 100644 --- a/tb_rest_client/models/models_ce/allow_create_new_devices_device_profile_provision_configuration.py +++ b/tb_rest_client/models/models_ce/allow_create_new_devices_device_profile_provision_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AllowCreateNewDevicesDeviceProfileProvisionConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/any_time_schedule.py b/tb_rest_client/models/models_ce/any_time_schedule.py index e127f3ed..137a7d6e 100644 --- a/tb_rest_client/models/models_ce/any_time_schedule.py +++ b/tb_rest_client/models/models_ce/any_time_schedule.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AnyTimeSchedule(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/api_usage_limit_notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/api_usage_limit_notification_rule_trigger_config.py new file mode 100644 index 00000000..21ec6bcc --- /dev/null +++ b/tb_rest_client/models/models_ce/api_usage_limit_notification_rule_trigger_config.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 + +class ApiUsageLimitNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_features': 'list[str]', + 'notify_on': 'list[str]', + 'trigger_type': 'str' + } + if hasattr(NotificationRuleTriggerConfig, "swagger_types"): + swagger_types.update(NotificationRuleTriggerConfig.swagger_types) + + attribute_map = { + 'api_features': 'apiFeatures', + 'notify_on': 'notifyOn', + 'trigger_type': 'triggerType' + } + if hasattr(NotificationRuleTriggerConfig, "attribute_map"): + attribute_map.update(NotificationRuleTriggerConfig.attribute_map) + + def __init__(self, api_features=None, notify_on=None, trigger_type=None, *args, **kwargs): # noqa: E501 + """ApiUsageLimitNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._api_features = None + self._notify_on = None + self._trigger_type = None + self.discriminator = None + if api_features is not None: + self.api_features = api_features + if notify_on is not None: + self.notify_on = notify_on + if trigger_type is not None: + self.trigger_type = trigger_type + NotificationRuleTriggerConfig.__init__(self, *args, **kwargs) + + @property + def api_features(self): + """Gets the api_features of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The api_features of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._api_features + + @api_features.setter + def api_features(self, api_features): + """Sets the api_features of this ApiUsageLimitNotificationRuleTriggerConfig. + + + :param api_features: The api_features of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ALARM", "DB", "EMAIL", "JS", "RE", "SMS", "TRANSPORT"] # noqa: E501 + if not set(api_features).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `api_features` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(api_features) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._api_features = api_features + + @property + def notify_on(self): + """Gets the notify_on of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._notify_on + + @notify_on.setter + def notify_on(self, notify_on): + """Sets the notify_on of this ApiUsageLimitNotificationRuleTriggerConfig. + + + :param notify_on: The notify_on of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["DISABLED", "ENABLED", "WARNING"] # noqa: E501 + if not set(notify_on).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `notify_on` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(notify_on) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._notify_on = notify_on + + @property + def trigger_type(self): + """Gets the trigger_type of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this ApiUsageLimitNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ApiUsageLimitNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiUsageLimitNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/api_usage_state_filter.py b/tb_rest_client/models/models_ce/api_usage_state_filter.py index e9612920..c5e22348 100644 --- a/tb_rest_client/models/models_ce/api_usage_state_filter.py +++ b/tb_rest_client/models/models_ce/api_usage_state_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,11 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class ApiUsageStateFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/asset.py b/tb_rest_client/models/models_ce/asset.py index f7555976..08152e98 100644 --- a/tb_rest_client/models/models_ce/asset.py +++ b/tb_rest_client/models/models_ce/asset.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Asset(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class Asset(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'AssetId', 'id': 'AssetId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -36,11 +35,11 @@ class Asset(object): 'name': 'str', 'type': 'str', 'label': 'str', + 'asset_profile_id': 'AssetProfileId', 'additional_info': 'JsonNode' } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -48,12 +47,12 @@ class Asset(object): 'name': 'name', 'type': 'type', 'label': 'label', + 'asset_profile_id': 'assetProfileId', 'additional_info': 'additionalInfo' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, label=None, additional_info=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, label=None, asset_profile_id=None, additional_info=None): # noqa: E501 """Asset - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -61,10 +60,9 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._name = None self._type = None self._label = None + self._asset_profile_id = None self._additional_info = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -74,33 +72,12 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if customer_id is not None: self.customer_id = customer_id self.name = name + self.label = label + self.asset_profile_id = asset_profile_id self.type = type - if label is not None: - self.label = label if additional_info is not None: self.additional_info = additional_info - @property - def external_id(self): - """Gets the external_id of this Asset. # noqa: E501 - - - :return: The external_id of this Asset. # noqa: E501 - :rtype: AssetId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Asset. - - - :param external_id: The external_id of this Asset. # noqa: E501 - :type: AssetId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this Asset. # noqa: E501 @@ -232,8 +209,6 @@ def type(self, type): :param type: The type of this Asset. # noqa: E501 :type: str """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @@ -257,11 +232,32 @@ def label(self, label): :param label: The label of this Asset. # noqa: E501 :type: str """ - if label is None: - self._label = None self._label = label + @property + def asset_profile_id(self): + """Gets the asset_profile_id of this Asset. # noqa: E501 + + + :return: The asset_profile_id of this Asset. # noqa: E501 + :rtype: AssetProfileId + """ + return self._asset_profile_id + + @asset_profile_id.setter + def asset_profile_id(self, asset_profile_id): + """Sets the asset_profile_id of this Asset. + + + :param asset_profile_id: The asset_profile_id of this Asset. # noqa: E501 + :type: AssetProfileId + """ + if asset_profile_id is None: + raise ValueError("Invalid value for `asset_profile_id`, must not be `None`") # noqa: E501 + + self._asset_profile_id = asset_profile_id + @property def additional_info(self): """Gets the additional_info of this Asset. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/asset_id.py b/tb_rest_client/models/models_ce/asset_id.py index a3ec31fe..cbbcbc83 100644 --- a/tb_rest_client/models/models_ce/asset_id.py +++ b/tb_rest_client/models/models_ce/asset_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AssetId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/asset_info.py b/tb_rest_client/models/models_ce/asset_info.py index aa6efe85..2b772ed2 100644 --- a/tb_rest_client/models/models_ce/asset_info.py +++ b/tb_rest_client/models/models_ce/asset_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AssetInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class AssetInfo(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'AssetId', 'id': 'AssetId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -36,13 +35,14 @@ class AssetInfo(object): 'name': 'str', 'type': 'str', 'label': 'str', + 'asset_profile_id': 'AssetProfileId', 'additional_info': 'JsonNode', 'customer_title': 'str', - 'customer_is_public': 'bool' + 'customer_is_public': 'bool', + 'asset_profile_name': 'str' } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -50,14 +50,15 @@ class AssetInfo(object): 'name': 'name', 'type': 'type', 'label': 'label', + 'asset_profile_id': 'assetProfileId', 'additional_info': 'additionalInfo', 'customer_title': 'customerTitle', - 'customer_is_public': 'customerIsPublic' + 'customer_is_public': 'customerIsPublic', + 'asset_profile_name': 'assetProfileName' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, label=None, additional_info=None, customer_title=None, customer_is_public=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, label=None, asset_profile_id=None, additional_info=None, customer_title=None, customer_is_public=None, asset_profile_name=None): # noqa: E501 """AssetInfo - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -65,12 +66,12 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._name = None self._type = None self._label = None + self._asset_profile_id = None self._additional_info = None self._customer_title = None self._customer_is_public = None + self._asset_profile_name = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -81,35 +82,16 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self.customer_id = customer_id self.name = name self.type = type - if label is not None: - self.label = label + self.label = label + self.asset_profile_id = asset_profile_id if additional_info is not None: self.additional_info = additional_info if customer_title is not None: self.customer_title = customer_title if customer_is_public is not None: self.customer_is_public = customer_is_public - - @property - def external_id(self): - """Gets the external_id of this AssetInfo. # noqa: E501 - - - :return: The external_id of this AssetInfo. # noqa: E501 - :rtype: AssetId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this AssetInfo. - - - :param external_id: The external_id of this AssetInfo. # noqa: E501 - :type: AssetId - """ - - self._external_id = external_id + if asset_profile_name is not None: + self.asset_profile_name = asset_profile_name @property def id(self): @@ -267,11 +249,32 @@ def label(self, label): :param label: The label of this AssetInfo. # noqa: E501 :type: str """ - if label is None: - self._label = None self._label = label + @property + def asset_profile_id(self): + """Gets the asset_profile_id of this AssetInfo. # noqa: E501 + + + :return: The asset_profile_id of this AssetInfo. # noqa: E501 + :rtype: AssetProfileId + """ + return self._asset_profile_id + + @asset_profile_id.setter + def asset_profile_id(self, asset_profile_id): + """Sets the asset_profile_id of this AssetInfo. + + + :param asset_profile_id: The asset_profile_id of this AssetInfo. # noqa: E501 + :type: AssetProfileId + """ + if asset_profile_id is None: + raise ValueError("Invalid value for `asset_profile_id`, must not be `None`") # noqa: E501 + + self._asset_profile_id = asset_profile_id + @property def additional_info(self): """Gets the additional_info of this AssetInfo. # noqa: E501 @@ -339,6 +342,29 @@ def customer_is_public(self, customer_is_public): self._customer_is_public = customer_is_public + @property + def asset_profile_name(self): + """Gets the asset_profile_name of this AssetInfo. # noqa: E501 + + Name of the corresponding Asset Profile. # noqa: E501 + + :return: The asset_profile_name of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._asset_profile_name + + @asset_profile_name.setter + def asset_profile_name(self, asset_profile_name): + """Sets the asset_profile_name of this AssetInfo. + + Name of the corresponding Asset Profile. # noqa: E501 + + :param asset_profile_name: The asset_profile_name of this AssetInfo. # noqa: E501 + :type: str + """ + + self._asset_profile_name = asset_profile_name + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_ce/asset_profile.py b/tb_rest_client/models/models_ce/asset_profile.py new file mode 100644 index 00000000..74f7204b --- /dev/null +++ b/tb_rest_client/models/models_ce/asset_profile.py @@ -0,0 +1,382 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AssetProfile(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'AssetProfileId', + 'created_time': 'int', + 'tenant_id': 'TenantId', + 'name': 'str', + 'default': 'bool', + 'default_dashboard_id': 'DashboardId', + 'default_rule_chain_id': 'RuleChainId', + 'default_queue_name': 'str', + 'description': 'str', + 'image': 'str', + 'default_edge_rule_chain_id': 'RuleChainId' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'tenant_id': 'tenantId', + 'name': 'name', + 'default': 'default', + 'default_dashboard_id': 'defaultDashboardId', + 'default_rule_chain_id': 'defaultRuleChainId', + 'default_queue_name': 'defaultQueueName', + 'description': 'description', + 'image': 'image', + 'default_edge_rule_chain_id': 'defaultEdgeRuleChainId' + } + + def __init__(self, id=None, created_time=None, tenant_id=None, name=None, default=None, default_dashboard_id=None, default_rule_chain_id=None, default_queue_name=None, description=None, image=None, default_edge_rule_chain_id=None): # noqa: E501 + """AssetProfile - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._tenant_id = None + self._name = None + self._default = None + self._default_dashboard_id = None + self._default_rule_chain_id = None + self._default_queue_name = None + self._description = None + self._image = None + self._default_edge_rule_chain_id = None + self.discriminator = None + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if tenant_id is not None: + self.tenant_id = tenant_id + if name is not None: + self.name = name + if default is not None: + self.default = default + if default_dashboard_id is not None: + self.default_dashboard_id = default_dashboard_id + if default_rule_chain_id is not None: + self.default_rule_chain_id = default_rule_chain_id + if default_queue_name is not None: + self.default_queue_name = default_queue_name + if description is not None: + self.description = description + if image is not None: + self.image = image + if default_edge_rule_chain_id is not None: + self.default_edge_rule_chain_id = default_edge_rule_chain_id + + @property + def id(self): + """Gets the id of this AssetProfile. # noqa: E501 + + + :return: The id of this AssetProfile. # noqa: E501 + :rtype: AssetProfileId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssetProfile. + + + :param id: The id of this AssetProfile. # noqa: E501 + :type: AssetProfileId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this AssetProfile. # noqa: E501 + + Timestamp of the profile creation, in milliseconds # noqa: E501 + + :return: The created_time of this AssetProfile. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this AssetProfile. + + Timestamp of the profile creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this AssetProfile. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def tenant_id(self): + """Gets the tenant_id of this AssetProfile. # noqa: E501 + + + :return: The tenant_id of this AssetProfile. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this AssetProfile. + + + :param tenant_id: The tenant_id of this AssetProfile. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def name(self): + """Gets the name of this AssetProfile. # noqa: E501 + + Unique Asset Profile Name in scope of Tenant. # noqa: E501 + + :return: The name of this AssetProfile. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AssetProfile. + + Unique Asset Profile Name in scope of Tenant. # noqa: E501 + + :param name: The name of this AssetProfile. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def default(self): + """Gets the default of this AssetProfile. # noqa: E501 + + Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation. # noqa: E501 + + :return: The default of this AssetProfile. # noqa: E501 + :rtype: bool + """ + return self._default + + @default.setter + def default(self, default): + """Sets the default of this AssetProfile. + + Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation. # noqa: E501 + + :param default: The default of this AssetProfile. # noqa: E501 + :type: bool + """ + + self._default = default + + @property + def default_dashboard_id(self): + """Gets the default_dashboard_id of this AssetProfile. # noqa: E501 + + + :return: The default_dashboard_id of this AssetProfile. # noqa: E501 + :rtype: DashboardId + """ + return self._default_dashboard_id + + @default_dashboard_id.setter + def default_dashboard_id(self, default_dashboard_id): + """Sets the default_dashboard_id of this AssetProfile. + + + :param default_dashboard_id: The default_dashboard_id of this AssetProfile. # noqa: E501 + :type: DashboardId + """ + + self._default_dashboard_id = default_dashboard_id + + @property + def default_rule_chain_id(self): + """Gets the default_rule_chain_id of this AssetProfile. # noqa: E501 + + + :return: The default_rule_chain_id of this AssetProfile. # noqa: E501 + :rtype: RuleChainId + """ + return self._default_rule_chain_id + + @default_rule_chain_id.setter + def default_rule_chain_id(self, default_rule_chain_id): + """Sets the default_rule_chain_id of this AssetProfile. + + + :param default_rule_chain_id: The default_rule_chain_id of this AssetProfile. # noqa: E501 + :type: RuleChainId + """ + + self._default_rule_chain_id = default_rule_chain_id + + @property + def default_queue_name(self): + """Gets the default_queue_name of this AssetProfile. # noqa: E501 + + Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages. # noqa: E501 + + :return: The default_queue_name of this AssetProfile. # noqa: E501 + :rtype: str + """ + return self._default_queue_name + + @default_queue_name.setter + def default_queue_name(self, default_queue_name): + """Sets the default_queue_name of this AssetProfile. + + Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages. # noqa: E501 + + :param default_queue_name: The default_queue_name of this AssetProfile. # noqa: E501 + :type: str + """ + + self._default_queue_name = default_queue_name + + @property + def description(self): + """Gets the description of this AssetProfile. # noqa: E501 + + Asset Profile description. # noqa: E501 + + :return: The description of this AssetProfile. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this AssetProfile. + + Asset Profile description. # noqa: E501 + + :param description: The description of this AssetProfile. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def image(self): + """Gets the image of this AssetProfile. # noqa: E501 + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 + + :return: The image of this AssetProfile. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this AssetProfile. + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 + + :param image: The image of this AssetProfile. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def default_edge_rule_chain_id(self): + """Gets the default_edge_rule_chain_id of this AssetProfile. # noqa: E501 + + + :return: The default_edge_rule_chain_id of this AssetProfile. # noqa: E501 + :rtype: RuleChainId + """ + return self._default_edge_rule_chain_id + + @default_edge_rule_chain_id.setter + def default_edge_rule_chain_id(self, default_edge_rule_chain_id): + """Sets the default_edge_rule_chain_id of this AssetProfile. + + + :param default_edge_rule_chain_id: The default_edge_rule_chain_id of this AssetProfile. # noqa: E501 + :type: RuleChainId + """ + + self._default_edge_rule_chain_id = default_edge_rule_chain_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AssetProfile, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetProfile): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/asset_profile_id.py b/tb_rest_client/models/models_ce/asset_profile_id.py new file mode 100644 index 00000000..43abc018 --- /dev/null +++ b/tb_rest_client/models/models_ce/asset_profile_id.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AssetProfileId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """AssetProfileId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this AssetProfileId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this AssetProfileId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssetProfileId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this AssetProfileId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this AssetProfileId. # noqa: E501 + + string # noqa: E501 + + :return: The entity_type of this AssetProfileId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this AssetProfileId. + + string # noqa: E501 + + :param entity_type: The entity_type of this AssetProfileId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ASSET_PROFILE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AssetProfileId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetProfileId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/asset_profile_info.py b/tb_rest_client/models/models_ce/asset_profile_info.py new file mode 100644 index 00000000..7ce37ff7 --- /dev/null +++ b/tb_rest_client/models/models_ce/asset_profile_info.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AssetProfileInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'EntityId', + 'name': 'str', + 'image': 'str', + 'default_dashboard_id': 'DashboardId', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'image': 'image', + 'default_dashboard_id': 'defaultDashboardId', + 'tenant_id': 'tenantId' + } + + def __init__(self, id=None, name=None, image=None, default_dashboard_id=None, tenant_id=None): # noqa: E501 + """AssetProfileInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._image = None + self._default_dashboard_id = None + self._tenant_id = None + self.discriminator = None + if id is not None: + self.id = id + if name is not None: + self.name = name + if image is not None: + self.image = image + if default_dashboard_id is not None: + self.default_dashboard_id = default_dashboard_id + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def id(self): + """Gets the id of this AssetProfileInfo. # noqa: E501 + + + :return: The id of this AssetProfileInfo. # noqa: E501 + :rtype: EntityId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssetProfileInfo. + + + :param id: The id of this AssetProfileInfo. # noqa: E501 + :type: EntityId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this AssetProfileInfo. # noqa: E501 + + Entity Name # noqa: E501 + + :return: The name of this AssetProfileInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AssetProfileInfo. + + Entity Name # noqa: E501 + + :param name: The name of this AssetProfileInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def image(self): + """Gets the image of this AssetProfileInfo. # noqa: E501 + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 + + :return: The image of this AssetProfileInfo. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this AssetProfileInfo. + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 + + :param image: The image of this AssetProfileInfo. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def default_dashboard_id(self): + """Gets the default_dashboard_id of this AssetProfileInfo. # noqa: E501 + + + :return: The default_dashboard_id of this AssetProfileInfo. # noqa: E501 + :rtype: DashboardId + """ + return self._default_dashboard_id + + @default_dashboard_id.setter + def default_dashboard_id(self, default_dashboard_id): + """Sets the default_dashboard_id of this AssetProfileInfo. + + + :param default_dashboard_id: The default_dashboard_id of this AssetProfileInfo. # noqa: E501 + :type: DashboardId + """ + + self._default_dashboard_id = default_dashboard_id + + @property + def tenant_id(self): + """Gets the tenant_id of this AssetProfileInfo. # noqa: E501 + + + :return: The tenant_id of this AssetProfileInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this AssetProfileInfo. + + + :param tenant_id: The tenant_id of this AssetProfileInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AssetProfileInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetProfileInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/asset_search_query.py b/tb_rest_client/models/models_ce/asset_search_query.py index fbd59382..3d0a552e 100644 --- a/tb_rest_client/models/models_ce/asset_search_query.py +++ b/tb_rest_client/models/models_ce/asset_search_query.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AssetSearchQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/asset_search_query_filter.py b/tb_rest_client/models/models_ce/asset_search_query_filter.py index ce9ad956..9ccf6a90 100644 --- a/tb_rest_client/models/models_ce/asset_search_query_filter.py +++ b/tb_rest_client/models/models_ce/asset_search_query_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,11 @@ import re # noqa: F401 import six -from tb_rest_client.models.models_ce import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class AssetSearchQueryFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/asset_type_filter.py b/tb_rest_client/models/models_ce/asset_type_filter.py index c2878c7d..38b6fdc3 100644 --- a/tb_rest_client/models/models_ce/asset_type_filter.py +++ b/tb_rest_client/models/models_ce/asset_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,11 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class AssetTypeFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. """ """ @@ -29,27 +30,27 @@ class AssetTypeFilter(EntityFilter): """ swagger_types = { 'asset_name_filter': 'str', - 'asset_type': 'str' + 'asset_types': 'list[str]' } if hasattr(EntityFilter, "swagger_types"): swagger_types.update(EntityFilter.swagger_types) attribute_map = { 'asset_name_filter': 'assetNameFilter', - 'asset_type': 'assetType' + 'asset_types': 'assetTypes' } if hasattr(EntityFilter, "attribute_map"): attribute_map.update(EntityFilter.attribute_map) - def __init__(self, asset_name_filter=None, asset_type=None, *args, **kwargs): # noqa: E501 + def __init__(self, asset_name_filter=None, asset_types=None, *args, **kwargs): # noqa: E501 """AssetTypeFilter - a model defined in Swagger""" # noqa: E501 self._asset_name_filter = None - self._asset_type = None + self._asset_types = None self.discriminator = None if asset_name_filter is not None: self.asset_name_filter = asset_name_filter - if asset_type is not None: - self.asset_type = asset_type + if asset_types is not None: + self.asset_types = asset_types EntityFilter.__init__(self, *args, **kwargs) @property @@ -74,25 +75,25 @@ def asset_name_filter(self, asset_name_filter): self._asset_name_filter = asset_name_filter @property - def asset_type(self): - """Gets the asset_type of this AssetTypeFilter. # noqa: E501 + def asset_types(self): + """Gets the asset_types of this AssetTypeFilter. # noqa: E501 - :return: The asset_type of this AssetTypeFilter. # noqa: E501 - :rtype: str + :return: The asset_types of this AssetTypeFilter. # noqa: E501 + :rtype: list[str] """ - return self._asset_type + return self._asset_types - @asset_type.setter - def asset_type(self, asset_type): - """Sets the asset_type of this AssetTypeFilter. + @asset_types.setter + def asset_types(self, asset_types): + """Sets the asset_types of this AssetTypeFilter. - :param asset_type: The asset_type of this AssetTypeFilter. # noqa: E501 - :type: str + :param asset_types: The asset_types of this AssetTypeFilter. # noqa: E501 + :type: list[str] """ - self._asset_type = asset_type + self._asset_types = asset_types def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_ce/atomic_integer.py b/tb_rest_client/models/models_ce/atomic_integer.py index 03ae5492..c255518d 100644 --- a/tb_rest_client/models/models_ce/atomic_integer.py +++ b/tb_rest_client/models/models_ce/atomic_integer.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AtomicInteger(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/attribute_export_data.py b/tb_rest_client/models/models_ce/attribute_export_data.py index d866a9e2..a0a40385 100644 --- a/tb_rest_client/models/models_ce/attribute_export_data.py +++ b/tb_rest_client/models/models_ce/attribute_export_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AttributeExportData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/attributes_entity_view.py b/tb_rest_client/models/models_ce/attributes_entity_view.py index 0278c70c..015f415d 100644 --- a/tb_rest_client/models/models_ce/attributes_entity_view.py +++ b/tb_rest_client/models/models_ce/attributes_entity_view.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AttributesEntityView(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/audit_log.py b/tb_rest_client/models/models_ce/audit_log.py index c7e06f45..ef4a5c68 100644 --- a/tb_rest_client/models/models_ce/audit_log.py +++ b/tb_rest_client/models/models_ce/audit_log.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AuditLog(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -291,7 +291,7 @@ def action_type(self, action_type): :param action_type: The action_type of this AuditLog. # noqa: E501 :type: str """ - allowed_values = ["ACTIVATED", "ADDED", "ALARM_ACK", "ALARM_CLEAR", "ALARM_DELETE", "ASSIGNED_FROM_TENANT", "ASSIGNED_TO_CUSTOMER", "ASSIGNED_TO_EDGE", "ASSIGNED_TO_TENANT", "ATTRIBUTES_DELETED", "ATTRIBUTES_READ", "ATTRIBUTES_UPDATED", "CREDENTIALS_READ", "CREDENTIALS_UPDATED", "DELETED", "LOCKOUT", "LOGIN", "LOGOUT", "PROVISION_FAILURE", "PROVISION_SUCCESS", "RELATIONS_DELETED", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "RPC_CALL", "SUSPENDED", "TIMESERIES_DELETED", "TIMESERIES_UPDATED", "UNASSIGNED_FROM_CUSTOMER", "UNASSIGNED_FROM_EDGE", "UPDATED"] # noqa: E501 + allowed_values = ["ACTIVATED", "ADDED", "ADDED_COMMENT", "ALARM_ACK", "ALARM_ASSIGNED", "ALARM_CLEAR", "ALARM_DELETE", "ALARM_UNASSIGNED", "ASSIGNED_FROM_TENANT", "ASSIGNED_TO_CUSTOMER", "ASSIGNED_TO_EDGE", "ASSIGNED_TO_TENANT", "ATTRIBUTES_DELETED", "ATTRIBUTES_READ", "ATTRIBUTES_UPDATED", "CREDENTIALS_READ", "CREDENTIALS_UPDATED", "DELETED", "DELETED_COMMENT", "LOCKOUT", "LOGIN", "LOGOUT", "PROVISION_FAILURE", "PROVISION_SUCCESS", "RELATIONS_DELETED", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "RPC_CALL", "SUSPENDED", "TIMESERIES_DELETED", "TIMESERIES_UPDATED", "UNASSIGNED_FROM_CUSTOMER", "UNASSIGNED_FROM_EDGE", "UPDATED", "UPDATED_COMMENT"] # noqa: E501 if action_type not in allowed_values: raise ValueError( "Invalid value for `action_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/audit_log_id.py b/tb_rest_client/models/models_ce/audit_log_id.py index 180d6f1c..f66c1c61 100644 --- a/tb_rest_client/models/models_ce/audit_log_id.py +++ b/tb_rest_client/models/models_ce/audit_log_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AuditLogId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,13 +28,11 @@ class AuditLogId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_ce/auto_version_create_config.py b/tb_rest_client/models/models_ce/auto_version_create_config.py index 4d83883b..f98e8741 100644 --- a/tb_rest_client/models/models_ce/auto_version_create_config.py +++ b/tb_rest_client/models/models_ce/auto_version_create_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AutoVersionCreateConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/aws_sns_sms_provider_configuration.py b/tb_rest_client/models/models_ce/aws_sns_sms_provider_configuration.py index 66a58f1c..fafefda2 100644 --- a/tb_rest_client/models/models_ce/aws_sns_sms_provider_configuration.py +++ b/tb_rest_client/models/models_ce/aws_sns_sms_provider_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 class AwsSnsSmsProviderConfiguration(SmsProviderConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/backup_code_two_fa_account_config.py b/tb_rest_client/models/models_ce/backup_code_two_fa_account_config.py index 39b33ab6..824143a4 100644 --- a/tb_rest_client/models/models_ce/backup_code_two_fa_account_config.py +++ b/tb_rest_client/models/models_ce/backup_code_two_fa_account_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BackupCodeTwoFaAccountConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/backup_code_two_fa_provider_config.py b/tb_rest_client/models/models_ce/backup_code_two_fa_provider_config.py index 5bac7021..f47233f3 100644 --- a/tb_rest_client/models/models_ce/backup_code_two_fa_provider_config.py +++ b/tb_rest_client/models/models_ce/backup_code_two_fa_provider_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BackupCodeTwoFaProviderConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/boolean_filter_predicate.py b/tb_rest_client/models/models_ce/boolean_filter_predicate.py index e8f4d8a6..e718230f 100644 --- a/tb_rest_client/models/models_ce/boolean_filter_predicate.py +++ b/tb_rest_client/models/models_ce/boolean_filter_predicate.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 +from tb_rest_client.models.models_ce.key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 class BooleanFilterPredicate(KeyFilterPredicate): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/bootstrap_configuration.py b/tb_rest_client/models/models_ce/bootstrap_configuration.py deleted file mode 100644 index b19c697f..00000000 --- a/tb_rest_client/models/models_ce/bootstrap_configuration.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.3.3-SNAPSHOT - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class BootstrapConfiguration(object): - """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'bootstrap_server': 'object', - 'lwm2m_server': 'object', - 'servers': 'object' - } - - attribute_map = { - 'bootstrap_server': 'bootstrapServer', - 'lwm2m_server': 'lwm2mServer', - 'servers': 'servers' - } - - def __init__(self, bootstrap_server=None, lwm2m_server=None, servers=None): # noqa: E501 - """BootstrapConfiguration - a model defined in Swagger""" # noqa: E501 - self._bootstrap_server = None - self._lwm2m_server = None - self._servers = None - self.discriminator = None - if bootstrap_server is not None: - self.bootstrap_server = bootstrap_server - if lwm2m_server is not None: - self.lwm2m_server = lwm2m_server - if servers is not None: - self.servers = servers - - @property - def bootstrap_server(self): - """Gets the bootstrap_server of this BootstrapConfiguration. # noqa: E501 - - - :return: The bootstrap_server of this BootstrapConfiguration. # noqa: E501 - :rtype: object - """ - return self._bootstrap_server - - @bootstrap_server.setter - def bootstrap_server(self, bootstrap_server): - """Sets the bootstrap_server of this BootstrapConfiguration. - - - :param bootstrap_server: The bootstrap_server of this BootstrapConfiguration. # noqa: E501 - :type: object - """ - - self._bootstrap_server = bootstrap_server - - @property - def lwm2m_server(self): - """Gets the lwm2m_server of this BootstrapConfiguration. # noqa: E501 - - - :return: The lwm2m_server of this BootstrapConfiguration. # noqa: E501 - :rtype: object - """ - return self._lwm2m_server - - @lwm2m_server.setter - def lwm2m_server(self, lwm2m_server): - """Sets the lwm2m_server of this BootstrapConfiguration. - - - :param lwm2m_server: The lwm2m_server of this BootstrapConfiguration. # noqa: E501 - :type: object - """ - - self._lwm2m_server = lwm2m_server - - @property - def servers(self): - """Gets the servers of this BootstrapConfiguration. # noqa: E501 - - - :return: The servers of this BootstrapConfiguration. # noqa: E501 - :rtype: object - """ - return self._servers - - @servers.setter - def servers(self, servers): - """Sets the servers of this BootstrapConfiguration. - - - :param servers: The servers of this BootstrapConfiguration. # noqa: E501 - :type: object - """ - - self._servers = servers - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(BootstrapConfiguration, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BootstrapConfiguration): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_ce/branch_info.py b/tb_rest_client/models/models_ce/branch_info.py index 1fb2c034..ae650ea2 100644 --- a/tb_rest_client/models/models_ce/branch_info.py +++ b/tb_rest_client/models/models_ce/branch_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BranchInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/bulk_import_request.py b/tb_rest_client/models/models_ce/bulk_import_request.py index 3c3634ec..70e33bdc 100644 --- a/tb_rest_client/models/models_ce/bulk_import_request.py +++ b/tb_rest_client/models/models_ce/bulk_import_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BulkImportRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/bulk_import_result_asset.py b/tb_rest_client/models/models_ce/bulk_import_result_asset.py index 8ffd57b5..9d138e9f 100644 --- a/tb_rest_client/models/models_ce/bulk_import_result_asset.py +++ b/tb_rest_client/models/models_ce/bulk_import_result_asset.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BulkImportResultAsset(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/bulk_import_result_device.py b/tb_rest_client/models/models_ce/bulk_import_result_device.py index fb3a8dcc..9bc963a6 100644 --- a/tb_rest_client/models/models_ce/bulk_import_result_device.py +++ b/tb_rest_client/models/models_ce/bulk_import_result_device.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BulkImportResultDevice(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/bulk_import_result_edge.py b/tb_rest_client/models/models_ce/bulk_import_result_edge.py index b7905794..2dea7ce6 100644 --- a/tb_rest_client/models/models_ce/bulk_import_result_edge.py +++ b/tb_rest_client/models/models_ce/bulk_import_result_edge.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BulkImportResultEdge(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/byte_buffer.py b/tb_rest_client/models/models_ce/byte_buffer.py index a1a892c7..4d92ddee 100644 --- a/tb_rest_client/models/models_ce/byte_buffer.py +++ b/tb_rest_client/models/models_ce/byte_buffer.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ByteBuffer(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/change_password_request.py b/tb_rest_client/models/models_ce/change_password_request.py index a4867203..5bd78d6c 100644 --- a/tb_rest_client/models/models_ce/change_password_request.py +++ b/tb_rest_client/models/models_ce/change_password_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ChangePasswordRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/check_pre_provisioned_devices_device_profile_provision_configuration.py b/tb_rest_client/models/models_ce/check_pre_provisioned_devices_device_profile_provision_configuration.py index 6ac91b7e..fc28e517 100644 --- a/tb_rest_client/models/models_ce/check_pre_provisioned_devices_device_profile_provision_configuration.py +++ b/tb_rest_client/models/models_ce/check_pre_provisioned_devices_device_profile_provision_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/claim_request.py b/tb_rest_client/models/models_ce/claim_request.py index 5f55e5b5..34fb395b 100644 --- a/tb_rest_client/models/models_ce/claim_request.py +++ b/tb_rest_client/models/models_ce/claim_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ClaimRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/clear_rule.py b/tb_rest_client/models/models_ce/clear_rule.py new file mode 100644 index 00000000..09968e1b --- /dev/null +++ b/tb_rest_client/models/models_ce/clear_rule.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ClearRule(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'alarm_statuses': 'list[str]' + } + + attribute_map = { + 'alarm_statuses': 'alarmStatuses' + } + + def __init__(self, alarm_statuses=None): # noqa: E501 + """ClearRule - a model defined in Swagger""" # noqa: E501 + self._alarm_statuses = None + self.discriminator = None + if alarm_statuses is not None: + self.alarm_statuses = alarm_statuses + + @property + def alarm_statuses(self): + """Gets the alarm_statuses of this ClearRule. # noqa: E501 + + + :return: The alarm_statuses of this ClearRule. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_statuses + + @alarm_statuses.setter + def alarm_statuses(self, alarm_statuses): + """Sets the alarm_statuses of this ClearRule. + + + :param alarm_statuses: The alarm_statuses of this ClearRule. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACK", "ACTIVE", "ANY", "CLEARED", "UNACK"] # noqa: E501 + if not set(alarm_statuses).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_statuses` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_statuses) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_statuses = alarm_statuses + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ClearRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ClearRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/client_attributes_querying_snmp_communication_config.py b/tb_rest_client/models/models_ce/client_attributes_querying_snmp_communication_config.py index 641c58b8..967ae119 100644 --- a/tb_rest_client/models/models_ce/client_attributes_querying_snmp_communication_config.py +++ b/tb_rest_client/models/models_ce/client_attributes_querying_snmp_communication_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ClientAttributesQueryingSnmpCommunicationConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/coap_device_profile_transport_configuration.py b/tb_rest_client/models/models_ce/coap_device_profile_transport_configuration.py index e4062320..dc12e58c 100644 --- a/tb_rest_client/models/models_ce/coap_device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_ce/coap_device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 class CoapDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/coap_device_transport_configuration.py b/tb_rest_client/models/models_ce/coap_device_transport_configuration.py index b641e3fc..5ee0ccb5 100644 --- a/tb_rest_client/models/models_ce/coap_device_transport_configuration.py +++ b/tb_rest_client/models/models_ce/coap_device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 class CoapDeviceTransportConfiguration(DeviceTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/coap_device_type_configuration.py b/tb_rest_client/models/models_ce/coap_device_type_configuration.py index 6c828800..a73024dc 100644 --- a/tb_rest_client/models/models_ce/coap_device_type_configuration.py +++ b/tb_rest_client/models/models_ce/coap_device_type_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CoapDeviceTypeConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/column_mapping.py b/tb_rest_client/models/models_ce/column_mapping.py index 8bdae051..7dcef387 100644 --- a/tb_rest_client/models/models_ce/column_mapping.py +++ b/tb_rest_client/models/models_ce/column_mapping.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ColumnMapping(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/comparison_ts_value.py b/tb_rest_client/models/models_ce/comparison_ts_value.py new file mode 100644 index 00000000..0abcf447 --- /dev/null +++ b/tb_rest_client/models/models_ce/comparison_ts_value.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ComparisonTsValue(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'current': 'TsValue', + 'previous': 'TsValue' + } + + attribute_map = { + 'current': 'current', + 'previous': 'previous' + } + + def __init__(self, current=None, previous=None): # noqa: E501 + """ComparisonTsValue - a model defined in Swagger""" # noqa: E501 + self._current = None + self._previous = None + self.discriminator = None + if current is not None: + self.current = current + if previous is not None: + self.previous = previous + + @property + def current(self): + """Gets the current of this ComparisonTsValue. # noqa: E501 + + + :return: The current of this ComparisonTsValue. # noqa: E501 + :rtype: TsValue + """ + return self._current + + @current.setter + def current(self, current): + """Sets the current of this ComparisonTsValue. + + + :param current: The current of this ComparisonTsValue. # noqa: E501 + :type: TsValue + """ + + self._current = current + + @property + def previous(self): + """Gets the previous of this ComparisonTsValue. # noqa: E501 + + + :return: The previous of this ComparisonTsValue. # noqa: E501 + :rtype: TsValue + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this ComparisonTsValue. + + + :param previous: The previous of this ComparisonTsValue. # noqa: E501 + :type: TsValue + """ + + self._previous = previous + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ComparisonTsValue, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ComparisonTsValue): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/complex_filter_predicate.py b/tb_rest_client/models/models_ce/complex_filter_predicate.py index c70e61e4..0743035f 100644 --- a/tb_rest_client/models/models_ce/complex_filter_predicate.py +++ b/tb_rest_client/models/models_ce/complex_filter_predicate.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 +from tb_rest_client.models.models_ce.key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 class ComplexFilterPredicate(KeyFilterPredicate): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/complex_version_create_request.py b/tb_rest_client/models/models_ce/complex_version_create_request.py index 8525c1fc..f397950f 100644 --- a/tb_rest_client/models/models_ce/complex_version_create_request.py +++ b/tb_rest_client/models/models_ce/complex_version_create_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .version_create_request import VersionCreateRequest # noqa: F401,E501 +from tb_rest_client.models.models_ce.version_create_request import VersionCreateRequest # noqa: F401,E501 class ComplexVersionCreateRequest(VersionCreateRequest): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -66,7 +66,7 @@ def __init__(self, branch=None, entity_types=None, sync_strategy=None, type=None self.type = type if version_name is not None: self.version_name = version_name - VersionCreateRequest.__init__(self,branch, type, version_name) + VersionCreateRequest.__init__(self, *args, **kwargs) @property def branch(self): diff --git a/tb_rest_client/models/models_ce/component_descriptor.py b/tb_rest_client/models/models_ce/component_descriptor.py index a37c2d3d..f08e1f8a 100644 --- a/tb_rest_client/models/models_ce/component_descriptor.py +++ b/tb_rest_client/models/models_ce/component_descriptor.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ComponentDescriptor(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -32,6 +32,7 @@ class ComponentDescriptor(object): 'created_time': 'int', 'type': 'str', 'scope': 'str', + 'clustering_mode': 'str', 'name': 'str', 'clazz': 'str', 'configuration_descriptor': 'JsonNode', @@ -43,18 +44,20 @@ class ComponentDescriptor(object): 'created_time': 'createdTime', 'type': 'type', 'scope': 'scope', + 'clustering_mode': 'clusteringMode', 'name': 'name', 'clazz': 'clazz', 'configuration_descriptor': 'configurationDescriptor', 'actions': 'actions' } - def __init__(self, id=None, created_time=None, type=None, scope=None, name=None, clazz=None, configuration_descriptor=None, actions=None): # noqa: E501 + def __init__(self, id=None, created_time=None, type=None, scope=None, clustering_mode=None, name=None, clazz=None, configuration_descriptor=None, actions=None): # noqa: E501 """ComponentDescriptor - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None self._type = None self._scope = None + self._clustering_mode = None self._name = None self._clazz = None self._configuration_descriptor = None @@ -68,6 +71,8 @@ def __init__(self, id=None, created_time=None, type=None, scope=None, name=None, self.type = type if scope is not None: self.scope = scope + if clustering_mode is not None: + self.clustering_mode = clustering_mode if name is not None: self.name = name if clazz is not None: @@ -179,6 +184,35 @@ def scope(self, scope): self._scope = scope + @property + def clustering_mode(self): + """Gets the clustering_mode of this ComponentDescriptor. # noqa: E501 + + Clustering mode of the RuleNode. This mode represents the ability to start Rule Node in multiple microservices. # noqa: E501 + + :return: The clustering_mode of this ComponentDescriptor. # noqa: E501 + :rtype: str + """ + return self._clustering_mode + + @clustering_mode.setter + def clustering_mode(self, clustering_mode): + """Sets the clustering_mode of this ComponentDescriptor. + + Clustering mode of the RuleNode. This mode represents the ability to start Rule Node in multiple microservices. # noqa: E501 + + :param clustering_mode: The clustering_mode of this ComponentDescriptor. # noqa: E501 + :type: str + """ + allowed_values = ["ENABLED", "SINGLETON", "USER_PREFERENCE"] # noqa: E501 + if clustering_mode not in allowed_values: + raise ValueError( + "Invalid value for `clustering_mode` ({0}), must be one of {1}" # noqa: E501 + .format(clustering_mode, allowed_values) + ) + + self._clustering_mode = clustering_mode + @property def name(self): """Gets the name of this ComponentDescriptor. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/component_descriptor_id.py b/tb_rest_client/models/models_ce/component_descriptor_id.py index c2ea581b..378e6919 100644 --- a/tb_rest_client/models/models_ce/component_descriptor_id.py +++ b/tb_rest_client/models/models_ce/component_descriptor_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ComponentDescriptorId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,13 +28,11 @@ class ComponentDescriptorId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_ce/custom_time_schedule.py b/tb_rest_client/models/models_ce/custom_time_schedule.py index 0c7ff8b9..d61e0378 100644 --- a/tb_rest_client/models/models_ce/custom_time_schedule.py +++ b/tb_rest_client/models/models_ce/custom_time_schedule.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CustomTimeSchedule(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/custom_time_schedule_item.py b/tb_rest_client/models/models_ce/custom_time_schedule_item.py index cb2b94d0..f4ca252e 100644 --- a/tb_rest_client/models/models_ce/custom_time_schedule_item.py +++ b/tb_rest_client/models/models_ce/custom_time_schedule_item.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CustomTimeScheduleItem(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/customer.py b/tb_rest_client/models/models_ce/customer.py index 7662422b..b256ce1f 100644 --- a/tb_rest_client/models/models_ce/customer.py +++ b/tb_rest_client/models/models_ce/customer.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Customer(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class Customer(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'CustomerId', 'id': 'CustomerId', 'created_time': 'int', 'title': 'str', @@ -46,7 +45,6 @@ class Customer(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'title': 'title', @@ -63,9 +61,8 @@ class Customer(object): 'additional_info': 'additionalInfo' } - def __init__(self, external_id=None, id=None, created_time=None, title=None, name=None, tenant_id=None, country=None, state=None, city=None, address=None, address2=None, zip=None, phone=None, email=None, additional_info=None): # noqa: E501 + def __init__(self, id=None, created_time=None, title=None, name=None, tenant_id=None, country=None, state=None, city=None, address=None, address2=None, zip=None, phone=None, email=None, additional_info=None): # noqa: E501 """Customer - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._title = None @@ -81,8 +78,6 @@ def __init__(self, external_id=None, id=None, created_time=None, title=None, nam self._email = None self._additional_info = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -103,27 +98,6 @@ def __init__(self, external_id=None, id=None, created_time=None, title=None, nam if additional_info is not None: self.additional_info = additional_info - @property - def external_id(self): - """Gets the external_id of this Customer. # noqa: E501 - - - :return: The external_id of this Customer. # noqa: E501 - :rtype: CustomerId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Customer. - - - :param external_id: The external_id of this Customer. # noqa: E501 - :type: CustomerId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this Customer. # noqa: E501 @@ -232,6 +206,8 @@ def tenant_id(self, tenant_id): :param tenant_id: The tenant_id of this Customer. # noqa: E501 :type: TenantId """ + if tenant_id is None: + raise ValueError("Invalid value for `tenant_id`, must not be `None`") # noqa: E501 self._tenant_id = tenant_id diff --git a/tb_rest_client/models/models_ce/customer_id.py b/tb_rest_client/models/models_ce/customer_id.py index 3efa0da9..f6c5fdb3 100644 --- a/tb_rest_client/models/models_ce/customer_id.py +++ b/tb_rest_client/models/models_ce/customer_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CustomerId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/customer_users_filter.py b/tb_rest_client/models/models_ce/customer_users_filter.py new file mode 100644 index 00000000..79b4044f --- /dev/null +++ b/tb_rest_client/models/models_ce/customer_users_filter.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class CustomerUsersFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'customer_id': 'str' + } + + attribute_map = { + 'customer_id': 'customerId' + } + + def __init__(self, customer_id=None): # noqa: E501 + """CustomerUsersFilter - a model defined in Swagger""" # noqa: E501 + self._customer_id = None + self.discriminator = None + self.customer_id = customer_id + + @property + def customer_id(self): + """Gets the customer_id of this CustomerUsersFilter. # noqa: E501 + + + :return: The customer_id of this CustomerUsersFilter. # noqa: E501 + :rtype: str + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this CustomerUsersFilter. + + + :param customer_id: The customer_id of this CustomerUsersFilter. # noqa: E501 + :type: str + """ + if customer_id is None: + raise ValueError("Invalid value for `customer_id`, must not be `None`") # noqa: E501 + + self._customer_id = customer_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CustomerUsersFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CustomerUsersFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/dashboard.py b/tb_rest_client/models/models_ce/dashboard.py index 94e9753e..028f94a6 100644 --- a/tb_rest_client/models/models_ce/dashboard.py +++ b/tb_rest_client/models/models_ce/dashboard.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Dashboard(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class Dashboard(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'DashboardId', 'created_time': 'int', 'tenant_id': 'TenantId', 'name': 'str', @@ -41,7 +40,6 @@ class Dashboard(object): } attribute_map = { - 'external_id': 'externalId', 'created_time': 'createdTime', 'tenant_id': 'tenantId', 'name': 'name', @@ -53,9 +51,8 @@ class Dashboard(object): 'configuration': 'configuration' } - def __init__(self, external_id=None, created_time=None, tenant_id=None, name=None, title=None, assigned_customers=None, mobile_hide=None, mobile_order=None, image=None, configuration=None): # noqa: E501 + def __init__(self, created_time=None, tenant_id=None, name=None, title=None, assigned_customers=None, mobile_hide=None, mobile_order=None, image=None, configuration=None): # noqa: E501 """Dashboard - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._created_time = None self._tenant_id = None self._name = None @@ -66,8 +63,6 @@ def __init__(self, external_id=None, created_time=None, tenant_id=None, name=Non self._image = None self._configuration = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if created_time is not None: self.created_time = created_time if tenant_id is not None: @@ -87,27 +82,6 @@ def __init__(self, external_id=None, created_time=None, tenant_id=None, name=Non if configuration is not None: self.configuration = configuration - @property - def external_id(self): - """Gets the external_id of this Dashboard. # noqa: E501 - - - :return: The external_id of this Dashboard. # noqa: E501 - :rtype: DashboardId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Dashboard. - - - :param external_id: The external_id of this Dashboard. # noqa: E501 - :type: DashboardId - """ - - self._external_id = external_id - @property def created_time(self): """Gets the created_time of this Dashboard. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/dashboard_id.py b/tb_rest_client/models/models_ce/dashboard_id.py index a43c6b93..6fbfe989 100644 --- a/tb_rest_client/models/models_ce/dashboard_id.py +++ b/tb_rest_client/models/models_ce/dashboard_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DashboardId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/dashboard_info.py b/tb_rest_client/models/models_ce/dashboard_info.py index 0f1bb10f..7a366edd 100644 --- a/tb_rest_client/models/models_ce/dashboard_info.py +++ b/tb_rest_client/models/models_ce/dashboard_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DashboardInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/debug_rule_chain_event_filter.py b/tb_rest_client/models/models_ce/debug_rule_chain_event_filter.py index 89a14d68..81600fb7 100644 --- a/tb_rest_client/models/models_ce/debug_rule_chain_event_filter.py +++ b/tb_rest_client/models/models_ce/debug_rule_chain_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.4.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_ce/default_coap_device_type_configuration.py b/tb_rest_client/models/models_ce/default_coap_device_type_configuration.py index cf5e7da2..5d488c03 100644 --- a/tb_rest_client/models/models_ce/default_coap_device_type_configuration.py +++ b/tb_rest_client/models/models_ce/default_coap_device_type_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .coap_device_type_configuration import CoapDeviceTypeConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.coap_device_type_configuration import CoapDeviceTypeConfiguration # noqa: F401,E501 class DefaultCoapDeviceTypeConfiguration(CoapDeviceTypeConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/default_device_configuration.py b/tb_rest_client/models/models_ce/default_device_configuration.py index 43698b56..0fb6a963 100644 --- a/tb_rest_client/models/models_ce/default_device_configuration.py +++ b/tb_rest_client/models/models_ce/default_device_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_configuration import DeviceConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.device_configuration import DeviceConfiguration # noqa: F401,E501 class DefaultDeviceConfiguration(DeviceConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/default_device_profile_configuration.py b/tb_rest_client/models/models_ce/default_device_profile_configuration.py index 0d699ce0..66062d3d 100644 --- a/tb_rest_client/models/models_ce/default_device_profile_configuration.py +++ b/tb_rest_client/models/models_ce/default_device_profile_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DefaultDeviceProfileConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/default_device_profile_transport_configuration.py b/tb_rest_client/models/models_ce/default_device_profile_transport_configuration.py index 86c036da..5cc8ff8d 100644 --- a/tb_rest_client/models/models_ce/default_device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_ce/default_device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DefaultDeviceProfileTransportConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/default_device_transport_configuration.py b/tb_rest_client/models/models_ce/default_device_transport_configuration.py index aa6df386..b2756cbe 100644 --- a/tb_rest_client/models/models_ce/default_device_transport_configuration.py +++ b/tb_rest_client/models/models_ce/default_device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 class DefaultDeviceTransportConfiguration(DeviceTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/default_rule_chain_create_request.py b/tb_rest_client/models/models_ce/default_rule_chain_create_request.py index d71f8168..a5cd9e7f 100644 --- a/tb_rest_client/models/models_ce/default_rule_chain_create_request.py +++ b/tb_rest_client/models/models_ce/default_rule_chain_create_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DefaultRuleChainCreateRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/default_tenant_profile_configuration.py b/tb_rest_client/models/models_ce/default_tenant_profile_configuration.py index 7f8ffe67..dca7e246 100644 --- a/tb_rest_client/models/models_ce/default_tenant_profile_configuration.py +++ b/tb_rest_client/models/models_ce/default_tenant_profile_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DefaultTenantProfileConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -60,6 +60,8 @@ class DefaultTenantProfileConfiguration(object): 'rpc_ttl_days': 'int', 'tenant_entity_export_rate_limit': 'str', 'tenant_entity_import_rate_limit': 'str', + 'tenant_notification_requests_per_rule_rate_limit': 'str', + 'tenant_notification_requests_rate_limit': 'str', 'tenant_server_rest_limits_configuration': 'str', 'transport_device_msg_rate_limit': 'str', 'transport_device_telemetry_data_points_rate_limit': 'str', @@ -105,6 +107,8 @@ class DefaultTenantProfileConfiguration(object): 'rpc_ttl_days': 'rpcTtlDays', 'tenant_entity_export_rate_limit': 'tenantEntityExportRateLimit', 'tenant_entity_import_rate_limit': 'tenantEntityImportRateLimit', + 'tenant_notification_requests_per_rule_rate_limit': 'tenantNotificationRequestsPerRuleRateLimit', + 'tenant_notification_requests_rate_limit': 'tenantNotificationRequestsRateLimit', 'tenant_server_rest_limits_configuration': 'tenantServerRestLimitsConfiguration', 'transport_device_msg_rate_limit': 'transportDeviceMsgRateLimit', 'transport_device_telemetry_data_points_rate_limit': 'transportDeviceTelemetryDataPointsRateLimit', @@ -117,7 +121,7 @@ class DefaultTenantProfileConfiguration(object): 'ws_updates_per_session_rate_limit': 'wsUpdatesPerSessionRateLimit' } - def __init__(self, alarms_ttl_days=None, cassandra_query_tenant_rate_limits_configuration=None, customer_server_rest_limits_configuration=None, default_storage_ttl_days=None, max_assets=None, max_created_alarms=None, max_customers=None, max_dp_storage_days=None, max_dashboards=None, max_devices=None, max_emails=None, max_js_executions=None, max_ota_packages_in_bytes=None, max_re_executions=None, max_resources_in_bytes=None, max_rule_chains=None, max_rule_node_executions_per_message=None, max_sms=None, max_transport_data_points=None, max_transport_messages=None, max_users=None, max_ws_sessions_per_customer=None, max_ws_sessions_per_public_user=None, max_ws_sessions_per_regular_user=None, max_ws_sessions_per_tenant=None, max_ws_subscriptions_per_customer=None, max_ws_subscriptions_per_public_user=None, max_ws_subscriptions_per_regular_user=None, max_ws_subscriptions_per_tenant=None, rpc_ttl_days=None, tenant_entity_export_rate_limit=None, tenant_entity_import_rate_limit=None, tenant_server_rest_limits_configuration=None, transport_device_msg_rate_limit=None, transport_device_telemetry_data_points_rate_limit=None, transport_device_telemetry_msg_rate_limit=None, transport_tenant_msg_rate_limit=None, transport_tenant_telemetry_data_points_rate_limit=None, transport_tenant_telemetry_msg_rate_limit=None, warn_threshold=None, ws_msg_queue_limit_per_session=None, ws_updates_per_session_rate_limit=None): # noqa: E501 + def __init__(self, alarms_ttl_days=None, cassandra_query_tenant_rate_limits_configuration=None, customer_server_rest_limits_configuration=None, default_storage_ttl_days=None, max_assets=None, max_created_alarms=None, max_customers=None, max_dp_storage_days=None, max_dashboards=None, max_devices=None, max_emails=None, max_js_executions=None, max_ota_packages_in_bytes=None, max_re_executions=None, max_resources_in_bytes=None, max_rule_chains=None, max_rule_node_executions_per_message=None, max_sms=None, max_transport_data_points=None, max_transport_messages=None, max_users=None, max_ws_sessions_per_customer=None, max_ws_sessions_per_public_user=None, max_ws_sessions_per_regular_user=None, max_ws_sessions_per_tenant=None, max_ws_subscriptions_per_customer=None, max_ws_subscriptions_per_public_user=None, max_ws_subscriptions_per_regular_user=None, max_ws_subscriptions_per_tenant=None, rpc_ttl_days=None, tenant_entity_export_rate_limit=None, tenant_entity_import_rate_limit=None, tenant_notification_requests_per_rule_rate_limit=None, tenant_notification_requests_rate_limit=None, tenant_server_rest_limits_configuration=None, transport_device_msg_rate_limit=None, transport_device_telemetry_data_points_rate_limit=None, transport_device_telemetry_msg_rate_limit=None, transport_tenant_msg_rate_limit=None, transport_tenant_telemetry_data_points_rate_limit=None, transport_tenant_telemetry_msg_rate_limit=None, warn_threshold=None, ws_msg_queue_limit_per_session=None, ws_updates_per_session_rate_limit=None): # noqa: E501 """DefaultTenantProfileConfiguration - a model defined in Swagger""" # noqa: E501 self._alarms_ttl_days = None self._cassandra_query_tenant_rate_limits_configuration = None @@ -151,6 +155,8 @@ def __init__(self, alarms_ttl_days=None, cassandra_query_tenant_rate_limits_conf self._rpc_ttl_days = None self._tenant_entity_export_rate_limit = None self._tenant_entity_import_rate_limit = None + self._tenant_notification_requests_per_rule_rate_limit = None + self._tenant_notification_requests_rate_limit = None self._tenant_server_rest_limits_configuration = None self._transport_device_msg_rate_limit = None self._transport_device_telemetry_data_points_rate_limit = None @@ -226,6 +232,10 @@ def __init__(self, alarms_ttl_days=None, cassandra_query_tenant_rate_limits_conf self.tenant_entity_export_rate_limit = tenant_entity_export_rate_limit if tenant_entity_import_rate_limit is not None: self.tenant_entity_import_rate_limit = tenant_entity_import_rate_limit + if tenant_notification_requests_per_rule_rate_limit is not None: + self.tenant_notification_requests_per_rule_rate_limit = tenant_notification_requests_per_rule_rate_limit + if tenant_notification_requests_rate_limit is not None: + self.tenant_notification_requests_rate_limit = tenant_notification_requests_rate_limit if tenant_server_rest_limits_configuration is not None: self.tenant_server_rest_limits_configuration = tenant_server_rest_limits_configuration if transport_device_msg_rate_limit is not None: @@ -919,6 +929,48 @@ def tenant_entity_import_rate_limit(self, tenant_entity_import_rate_limit): self._tenant_entity_import_rate_limit = tenant_entity_import_rate_limit + @property + def tenant_notification_requests_per_rule_rate_limit(self): + """Gets the tenant_notification_requests_per_rule_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + + + :return: The tenant_notification_requests_per_rule_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + :rtype: str + """ + return self._tenant_notification_requests_per_rule_rate_limit + + @tenant_notification_requests_per_rule_rate_limit.setter + def tenant_notification_requests_per_rule_rate_limit(self, tenant_notification_requests_per_rule_rate_limit): + """Sets the tenant_notification_requests_per_rule_rate_limit of this DefaultTenantProfileConfiguration. + + + :param tenant_notification_requests_per_rule_rate_limit: The tenant_notification_requests_per_rule_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + :type: str + """ + + self._tenant_notification_requests_per_rule_rate_limit = tenant_notification_requests_per_rule_rate_limit + + @property + def tenant_notification_requests_rate_limit(self): + """Gets the tenant_notification_requests_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + + + :return: The tenant_notification_requests_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + :rtype: str + """ + return self._tenant_notification_requests_rate_limit + + @tenant_notification_requests_rate_limit.setter + def tenant_notification_requests_rate_limit(self, tenant_notification_requests_rate_limit): + """Sets the tenant_notification_requests_rate_limit of this DefaultTenantProfileConfiguration. + + + :param tenant_notification_requests_rate_limit: The tenant_notification_requests_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + :type: str + """ + + self._tenant_notification_requests_rate_limit = tenant_notification_requests_rate_limit + @property def tenant_server_rest_limits_configuration(self): """Gets the tenant_server_rest_limits_configuration of this DefaultTenantProfileConfiguration. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/deferred_result_entity_data_diff.py b/tb_rest_client/models/models_ce/deferred_result_entity_data_diff.py index 753a491d..e4347f39 100644 --- a/tb_rest_client/models/models_ce/deferred_result_entity_data_diff.py +++ b/tb_rest_client/models/models_ce/deferred_result_entity_data_diff.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultEntityDataDiff(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/deferred_result_entity_data_info.py b/tb_rest_client/models/models_ce/deferred_result_entity_data_info.py index 9e456f78..22b73f9e 100644 --- a/tb_rest_client/models/models_ce/deferred_result_entity_data_info.py +++ b/tb_rest_client/models/models_ce/deferred_result_entity_data_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultEntityDataInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/deferred_result_list_branch_info.py b/tb_rest_client/models/models_ce/deferred_result_list_branch_info.py index 4d61dda2..e60488e2 100644 --- a/tb_rest_client/models/models_ce/deferred_result_list_branch_info.py +++ b/tb_rest_client/models/models_ce/deferred_result_list_branch_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultListBranchInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/deferred_result_list_versioned_entity_info.py b/tb_rest_client/models/models_ce/deferred_result_list_versioned_entity_info.py index 2843b785..11a8a1b2 100644 --- a/tb_rest_client/models/models_ce/deferred_result_list_versioned_entity_info.py +++ b/tb_rest_client/models/models_ce/deferred_result_list_versioned_entity_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultListVersionedEntityInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/deferred_result_page_data_entity_version.py b/tb_rest_client/models/models_ce/deferred_result_page_data_entity_version.py index 7877ecdf..36e371f6 100644 --- a/tb_rest_client/models/models_ce/deferred_result_page_data_entity_version.py +++ b/tb_rest_client/models/models_ce/deferred_result_page_data_entity_version.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultPageDataEntityVersion(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/deferred_result_repository_settings.py b/tb_rest_client/models/models_ce/deferred_result_repository_settings.py index 1a4434e5..d68ffecb 100644 --- a/tb_rest_client/models/models_ce/deferred_result_repository_settings.py +++ b/tb_rest_client/models/models_ce/deferred_result_repository_settings.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultRepositorySettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/deferred_result_response_entity.py b/tb_rest_client/models/models_ce/deferred_result_response_entity.py index 09eb55a3..bdfa922a 100644 --- a/tb_rest_client/models/models_ce/deferred_result_response_entity.py +++ b/tb_rest_client/models/models_ce/deferred_result_response_entity.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultResponseEntity(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/deferred_result_void.py b/tb_rest_client/models/models_ce/deferred_result_void.py index 2ee3942f..463af6a8 100644 --- a/tb_rest_client/models/models_ce/deferred_result_void.py +++ b/tb_rest_client/models/models_ce/deferred_result_void.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultVoid(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/deferred_resultuuid.py b/tb_rest_client/models/models_ce/deferred_resultuuid.py index b7cc165d..9ceb59ac 100644 --- a/tb_rest_client/models/models_ce/deferred_resultuuid.py +++ b/tb_rest_client/models/models_ce/deferred_resultuuid.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultuuid(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/delivery_method_notification_template.py b/tb_rest_client/models/models_ce/delivery_method_notification_template.py new file mode 100644 index 00000000..feb45315 --- /dev/null +++ b/tb_rest_client/models/models_ce/delivery_method_notification_template.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class DeliveryMethodNotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'enabled': 'bool' + } + + attribute_map = { + 'body': 'body', + 'enabled': 'enabled' + } + + def __init__(self, body=None, enabled=None): # noqa: E501 + """DeliveryMethodNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._body = None + self._enabled = None + self.discriminator = None + if body is not None: + self.body = body + if enabled is not None: + self.enabled = enabled + + @property + def body(self): + """Gets the body of this DeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The body of this DeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this DeliveryMethodNotificationTemplate. + + + :param body: The body of this DeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def enabled(self): + """Gets the enabled of this DeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The enabled of this DeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this DeliveryMethodNotificationTemplate. + + + :param enabled: The enabled of this DeliveryMethodNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeliveryMethodNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeliveryMethodNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/device.py b/tb_rest_client/models/models_ce/device.py index 342a3b1c..f163047a 100644 --- a/tb_rest_client/models/models_ce/device.py +++ b/tb_rest_client/models/models_ce/device.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Device(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class Device(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'DeviceId', 'id': 'DeviceId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -44,7 +43,6 @@ class Device(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -59,9 +57,8 @@ class Device(object): 'additional_info': 'additionalInfo' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, label=None, device_profile_id=None, device_data=None, firmware_id=None, software_id=None, additional_info=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, label=None, device_profile_id=None, device_data=None, firmware_id=None, software_id=None, additional_info=None): # noqa: E501 """Device - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -75,8 +72,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._software_id = None self._additional_info = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -87,8 +82,7 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self.customer_id = customer_id self.name = name self.type = type - if label is not None: - self.label = label + self.label = label self.device_profile_id = device_profile_id if device_data is not None: self.device_data = device_data @@ -99,27 +93,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if additional_info is not None: self.additional_info = additional_info - @property - def external_id(self): - """Gets the external_id of this Device. # noqa: E501 - - - :return: The external_id of this Device. # noqa: E501 - :rtype: DeviceId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Device. - - - :param external_id: The external_id of this Device. # noqa: E501 - :type: DeviceId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this Device. # noqa: E501 @@ -251,8 +224,6 @@ def type(self, type): :param type: The type of this Device. # noqa: E501 :type: str """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @@ -276,8 +247,6 @@ def label(self, label): :param label: The label of this Device. # noqa: E501 :type: str """ - if label is None: - self._label = None self._label = label diff --git a/tb_rest_client/models/models_ce/device_activity_notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/device_activity_notification_rule_trigger_config.py new file mode 100644 index 00000000..d910d86b --- /dev/null +++ b/tb_rest_client/models/models_ce/device_activity_notification_rule_trigger_config.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 + +class DeviceActivityNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'device_profiles': 'list[str]', + 'devices': 'list[str]', + 'notify_on': 'list[str]', + 'trigger_type': 'str' + } + if hasattr(NotificationRuleTriggerConfig, "swagger_types"): + swagger_types.update(NotificationRuleTriggerConfig.swagger_types) + + attribute_map = { + 'device_profiles': 'deviceProfiles', + 'devices': 'devices', + 'notify_on': 'notifyOn', + 'trigger_type': 'triggerType' + } + if hasattr(NotificationRuleTriggerConfig, "attribute_map"): + attribute_map.update(NotificationRuleTriggerConfig.attribute_map) + + def __init__(self, device_profiles=None, devices=None, notify_on=None, trigger_type=None, *args, **kwargs): # noqa: E501 + """DeviceActivityNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._device_profiles = None + self._devices = None + self._notify_on = None + self._trigger_type = None + self.discriminator = None + if device_profiles is not None: + self.device_profiles = device_profiles + if devices is not None: + self.devices = devices + if notify_on is not None: + self.notify_on = notify_on + if trigger_type is not None: + self.trigger_type = trigger_type + NotificationRuleTriggerConfig.__init__(self, *args, **kwargs) + + @property + def device_profiles(self): + """Gets the device_profiles of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The device_profiles of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._device_profiles + + @device_profiles.setter + def device_profiles(self, device_profiles): + """Sets the device_profiles of this DeviceActivityNotificationRuleTriggerConfig. + + + :param device_profiles: The device_profiles of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._device_profiles = device_profiles + + @property + def devices(self): + """Gets the devices of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The devices of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._devices + + @devices.setter + def devices(self, devices): + """Sets the devices of this DeviceActivityNotificationRuleTriggerConfig. + + + :param devices: The devices of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._devices = devices + + @property + def notify_on(self): + """Gets the notify_on of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._notify_on + + @notify_on.setter + def notify_on(self, notify_on): + """Sets the notify_on of this DeviceActivityNotificationRuleTriggerConfig. + + + :param notify_on: The notify_on of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACTIVE", "INACTIVE"] # noqa: E501 + if not set(notify_on).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `notify_on` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(notify_on) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._notify_on = notify_on + + @property + def trigger_type(self): + """Gets the trigger_type of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this DeviceActivityNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeviceActivityNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeviceActivityNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/device_configuration.py b/tb_rest_client/models/models_ce/device_configuration.py index be03a8ad..8cc9e9e2 100644 --- a/tb_rest_client/models/models_ce/device_configuration.py +++ b/tb_rest_client/models/models_ce/device_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_credentials.py b/tb_rest_client/models/models_ce/device_credentials.py index 70fabdb1..487bacba 100644 --- a/tb_rest_client/models/models_ce/device_credentials.py +++ b/tb_rest_client/models/models_ce/device_credentials.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceCredentials(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -82,6 +82,8 @@ def id(self, id): :param id: The id of this DeviceCredentials. # noqa: E501 :type: DeviceCredentialsId """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id @@ -126,6 +128,8 @@ def device_id(self, device_id): :param device_id: The device_id of this DeviceCredentials. # noqa: E501 :type: DeviceId """ + if device_id is None: + raise ValueError("Invalid value for `device_id`, must not be `None`") # noqa: E501 self._device_id = device_id diff --git a/tb_rest_client/models/models_ce/device_credentials_id.py b/tb_rest_client/models/models_ce/device_credentials_id.py index ffbb0b92..5b85c32a 100644 --- a/tb_rest_client/models/models_ce/device_credentials_id.py +++ b/tb_rest_client/models/models_ce/device_credentials_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceCredentialsId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_data.py b/tb_rest_client/models/models_ce/device_data.py index aa1a1787..8a4b5e7d 100644 --- a/tb_rest_client/models/models_ce/device_data.py +++ b/tb_rest_client/models/models_ce/device_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_export_data.py b/tb_rest_client/models/models_ce/device_export_data.py index b9889c64..b51ed190 100644 --- a/tb_rest_client/models/models_ce/device_export_data.py +++ b/tb_rest_client/models/models_ce/device_export_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 class DeviceExportData(EntityExportDataobject): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -149,7 +149,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this DeviceExportData. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/device_id.py b/tb_rest_client/models/models_ce/device_id.py index fc04dc64..de4cb94a 100644 --- a/tb_rest_client/models/models_ce/device_id.py +++ b/tb_rest_client/models/models_ce/device_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_info.py b/tb_rest_client/models/models_ce/device_info.py index 5a9deea0..163eeada 100644 --- a/tb_rest_client/models/models_ce/device_info.py +++ b/tb_rest_client/models/models_ce/device_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class DeviceInfo(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'DeviceId', 'id': 'DeviceId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -43,11 +42,11 @@ class DeviceInfo(object): 'additional_info': 'JsonNode', 'customer_title': 'str', 'customer_is_public': 'bool', - 'device_profile_name': 'str' + 'device_profile_name': 'str', + 'active': 'bool' } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -62,12 +61,12 @@ class DeviceInfo(object): 'additional_info': 'additionalInfo', 'customer_title': 'customerTitle', 'customer_is_public': 'customerIsPublic', - 'device_profile_name': 'deviceProfileName' + 'device_profile_name': 'deviceProfileName', + 'active': 'active' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, label=None, device_profile_id=None, device_data=None, firmware_id=None, software_id=None, additional_info=None, customer_title=None, customer_is_public=None, device_profile_name=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, label=None, device_profile_id=None, device_data=None, firmware_id=None, software_id=None, additional_info=None, customer_title=None, customer_is_public=None, device_profile_name=None, active=None): # noqa: E501 """DeviceInfo - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -83,9 +82,8 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._customer_title = None self._customer_is_public = None self._device_profile_name = None + self._active = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -96,8 +94,7 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self.customer_id = customer_id self.name = name self.type = type - if label is not None: - self.label = label + self.label = label self.device_profile_id = device_profile_id if device_data is not None: self.device_data = device_data @@ -113,27 +110,8 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self.customer_is_public = customer_is_public if device_profile_name is not None: self.device_profile_name = device_profile_name - - @property - def external_id(self): - """Gets the external_id of this DeviceInfo. # noqa: E501 - - - :return: The external_id of this DeviceInfo. # noqa: E501 - :rtype: DeviceId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this DeviceInfo. - - - :param external_id: The external_id of this DeviceInfo. # noqa: E501 - :type: DeviceId - """ - - self._external_id = external_id + if active is not None: + self.active = active @property def id(self): @@ -291,8 +269,6 @@ def label(self, label): :param label: The label of this DeviceInfo. # noqa: E501 :type: str """ - if label is None: - self._label = None self._label = label @@ -472,6 +448,29 @@ def device_profile_name(self, device_profile_name): self._device_profile_name = device_profile_name + @property + def active(self): + """Gets the active of this DeviceInfo. # noqa: E501 + + Device active flag. # noqa: E501 + + :return: The active of this DeviceInfo. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this DeviceInfo. + + Device active flag. # noqa: E501 + + :param active: The active of this DeviceInfo. # noqa: E501 + :type: bool + """ + + self._active = active + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_ce/device_profile.py b/tb_rest_client/models/models_ce/device_profile.py index 94734b92..abd189ad 100644 --- a/tb_rest_client/models/models_ce/device_profile.py +++ b/tb_rest_client/models/models_ce/device_profile.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfile(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class DeviceProfile(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'DeviceProfileId', 'id': 'DeviceProfileId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -36,7 +35,7 @@ class DeviceProfile(object): 'default': 'bool', 'default_dashboard_id': 'DashboardId', 'default_rule_chain_id': 'RuleChainId', - 'default_queue_id': 'QueueId', + 'default_queue_name': 'str', 'firmware_id': 'OtaPackageId', 'software_id': 'OtaPackageId', 'description': 'str', @@ -45,11 +44,11 @@ class DeviceProfile(object): 'transport_type': 'str', 'provision_type': 'str', 'profile_data': 'DeviceProfileData', - 'type': 'str' + 'type': 'str', + 'default_edge_rule_chain_id': 'RuleChainId' } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -57,7 +56,7 @@ class DeviceProfile(object): 'default': 'default', 'default_dashboard_id': 'defaultDashboardId', 'default_rule_chain_id': 'defaultRuleChainId', - 'default_queue_id': 'defaultQueueId', + 'default_queue_name': 'defaultQueueName', 'firmware_id': 'firmwareId', 'software_id': 'softwareId', 'description': 'description', @@ -66,12 +65,12 @@ class DeviceProfile(object): 'transport_type': 'transportType', 'provision_type': 'provisionType', 'profile_data': 'profileData', - 'type': 'type' + 'type': 'type', + 'default_edge_rule_chain_id': 'defaultEdgeRuleChainId' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, name=None, default=None, default_dashboard_id=None, default_rule_chain_id=None, default_queue_id=None, firmware_id=None, software_id=None, description=None, image=None, provision_device_key=None, transport_type=None, provision_type=None, profile_data=None, type=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, name=None, default=None, default_dashboard_id=None, default_rule_chain_id=None, default_queue_name=None, firmware_id=None, software_id=None, description=None, image=None, provision_device_key=None, transport_type=None, provision_type=None, profile_data=None, type=None, default_edge_rule_chain_id=None): # noqa: E501 """DeviceProfile - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -79,7 +78,7 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._default = None self._default_dashboard_id = None self._default_rule_chain_id = None - self._default_queue_id = None + self._default_queue_name = None self._firmware_id = None self._software_id = None self._description = None @@ -89,9 +88,8 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._provision_type = None self._profile_data = None self._type = None + self._default_edge_rule_chain_id = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -106,47 +104,24 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self.default_dashboard_id = default_dashboard_id if default_rule_chain_id is not None: self.default_rule_chain_id = default_rule_chain_id - if default_queue_id is not None: - self.default_queue_id = default_queue_id + if default_queue_name is not None: + self.default_queue_name = default_queue_name if firmware_id is not None: self.firmware_id = firmware_id if software_id is not None: self.software_id = software_id - if description is not None: - self.description = description + self.description = description or '' if image is not None: self.image = image if provision_device_key is not None: self.provision_device_key = provision_device_key - if transport_type is not None: - self.transport_type = transport_type - if provision_type is not None: - self.provision_type = provision_type + self.transport_type = transport_type or 'DEFAULT' + self.provision_type = provision_type or 'DISABLED' if profile_data is not None: self.profile_data = profile_data - if type is not None: - self.type = type - - @property - def external_id(self): - """Gets the external_id of this DeviceProfile. # noqa: E501 - - - :return: The external_id of this DeviceProfile. # noqa: E501 - :rtype: DeviceProfileId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this DeviceProfile. - - - :param external_id: The external_id of this DeviceProfile. # noqa: E501 - :type: DeviceProfileId - """ - - self._external_id = external_id + self.type = type or 'DEFAULT' + if default_edge_rule_chain_id is not None: + self.default_edge_rule_chain_id = default_edge_rule_chain_id @property def id(self): @@ -302,25 +277,27 @@ def default_rule_chain_id(self, default_rule_chain_id): self._default_rule_chain_id = default_rule_chain_id @property - def default_queue_id(self): - """Gets the default_queue_id of this DeviceProfile. # noqa: E501 + def default_queue_name(self): + """Gets the default_queue_name of this DeviceProfile. # noqa: E501 + Rule engine queue name. 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. # noqa: E501 - :return: The default_queue_id of this DeviceProfile. # noqa: E501 - :rtype: QueueId + :return: The default_queue_name of this DeviceProfile. # noqa: E501 + :rtype: str """ - return self._default_queue_id + return self._default_queue_name - @default_queue_id.setter - def default_queue_id(self, default_queue_id): - """Sets the default_queue_id of this DeviceProfile. + @default_queue_name.setter + def default_queue_name(self, default_queue_name): + """Sets the default_queue_name of this DeviceProfile. + Rule engine queue name. 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. # noqa: E501 - :param default_queue_id: The default_queue_id of this DeviceProfile. # noqa: E501 - :type: QueueId + :param default_queue_name: The default_queue_name of this DeviceProfile. # noqa: E501 + :type: str """ - self._default_queue_id = default_queue_id + self._default_queue_name = default_queue_name @property def firmware_id(self): @@ -482,7 +459,7 @@ def provision_type(self, provision_type): :param provision_type: The provision_type of this DeviceProfile. # noqa: E501 :type: str """ - allowed_values = ["ALLOW_CREATE_NEW_DEVICES", "CHECK_PRE_PROVISIONED_DEVICES", "DISABLED"] # noqa: E501 + allowed_values = ["ALLOW_CREATE_NEW_DEVICES", "CHECK_PRE_PROVISIONED_DEVICES", "DISABLED", "X509_CERTIFICATE_CHAIN"] # noqa: E501 if provision_type not in allowed_values: raise ValueError( "Invalid value for `provision_type` ({0}), must be one of {1}" # noqa: E501 @@ -541,6 +518,27 @@ def type(self, type): self._type = type + @property + def default_edge_rule_chain_id(self): + """Gets the default_edge_rule_chain_id of this DeviceProfile. # noqa: E501 + + + :return: The default_edge_rule_chain_id of this DeviceProfile. # noqa: E501 + :rtype: RuleChainId + """ + return self._default_edge_rule_chain_id + + @default_edge_rule_chain_id.setter + def default_edge_rule_chain_id(self, default_edge_rule_chain_id): + """Sets the default_edge_rule_chain_id of this DeviceProfile. + + + :param default_edge_rule_chain_id: The default_edge_rule_chain_id of this DeviceProfile. # noqa: E501 + :type: RuleChainId + """ + + self._default_edge_rule_chain_id = default_edge_rule_chain_id + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_ce/device_profile_alarm.py b/tb_rest_client/models/models_ce/device_profile_alarm.py index e251de79..5694b27b 100644 --- a/tb_rest_client/models/models_ce/device_profile_alarm.py +++ b/tb_rest_client/models/models_ce/device_profile_alarm.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileAlarm(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_profile_configuration.py b/tb_rest_client/models/models_ce/device_profile_configuration.py index a5628eed..ffe7119e 100644 --- a/tb_rest_client/models/models_ce/device_profile_configuration.py +++ b/tb_rest_client/models/models_ce/device_profile_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_profile_data.py b/tb_rest_client/models/models_ce/device_profile_data.py index 5ead180c..e00b1d75 100644 --- a/tb_rest_client/models/models_ce/device_profile_data.py +++ b/tb_rest_client/models/models_ce/device_profile_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_profile_id.py b/tb_rest_client/models/models_ce/device_profile_id.py index 8d3e0efa..a4a623da 100644 --- a/tb_rest_client/models/models_ce/device_profile_id.py +++ b/tb_rest_client/models/models_ce/device_profile_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_profile_info.py b/tb_rest_client/models/models_ce/device_profile_info.py index 6dd552d1..51519dff 100644 --- a/tb_rest_client/models/models_ce/device_profile_info.py +++ b/tb_rest_client/models/models_ce/device_profile_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -33,7 +33,8 @@ class DeviceProfileInfo(object): 'image': 'str', 'default_dashboard_id': 'DashboardId', 'type': 'str', - 'transport_type': 'str' + 'transport_type': 'str', + 'tenant_id': 'TenantId' } attribute_map = { @@ -42,10 +43,11 @@ class DeviceProfileInfo(object): 'image': 'image', 'default_dashboard_id': 'defaultDashboardId', 'type': 'type', - 'transport_type': 'transportType' + 'transport_type': 'transportType', + 'tenant_id': 'tenantId' } - def __init__(self, id=None, name=None, image=None, default_dashboard_id=None, type=None, transport_type=None): # noqa: E501 + def __init__(self, id=None, name=None, image=None, default_dashboard_id=None, type=None, transport_type=None, tenant_id=None): # noqa: E501 """DeviceProfileInfo - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None @@ -53,6 +55,7 @@ def __init__(self, id=None, name=None, image=None, default_dashboard_id=None, ty self._default_dashboard_id = None self._type = None self._transport_type = None + self._tenant_id = None self.discriminator = None if id is not None: self.id = id @@ -66,6 +69,8 @@ def __init__(self, id=None, name=None, image=None, default_dashboard_id=None, ty self.type = type if transport_type is not None: self.transport_type = transport_type + if tenant_id is not None: + self.tenant_id = tenant_id @property def id(self): @@ -213,6 +218,27 @@ def transport_type(self, transport_type): self._transport_type = transport_type + @property + def tenant_id(self): + """Gets the tenant_id of this DeviceProfileInfo. # noqa: E501 + + + :return: The tenant_id of this DeviceProfileInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this DeviceProfileInfo. + + + :param tenant_id: The tenant_id of this DeviceProfileInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_ce/device_profile_provision_configuration.py b/tb_rest_client/models/models_ce/device_profile_provision_configuration.py index a1cf010a..8c6fb73e 100644 --- a/tb_rest_client/models/models_ce/device_profile_provision_configuration.py +++ b/tb_rest_client/models/models_ce/device_profile_provision_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileProvisionConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_profile_transport_configuration.py b/tb_rest_client/models/models_ce/device_profile_transport_configuration.py index b7a89950..3887024e 100644 --- a/tb_rest_client/models/models_ce/device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_ce/device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileTransportConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_search_query.py b/tb_rest_client/models/models_ce/device_search_query.py index 7db768f0..abde02a3 100644 --- a/tb_rest_client/models/models_ce/device_search_query.py +++ b/tb_rest_client/models/models_ce/device_search_query.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceSearchQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_search_query_filter.py b/tb_rest_client/models/models_ce/device_search_query_filter.py index 3f160e20..dbed786b 100644 --- a/tb_rest_client/models/models_ce/device_search_query_filter.py +++ b/tb_rest_client/models/models_ce/device_search_query_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class DeviceSearchQueryFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/device_transport_configuration.py b/tb_rest_client/models/models_ce/device_transport_configuration.py index 06555f68..92237063 100644 --- a/tb_rest_client/models/models_ce/device_transport_configuration.py +++ b/tb_rest_client/models/models_ce/device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceTransportConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/device_type_filter.py b/tb_rest_client/models/models_ce/device_type_filter.py index 2fafd19e..0e83114e 100644 --- a/tb_rest_client/models/models_ce/device_type_filter.py +++ b/tb_rest_client/models/models_ce/device_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class DeviceTypeFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -30,27 +30,27 @@ class DeviceTypeFilter(EntityFilter): """ swagger_types = { 'device_name_filter': 'str', - 'device_type': 'str' + 'device_types': 'list[str]' } if hasattr(EntityFilter, "swagger_types"): swagger_types.update(EntityFilter.swagger_types) attribute_map = { 'device_name_filter': 'deviceNameFilter', - 'device_type': 'deviceType' + 'device_types': 'deviceTypes' } if hasattr(EntityFilter, "attribute_map"): attribute_map.update(EntityFilter.attribute_map) - def __init__(self, device_name_filter=None, device_type=None, *args, **kwargs): # noqa: E501 + def __init__(self, device_name_filter=None, device_types=None, *args, **kwargs): # noqa: E501 """DeviceTypeFilter - a model defined in Swagger""" # noqa: E501 self._device_name_filter = None - self._device_type = None + self._device_types = None self.discriminator = None if device_name_filter is not None: self.device_name_filter = device_name_filter - if device_type is not None: - self.device_type = device_type + if device_types is not None: + self.device_types = device_types EntityFilter.__init__(self, *args, **kwargs) @property @@ -75,25 +75,25 @@ def device_name_filter(self, device_name_filter): self._device_name_filter = device_name_filter @property - def device_type(self): - """Gets the device_type of this DeviceTypeFilter. # noqa: E501 + def device_types(self): + """Gets the device_types of this DeviceTypeFilter. # noqa: E501 - :return: The device_type of this DeviceTypeFilter. # noqa: E501 - :rtype: str + :return: The device_types of this DeviceTypeFilter. # noqa: E501 + :rtype: list[str] """ - return self._device_type + return self._device_types - @device_type.setter - def device_type(self, device_type): - """Sets the device_type of this DeviceTypeFilter. + @device_types.setter + def device_types(self, device_types): + """Sets the device_types of this DeviceTypeFilter. - :param device_type: The device_type of this DeviceTypeFilter. # noqa: E501 - :type: str + :param device_types: The device_types of this DeviceTypeFilter. # noqa: E501 + :type: list[str] """ - self._device_type = device_type + self._device_types = device_types def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_ce/disabled_device_profile_provision_configuration.py b/tb_rest_client/models/models_ce/disabled_device_profile_provision_configuration.py index 071db06f..29b635df 100644 --- a/tb_rest_client/models/models_ce/disabled_device_profile_provision_configuration.py +++ b/tb_rest_client/models/models_ce/disabled_device_profile_provision_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_profile_provision_configuration import DeviceProfileProvisionConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.device_profile_provision_configuration import DeviceProfileProvisionConfiguration # noqa: F401,E501 class DisabledDeviceProfileProvisionConfiguration(DeviceProfileProvisionConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/duration_alarm_condition_spec.py b/tb_rest_client/models/models_ce/duration_alarm_condition_spec.py index 99a82b3c..32cce288 100644 --- a/tb_rest_client/models/models_ce/duration_alarm_condition_spec.py +++ b/tb_rest_client/models/models_ce/duration_alarm_condition_spec.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 +from tb_rest_client.models.models_ce.alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 class DurationAlarmConditionSpec(AlarmConditionSpec): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/dynamic_valueboolean.py b/tb_rest_client/models/models_ce/dynamic_valueboolean.py index 0ded9bdf..01a44af8 100644 --- a/tb_rest_client/models/models_ce/dynamic_valueboolean.py +++ b/tb_rest_client/models/models_ce/dynamic_valueboolean.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DynamicValueboolean(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/dynamic_valuedouble.py b/tb_rest_client/models/models_ce/dynamic_valuedouble.py index e85e7e4b..4a0aceb3 100644 --- a/tb_rest_client/models/models_ce/dynamic_valuedouble.py +++ b/tb_rest_client/models/models_ce/dynamic_valuedouble.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DynamicValuedouble(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/dynamic_valueint.py b/tb_rest_client/models/models_ce/dynamic_valueint.py index 3f542684..6a6f9fc0 100644 --- a/tb_rest_client/models/models_ce/dynamic_valueint.py +++ b/tb_rest_client/models/models_ce/dynamic_valueint.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DynamicValueint(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/dynamic_valuelong.py b/tb_rest_client/models/models_ce/dynamic_valuelong.py index 61476fbe..47c483e6 100644 --- a/tb_rest_client/models/models_ce/dynamic_valuelong.py +++ b/tb_rest_client/models/models_ce/dynamic_valuelong.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DynamicValuelong(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/dynamic_valuestring.py b/tb_rest_client/models/models_ce/dynamic_valuestring.py index 267c1ecb..7d69aa78 100644 --- a/tb_rest_client/models/models_ce/dynamic_valuestring.py +++ b/tb_rest_client/models/models_ce/dynamic_valuestring.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DynamicValuestring(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/edge.py b/tb_rest_client/models/models_ce/edge.py index 75fddfa0..af5be3c5 100644 --- a/tb_rest_client/models/models_ce/edge.py +++ b/tb_rest_client/models/models_ce/edge.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Edge(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/edge_event.py b/tb_rest_client/models/models_ce/edge_event.py index 2c6f67d1..9e19b614 100644 --- a/tb_rest_client/models/models_ce/edge_event.py +++ b/tb_rest_client/models/models_ce/edge_event.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EdgeEvent(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -100,7 +100,7 @@ def action(self, action): :param action: The action of this EdgeEvent. # noqa: E501 :type: str """ - allowed_values = ["ADDED", "ALARM_ACK", "ALARM_CLEAR", "ASSIGNED_TO_CUSTOMER", "ASSIGNED_TO_EDGE", "ATTRIBUTES_DELETED", "ATTRIBUTES_UPDATED", "CREDENTIALS_REQUEST", "CREDENTIALS_UPDATED", "DELETED", "ENTITY_MERGE_REQUEST", "POST_ATTRIBUTES", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "RPC_CALL", "TIMESERIES_UPDATED", "UNASSIGNED_FROM_CUSTOMER", "UNASSIGNED_FROM_EDGE", "UPDATED"] # noqa: E501 + allowed_values = ["ADDED", "ALARM_ACK", "ALARM_ASSIGNED", "ALARM_CLEAR", "ALARM_UNASSIGNED", "ASSIGNED_TO_CUSTOMER", "ASSIGNED_TO_EDGE", "ATTRIBUTES_DELETED", "ATTRIBUTES_UPDATED", "CREDENTIALS_REQUEST", "CREDENTIALS_UPDATED", "DELETED", "ENTITY_MERGE_REQUEST", "POST_ATTRIBUTES", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "RPC_CALL", "TIMESERIES_UPDATED", "UNASSIGNED_FROM_CUSTOMER", "UNASSIGNED_FROM_EDGE", "UPDATED"] # noqa: E501 if action not in allowed_values: raise ValueError( "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 @@ -253,7 +253,7 @@ def type(self, type): :param type: The type of this EdgeEvent. # noqa: E501 :type: str """ - allowed_values = ["ADMIN_SETTINGS", "ALARM", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RELATION", "RULE_CHAIN", "RULE_CHAIN_METADATA", "TENANT", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ADMIN_SETTINGS", "ALARM", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RELATION", "RULE_CHAIN", "RULE_CHAIN_METADATA", "TENANT", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/edge_event_id.py b/tb_rest_client/models/models_ce/edge_event_id.py index 8ea3d2e1..f6411eff 100644 --- a/tb_rest_client/models/models_ce/edge_event_id.py +++ b/tb_rest_client/models/models_ce/edge_event_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EdgeEventId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,13 +28,11 @@ class EdgeEventId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_ce/edge_id.py b/tb_rest_client/models/models_ce/edge_id.py index f3e8aeb7..e09edc17 100644 --- a/tb_rest_client/models/models_ce/edge_id.py +++ b/tb_rest_client/models/models_ce/edge_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EdgeId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/edge_info.py b/tb_rest_client/models/models_ce/edge_info.py index 3f0b6109..940746b6 100644 --- a/tb_rest_client/models/models_ce/edge_info.py +++ b/tb_rest_client/models/models_ce/edge_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EdgeInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/edge_install_instructions.py b/tb_rest_client/models/models_ce/edge_install_instructions.py new file mode 100644 index 00000000..5bf7a1e3 --- /dev/null +++ b/tb_rest_client/models/models_ce/edge_install_instructions.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EdgeInstallInstructions(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'docker_install_instructions': 'str' + } + + attribute_map = { + 'docker_install_instructions': 'dockerInstallInstructions' + } + + def __init__(self, docker_install_instructions=None): # noqa: E501 + """EdgeInstallInstructions - a model defined in Swagger""" # noqa: E501 + self._docker_install_instructions = None + self.discriminator = None + if docker_install_instructions is not None: + self.docker_install_instructions = docker_install_instructions + + @property + def docker_install_instructions(self): + """Gets the docker_install_instructions of this EdgeInstallInstructions. # noqa: E501 + + Markdown with docker install instructions # noqa: E501 + + :return: The docker_install_instructions of this EdgeInstallInstructions. # noqa: E501 + :rtype: str + """ + return self._docker_install_instructions + + @docker_install_instructions.setter + def docker_install_instructions(self, docker_install_instructions): + """Sets the docker_install_instructions of this EdgeInstallInstructions. + + Markdown with docker install instructions # noqa: E501 + + :param docker_install_instructions: The docker_install_instructions of this EdgeInstallInstructions. # noqa: E501 + :type: str + """ + + self._docker_install_instructions = docker_install_instructions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EdgeInstallInstructions, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EdgeInstallInstructions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/edge_search_query.py b/tb_rest_client/models/models_ce/edge_search_query.py index 4705ad1b..c5b6d2fc 100644 --- a/tb_rest_client/models/models_ce/edge_search_query.py +++ b/tb_rest_client/models/models_ce/edge_search_query.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EdgeSearchQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/edge_search_query_filter.py b/tb_rest_client/models/models_ce/edge_search_query_filter.py index a50803c9..77e89d17 100644 --- a/tb_rest_client/models/models_ce/edge_search_query_filter.py +++ b/tb_rest_client/models/models_ce/edge_search_query_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class EdgeSearchQueryFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/edge_type_filter.py b/tb_rest_client/models/models_ce/edge_type_filter.py index 05698ec6..a40ad4aa 100644 --- a/tb_rest_client/models/models_ce/edge_type_filter.py +++ b/tb_rest_client/models/models_ce/edge_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class EdgeTypeFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -30,27 +30,27 @@ class EdgeTypeFilter(EntityFilter): """ swagger_types = { 'edge_name_filter': 'str', - 'edge_type': 'str' + 'edge_types': 'list[str]' } if hasattr(EntityFilter, "swagger_types"): swagger_types.update(EntityFilter.swagger_types) attribute_map = { 'edge_name_filter': 'edgeNameFilter', - 'edge_type': 'edgeType' + 'edge_types': 'edgeTypes' } if hasattr(EntityFilter, "attribute_map"): attribute_map.update(EntityFilter.attribute_map) - def __init__(self, edge_name_filter=None, edge_type=None, *args, **kwargs): # noqa: E501 + def __init__(self, edge_name_filter=None, edge_types=None, *args, **kwargs): # noqa: E501 """EdgeTypeFilter - a model defined in Swagger""" # noqa: E501 self._edge_name_filter = None - self._edge_type = None + self._edge_types = None self.discriminator = None if edge_name_filter is not None: self.edge_name_filter = edge_name_filter - if edge_type is not None: - self.edge_type = edge_type + if edge_types is not None: + self.edge_types = edge_types EntityFilter.__init__(self, *args, **kwargs) @property @@ -75,25 +75,25 @@ def edge_name_filter(self, edge_name_filter): self._edge_name_filter = edge_name_filter @property - def edge_type(self): - """Gets the edge_type of this EdgeTypeFilter. # noqa: E501 + def edge_types(self): + """Gets the edge_types of this EdgeTypeFilter. # noqa: E501 - :return: The edge_type of this EdgeTypeFilter. # noqa: E501 - :rtype: str + :return: The edge_types of this EdgeTypeFilter. # noqa: E501 + :rtype: list[str] """ - return self._edge_type + return self._edge_types - @edge_type.setter - def edge_type(self, edge_type): - """Sets the edge_type of this EdgeTypeFilter. + @edge_types.setter + def edge_types(self, edge_types): + """Sets the edge_types of this EdgeTypeFilter. - :param edge_type: The edge_type of this EdgeTypeFilter. # noqa: E501 - :type: str + :param edge_types: The edge_types of this EdgeTypeFilter. # noqa: E501 + :type: list[str] """ - self._edge_type = edge_type + self._edge_types = edge_types def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_ce/efento_coap_device_type_configuration.py b/tb_rest_client/models/models_ce/efento_coap_device_type_configuration.py index e3238a55..ab1dfede 100644 --- a/tb_rest_client/models/models_ce/efento_coap_device_type_configuration.py +++ b/tb_rest_client/models/models_ce/efento_coap_device_type_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EfentoCoapDeviceTypeConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/email_delivery_method_notification_template.py b/tb_rest_client/models/models_ce/email_delivery_method_notification_template.py new file mode 100644 index 00000000..affb808c --- /dev/null +++ b/tb_rest_client/models/models_ce/email_delivery_method_notification_template.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.delivery_method_notification_template import DeliveryMethodNotificationTemplate # noqa: F401,E501 + +class EmailDeliveryMethodNotificationTemplate(DeliveryMethodNotificationTemplate): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'enabled': 'bool', + 'subject': 'str' + } + if hasattr(DeliveryMethodNotificationTemplate, "swagger_types"): + swagger_types.update(DeliveryMethodNotificationTemplate.swagger_types) + + attribute_map = { + 'body': 'body', + 'enabled': 'enabled', + 'subject': 'subject' + } + if hasattr(DeliveryMethodNotificationTemplate, "attribute_map"): + attribute_map.update(DeliveryMethodNotificationTemplate.attribute_map) + + def __init__(self, body=None, enabled=None, subject=None, *args, **kwargs): # noqa: E501 + """EmailDeliveryMethodNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._body = None + self._enabled = None + self._subject = None + self.discriminator = None + if body is not None: + self.body = body + if enabled is not None: + self.enabled = enabled + if subject is not None: + self.subject = subject + DeliveryMethodNotificationTemplate.__init__(self, *args, **kwargs) + + @property + def body(self): + """Gets the body of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The body of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EmailDeliveryMethodNotificationTemplate. + + + :param body: The body of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def enabled(self): + """Gets the enabled of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The enabled of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this EmailDeliveryMethodNotificationTemplate. + + + :param enabled: The enabled of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def subject(self): + """Gets the subject of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The subject of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this EmailDeliveryMethodNotificationTemplate. + + + :param subject: The subject of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._subject = subject + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EmailDeliveryMethodNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailDeliveryMethodNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/email_two_fa_account_config.py b/tb_rest_client/models/models_ce/email_two_fa_account_config.py index 968f07fd..c86da381 100644 --- a/tb_rest_client/models/models_ce/email_two_fa_account_config.py +++ b/tb_rest_client/models/models_ce/email_two_fa_account_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EmailTwoFaAccountConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/email_two_fa_provider_config.py b/tb_rest_client/models/models_ce/email_two_fa_provider_config.py index 3d2f3ce7..6c7c50a8 100644 --- a/tb_rest_client/models/models_ce/email_two_fa_provider_config.py +++ b/tb_rest_client/models/models_ce/email_two_fa_provider_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .two_fa_provider_config import TwoFaProviderConfig # noqa: F401,E501 +from tb_rest_client.models.models_ce.two_fa_provider_config import TwoFaProviderConfig # noqa: F401,E501 class EmailTwoFaProviderConfig(TwoFaProviderConfig): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/entities_limit_notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/entities_limit_notification_rule_trigger_config.py new file mode 100644 index 00000000..23b578a3 --- /dev/null +++ b/tb_rest_client/models/models_ce/entities_limit_notification_rule_trigger_config.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 + +class EntitiesLimitNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'entity_types': 'list[str]', + 'threshold': 'float', + 'trigger_type': 'str' + } + if hasattr(NotificationRuleTriggerConfig, "swagger_types"): + swagger_types.update(NotificationRuleTriggerConfig.swagger_types) + + attribute_map = { + 'entity_types': 'entityTypes', + 'threshold': 'threshold', + 'trigger_type': 'triggerType' + } + if hasattr(NotificationRuleTriggerConfig, "attribute_map"): + attribute_map.update(NotificationRuleTriggerConfig.attribute_map) + + def __init__(self, entity_types=None, threshold=None, trigger_type=None, *args, **kwargs): # noqa: E501 + """EntitiesLimitNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._entity_types = None + self._threshold = None + self._trigger_type = None + self.discriminator = None + if entity_types is not None: + self.entity_types = entity_types + if threshold is not None: + self.threshold = threshold + if trigger_type is not None: + self.trigger_type = trigger_type + NotificationRuleTriggerConfig.__init__(self, *args, **kwargs) + + @property + def entity_types(self): + """Gets the entity_types of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The entity_types of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._entity_types + + @entity_types.setter + def entity_types(self, entity_types): + """Sets the entity_types of this EntitiesLimitNotificationRuleTriggerConfig. + + + :param entity_types: The entity_types of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if not set(entity_types).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `entity_types` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(entity_types) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._entity_types = entity_types + + @property + def threshold(self): + """Gets the threshold of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The threshold of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: float + """ + return self._threshold + + @threshold.setter + def threshold(self, threshold): + """Sets the threshold of this EntitiesLimitNotificationRuleTriggerConfig. + + + :param threshold: The threshold of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: float + """ + + self._threshold = threshold + + @property + def trigger_type(self): + """Gets the trigger_type of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this EntitiesLimitNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EntitiesLimitNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EntitiesLimitNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/entity_action_notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/entity_action_notification_rule_trigger_config.py new file mode 100644 index 00000000..3deadc4c --- /dev/null +++ b/tb_rest_client/models/models_ce/entity_action_notification_rule_trigger_config.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EntityActionNotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created': 'bool', + 'deleted': 'bool', + 'entity_types': 'list[str]', + 'trigger_type': 'str', + 'updated': 'bool' + } + + attribute_map = { + 'created': 'created', + 'deleted': 'deleted', + 'entity_types': 'entityTypes', + 'trigger_type': 'triggerType', + 'updated': 'updated' + } + + def __init__(self, created=None, deleted=None, entity_types=None, trigger_type=None, updated=None): # noqa: E501 + """EntityActionNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._created = None + self._deleted = None + self._entity_types = None + self._trigger_type = None + self._updated = None + self.discriminator = None + if created is not None: + self.created = created + if deleted is not None: + self.deleted = deleted + if entity_types is not None: + self.entity_types = entity_types + if trigger_type is not None: + self.trigger_type = trigger_type + if updated is not None: + self.updated = updated + + @property + def created(self): + """Gets the created of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The created of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this EntityActionNotificationRuleTriggerConfig. + + + :param created: The created of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._created = created + + @property + def deleted(self): + """Gets the deleted of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The deleted of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._deleted + + @deleted.setter + def deleted(self, deleted): + """Sets the deleted of this EntityActionNotificationRuleTriggerConfig. + + + :param deleted: The deleted of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._deleted = deleted + + @property + def entity_types(self): + """Gets the entity_types of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The entity_types of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._entity_types + + @entity_types.setter + def entity_types(self, entity_types): + """Sets the entity_types of this EntityActionNotificationRuleTriggerConfig. + + + :param entity_types: The entity_types of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if not set(entity_types).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `entity_types` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(entity_types) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._entity_types = entity_types + + @property + def trigger_type(self): + """Gets the trigger_type of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this EntityActionNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + @property + def updated(self): + """Gets the updated of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The updated of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._updated + + @updated.setter + def updated(self, updated): + """Sets the updated of this EntityActionNotificationRuleTriggerConfig. + + + :param updated: The updated of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._updated = updated + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EntityActionNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EntityActionNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/entity_count_query.py b/tb_rest_client/models/models_ce/entity_count_query.py index f26799dd..0629a26c 100644 --- a/tb_rest_client/models/models_ce/entity_count_query.py +++ b/tb_rest_client/models/models_ce/entity_count_query.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityCountQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_data.py b/tb_rest_client/models/models_ce/entity_data.py index 9d991454..a4e267bf 100644 --- a/tb_rest_client/models/models_ce/entity_data.py +++ b/tb_rest_client/models/models_ce/entity_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,23 +28,28 @@ class EntityData(object): and the value is json key in definition. """ swagger_types = { + 'agg_latest': 'dict(str, ComparisonTsValue)', 'entity_id': 'EntityId', 'latest': 'dict(str, object)', 'timeseries': 'dict(str, list[TsValue])' } attribute_map = { + 'agg_latest': 'aggLatest', 'entity_id': 'entityId', 'latest': 'latest', 'timeseries': 'timeseries' } - def __init__(self, entity_id=None, latest=None, timeseries=None): # noqa: E501 + def __init__(self, agg_latest=None, entity_id=None, latest=None, timeseries=None): # noqa: E501 """EntityData - a model defined in Swagger""" # noqa: E501 + self._agg_latest = None self._entity_id = None self._latest = None self._timeseries = None self.discriminator = None + if agg_latest is not None: + self.agg_latest = agg_latest if entity_id is not None: self.entity_id = entity_id if latest is not None: @@ -52,6 +57,27 @@ def __init__(self, entity_id=None, latest=None, timeseries=None): # noqa: E501 if timeseries is not None: self.timeseries = timeseries + @property + def agg_latest(self): + """Gets the agg_latest of this EntityData. # noqa: E501 + + + :return: The agg_latest of this EntityData. # noqa: E501 + :rtype: dict(str, ComparisonTsValue) + """ + return self._agg_latest + + @agg_latest.setter + def agg_latest(self, agg_latest): + """Sets the agg_latest of this EntityData. + + + :param agg_latest: The agg_latest of this EntityData. # noqa: E501 + :type: dict(str, ComparisonTsValue) + """ + + self._agg_latest = agg_latest + @property def entity_id(self): """Gets the entity_id of this EntityData. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/entity_data_diff.py b/tb_rest_client/models/models_ce/entity_data_diff.py index 9d43719f..7e228010 100644 --- a/tb_rest_client/models/models_ce/entity_data_diff.py +++ b/tb_rest_client/models/models_ce/entity_data_diff.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityDataDiff(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_data_info.py b/tb_rest_client/models/models_ce/entity_data_info.py index e6390a94..9a9691a2 100644 --- a/tb_rest_client/models/models_ce/entity_data_info.py +++ b/tb_rest_client/models/models_ce/entity_data_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityDataInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_data_page_link.py b/tb_rest_client/models/models_ce/entity_data_page_link.py index 22fb21e4..d6ec4fdf 100644 --- a/tb_rest_client/models/models_ce/entity_data_page_link.py +++ b/tb_rest_client/models/models_ce/entity_data_page_link.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityDataPageLink(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_data_query.py b/tb_rest_client/models/models_ce/entity_data_query.py index 296ba8ca..baa5a76e 100644 --- a/tb_rest_client/models/models_ce/entity_data_query.py +++ b/tb_rest_client/models/models_ce/entity_data_query.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityDataQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_data_sort_order.py b/tb_rest_client/models/models_ce/entity_data_sort_order.py index c25fc5cb..247ddb1d 100644 --- a/tb_rest_client/models/models_ce/entity_data_sort_order.py +++ b/tb_rest_client/models/models_ce/entity_data_sort_order.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityDataSortOrder(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_export_dataobject.py b/tb_rest_client/models/models_ce/entity_export_dataobject.py index 56592a5d..7a9cb1ca 100644 --- a/tb_rest_client/models/models_ce/entity_export_dataobject.py +++ b/tb_rest_client/models/models_ce/entity_export_dataobject.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityExportDataobject(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -117,7 +117,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityExportDataobject. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/entity_filter.py b/tb_rest_client/models/models_ce/entity_filter.py index 6b8a6bf3..0c0db874 100644 --- a/tb_rest_client/models/models_ce/entity_filter.py +++ b/tb_rest_client/models/models_ce/entity_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityFilter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_id.py b/tb_rest_client/models/models_ce/entity_id.py index f18ff145..f5ab7666 100644 --- a/tb_rest_client/models/models_ce/entity_id.py +++ b/tb_rest_client/models/models_ce/entity_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -90,7 +90,7 @@ def entity_type(self, entity_type): """ if entity_type is None: raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/entity_info.py b/tb_rest_client/models/models_ce/entity_info.py index eedc2659..d89163da 100644 --- a/tb_rest_client/models/models_ce/entity_info.py +++ b/tb_rest_client/models/models_ce/entity_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_key.py b/tb_rest_client/models/models_ce/entity_key.py index 17987f7b..e6b8fe0e 100644 --- a/tb_rest_client/models/models_ce/entity_key.py +++ b/tb_rest_client/models/models_ce/entity_key.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityKey(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_list_filter.py b/tb_rest_client/models/models_ce/entity_list_filter.py index 9df70de8..1076d491 100644 --- a/tb_rest_client/models/models_ce/entity_list_filter.py +++ b/tb_rest_client/models/models_ce/entity_list_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class EntityListFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -92,7 +92,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityListFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/entity_load_error.py b/tb_rest_client/models/models_ce/entity_load_error.py index 704d5443..c85a7207 100644 --- a/tb_rest_client/models/models_ce/entity_load_error.py +++ b/tb_rest_client/models/models_ce/entity_load_error.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityLoadError(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_name_filter.py b/tb_rest_client/models/models_ce/entity_name_filter.py index 67c4b9b5..a3b26651 100644 --- a/tb_rest_client/models/models_ce/entity_name_filter.py +++ b/tb_rest_client/models/models_ce/entity_name_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class EntityNameFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -92,7 +92,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityNameFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/entity_relation.py b/tb_rest_client/models/models_ce/entity_relation.py index c469f61d..121a4a39 100644 --- a/tb_rest_client/models/models_ce/entity_relation.py +++ b/tb_rest_client/models/models_ce/entity_relation.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityRelation(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_relation_info.py b/tb_rest_client/models/models_ce/entity_relation_info.py index 65f51375..63927f74 100644 --- a/tb_rest_client/models/models_ce/entity_relation_info.py +++ b/tb_rest_client/models/models_ce/entity_relation_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityRelationInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_relations_query.py b/tb_rest_client/models/models_ce/entity_relations_query.py index 0bbbc9b1..46c6d18c 100644 --- a/tb_rest_client/models/models_ce/entity_relations_query.py +++ b/tb_rest_client/models/models_ce/entity_relations_query.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityRelationsQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_subtype.py b/tb_rest_client/models/models_ce/entity_subtype.py index 83aafc76..6eb470b4 100644 --- a/tb_rest_client/models/models_ce/entity_subtype.py +++ b/tb_rest_client/models/models_ce/entity_subtype.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntitySubtype(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -70,7 +70,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntitySubtype. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/entity_type_filter.py b/tb_rest_client/models/models_ce/entity_type_filter.py index e50cd573..fa2b8cc0 100644 --- a/tb_rest_client/models/models_ce/entity_type_filter.py +++ b/tb_rest_client/models/models_ce/entity_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class EntityTypeFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -66,7 +66,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityTypeFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/entity_type_load_result.py b/tb_rest_client/models/models_ce/entity_type_load_result.py index 8e49d9b8..52ea67da 100644 --- a/tb_rest_client/models/models_ce/entity_type_load_result.py +++ b/tb_rest_client/models/models_ce/entity_type_load_result.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityTypeLoadResult(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -117,7 +117,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityTypeLoadResult. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/entity_type_version_create_config.py b/tb_rest_client/models/models_ce/entity_type_version_create_config.py index 0e1f7758..63ddcaf8 100644 --- a/tb_rest_client/models/models_ce/entity_type_version_create_config.py +++ b/tb_rest_client/models/models_ce/entity_type_version_create_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityTypeVersionCreateConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_type_version_load_config.py b/tb_rest_client/models/models_ce/entity_type_version_load_config.py index ff0adc1c..a9de82f2 100644 --- a/tb_rest_client/models/models_ce/entity_type_version_load_config.py +++ b/tb_rest_client/models/models_ce/entity_type_version_load_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityTypeVersionLoadConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_type_version_load_request.py b/tb_rest_client/models/models_ce/entity_type_version_load_request.py index c34e9bad..7cc5e835 100644 --- a/tb_rest_client/models/models_ce/entity_type_version_load_request.py +++ b/tb_rest_client/models/models_ce/entity_type_version_load_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .version_load_request import VersionLoadRequest # noqa: F401,E501 +from tb_rest_client.models.models_ce.version_load_request import VersionLoadRequest # noqa: F401,E501 class EntityTypeVersionLoadRequest(VersionLoadRequest): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -56,7 +56,7 @@ def __init__(self, entity_types=None, type=None, version_id=None, *args, **kwarg self.type = type if version_id is not None: self.version_id = version_id - VersionLoadRequest.__init__(self,type, version_id) + VersionLoadRequest.__init__(self, *args, **kwargs) @property def entity_types(self): diff --git a/tb_rest_client/models/models_ce/entity_version.py b/tb_rest_client/models/models_ce/entity_version.py index aa4cce0b..18155c37 100644 --- a/tb_rest_client/models/models_ce/entity_version.py +++ b/tb_rest_client/models/models_ce/entity_version.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityVersion(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_view.py b/tb_rest_client/models/models_ce/entity_view.py index c7498bac..37d52e4c 100644 --- a/tb_rest_client/models/models_ce/entity_view.py +++ b/tb_rest_client/models/models_ce/entity_view.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityView(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class EntityView(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'EntityViewId', 'id': 'EntityViewId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -43,7 +42,6 @@ class EntityView(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -57,9 +55,8 @@ class EntityView(object): 'additional_info': 'additionalInfo' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, entity_id=None, keys=None, start_time_ms=None, end_time_ms=None, additional_info=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, entity_id=None, keys=None, start_time_ms=None, end_time_ms=None, additional_info=None): # noqa: E501 """EntityView - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -72,8 +69,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._end_time_ms = None self._additional_info = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -93,27 +88,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if additional_info is not None: self.additional_info = additional_info - @property - def external_id(self): - """Gets the external_id of this EntityView. # noqa: E501 - - - :return: The external_id of this EntityView. # noqa: E501 - :rtype: EntityViewId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this EntityView. - - - :param external_id: The external_id of this EntityView. # noqa: E501 - :type: EntityViewId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this EntityView. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/entity_view_id.py b/tb_rest_client/models/models_ce/entity_view_id.py index df2fd83f..86b18458 100644 --- a/tb_rest_client/models/models_ce/entity_view_id.py +++ b/tb_rest_client/models/models_ce/entity_view_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityViewId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_view_info.py b/tb_rest_client/models/models_ce/entity_view_info.py index e1bfaff1..db879cf9 100644 --- a/tb_rest_client/models/models_ce/entity_view_info.py +++ b/tb_rest_client/models/models_ce/entity_view_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityViewInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class EntityViewInfo(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'EntityViewId', 'id': 'EntityViewId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -45,7 +44,6 @@ class EntityViewInfo(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -61,9 +59,8 @@ class EntityViewInfo(object): 'customer_is_public': 'customerIsPublic' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, entity_id=None, keys=None, start_time_ms=None, end_time_ms=None, additional_info=None, customer_title=None, customer_is_public=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, entity_id=None, keys=None, start_time_ms=None, end_time_ms=None, additional_info=None, customer_title=None, customer_is_public=None): # noqa: E501 """EntityViewInfo - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -78,8 +75,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._customer_title = None self._customer_is_public = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -103,27 +98,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if customer_is_public is not None: self.customer_is_public = customer_is_public - @property - def external_id(self): - """Gets the external_id of this EntityViewInfo. # noqa: E501 - - - :return: The external_id of this EntityViewInfo. # noqa: E501 - :rtype: EntityViewId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this EntityViewInfo. - - - :param external_id: The external_id of this EntityViewInfo. # noqa: E501 - :type: EntityViewId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this EntityViewInfo. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/entity_view_search_query.py b/tb_rest_client/models/models_ce/entity_view_search_query.py index 4b82816c..705dcab3 100644 --- a/tb_rest_client/models/models_ce/entity_view_search_query.py +++ b/tb_rest_client/models/models_ce/entity_view_search_query.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityViewSearchQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/entity_view_search_query_filter.py b/tb_rest_client/models/models_ce/entity_view_search_query_filter.py index 83a28a65..bc0b68a4 100644 --- a/tb_rest_client/models/models_ce/entity_view_search_query_filter.py +++ b/tb_rest_client/models/models_ce/entity_view_search_query_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class EntityViewSearchQueryFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/entity_view_type_filter.py b/tb_rest_client/models/models_ce/entity_view_type_filter.py index 8eedd2ce..36aab3d4 100644 --- a/tb_rest_client/models/models_ce/entity_view_type_filter.py +++ b/tb_rest_client/models/models_ce/entity_view_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class EntityViewTypeFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -30,27 +30,27 @@ class EntityViewTypeFilter(EntityFilter): """ swagger_types = { 'entity_view_name_filter': 'str', - 'entity_view_type': 'str' + 'entity_view_types': 'list[str]' } if hasattr(EntityFilter, "swagger_types"): swagger_types.update(EntityFilter.swagger_types) attribute_map = { 'entity_view_name_filter': 'entityViewNameFilter', - 'entity_view_type': 'entityViewType' + 'entity_view_types': 'entityViewTypes' } if hasattr(EntityFilter, "attribute_map"): attribute_map.update(EntityFilter.attribute_map) - def __init__(self, entity_view_name_filter=None, entity_view_type=None, *args, **kwargs): # noqa: E501 + def __init__(self, entity_view_name_filter=None, entity_view_types=None, *args, **kwargs): # noqa: E501 """EntityViewTypeFilter - a model defined in Swagger""" # noqa: E501 self._entity_view_name_filter = None - self._entity_view_type = None + self._entity_view_types = None self.discriminator = None if entity_view_name_filter is not None: self.entity_view_name_filter = entity_view_name_filter - if entity_view_type is not None: - self.entity_view_type = entity_view_type + if entity_view_types is not None: + self.entity_view_types = entity_view_types EntityFilter.__init__(self, *args, **kwargs) @property @@ -75,25 +75,25 @@ def entity_view_name_filter(self, entity_view_name_filter): self._entity_view_name_filter = entity_view_name_filter @property - def entity_view_type(self): - """Gets the entity_view_type of this EntityViewTypeFilter. # noqa: E501 + def entity_view_types(self): + """Gets the entity_view_types of this EntityViewTypeFilter. # noqa: E501 - :return: The entity_view_type of this EntityViewTypeFilter. # noqa: E501 - :rtype: str + :return: The entity_view_types of this EntityViewTypeFilter. # noqa: E501 + :rtype: list[str] """ - return self._entity_view_type + return self._entity_view_types - @entity_view_type.setter - def entity_view_type(self, entity_view_type): - """Sets the entity_view_type of this EntityViewTypeFilter. + @entity_view_types.setter + def entity_view_types(self, entity_view_types): + """Sets the entity_view_types of this EntityViewTypeFilter. - :param entity_view_type: The entity_view_type of this EntityViewTypeFilter. # noqa: E501 - :type: str + :param entity_view_types: The entity_view_types of this EntityViewTypeFilter. # noqa: E501 + :type: list[str] """ - self._entity_view_type = entity_view_type + self._entity_view_types = entity_view_types def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_ce/error_event_filter.py b/tb_rest_client/models/models_ce/error_event_filter.py index a66b726e..931e977f 100644 --- a/tb_rest_client/models/models_ce/error_event_filter.py +++ b/tb_rest_client/models/models_ce/error_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .event_filter import EventFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.event_filter import EventFilter # noqa: F401,E501 class ErrorEventFilter(EventFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -29,6 +29,7 @@ class ErrorEventFilter(EventFilter): and the value is json key in definition. """ swagger_types = { + 'not_empty': 'bool', 'event_type': 'str', 'server': 'str', 'method': 'str', @@ -38,6 +39,7 @@ class ErrorEventFilter(EventFilter): swagger_types.update(EventFilter.swagger_types) attribute_map = { + 'not_empty': 'notEmpty', 'event_type': 'eventType', 'server': 'server', 'method': 'method', @@ -46,13 +48,16 @@ class ErrorEventFilter(EventFilter): if hasattr(EventFilter, "attribute_map"): attribute_map.update(EventFilter.attribute_map) - def __init__(self, event_type=None, server=None, method=None, error_str=None, *args, **kwargs): # noqa: E501 + def __init__(self, not_empty=None, event_type=None, server=None, method=None, error_str=None, *args, **kwargs): # noqa: E501 """ErrorEventFilter - a model defined in Swagger""" # noqa: E501 + self._not_empty = None self._event_type = None self._server = None self._method = None self._error_str = None self.discriminator = None + if not_empty is not None: + self.not_empty = not_empty self.event_type = event_type if server is not None: self.server = server @@ -62,6 +67,27 @@ def __init__(self, event_type=None, server=None, method=None, error_str=None, *a self.error_str = error_str EventFilter.__init__(self, *args, **kwargs) + @property + def not_empty(self): + """Gets the not_empty of this ErrorEventFilter. # noqa: E501 + + + :return: The not_empty of this ErrorEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this ErrorEventFilter. + + + :param not_empty: The not_empty of this ErrorEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + @property def event_type(self): """Gets the event_type of this ErrorEventFilter. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/escalated_notification_rule_recipients_config.py b/tb_rest_client/models/models_ce/escalated_notification_rule_recipients_config.py new file mode 100644 index 00000000..f5756c9e --- /dev/null +++ b/tb_rest_client/models/models_ce/escalated_notification_rule_recipients_config.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EscalatedNotificationRuleRecipientsConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'escalation_table': 'dict(str, list[str])', + 'trigger_type': 'str' + } + + attribute_map = { + 'escalation_table': 'escalationTable', + 'trigger_type': 'triggerType' + } + + def __init__(self, escalation_table=None, trigger_type=None): # noqa: E501 + """EscalatedNotificationRuleRecipientsConfig - a model defined in Swagger""" # noqa: E501 + self._escalation_table = None + self._trigger_type = None + self.discriminator = None + if escalation_table is not None: + self.escalation_table = escalation_table + self.trigger_type = trigger_type + + @property + def escalation_table(self): + """Gets the escalation_table of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + + + :return: The escalation_table of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + :rtype: dict(str, list[str]) + """ + return self._escalation_table + + @escalation_table.setter + def escalation_table(self, escalation_table): + """Sets the escalation_table of this EscalatedNotificationRuleRecipientsConfig. + + + :param escalation_table: The escalation_table of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + :type: dict(str, list[str]) + """ + + self._escalation_table = escalation_table + + @property + def trigger_type(self): + """Gets the trigger_type of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + + + :return: The trigger_type of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this EscalatedNotificationRuleRecipientsConfig. + + + :param trigger_type: The trigger_type of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + :type: str + """ + if trigger_type is None: + raise ValueError("Invalid value for `trigger_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EscalatedNotificationRuleRecipientsConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EscalatedNotificationRuleRecipientsConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/event.py b/tb_rest_client/models/models_ce/event.py index bcf8a3b6..2c60415d 100644 --- a/tb_rest_client/models/models_ce/event.py +++ b/tb_rest_client/models/models_ce/event.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.4.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_ce/event_filter.py b/tb_rest_client/models/models_ce/event_filter.py index c8dffd2a..b6c189d4 100644 --- a/tb_rest_client/models/models_ce/event_filter.py +++ b/tb_rest_client/models/models_ce/event_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EventFilter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,19 +28,45 @@ class EventFilter(object): and the value is json key in definition. """ swagger_types = { + 'not_empty': 'bool', 'event_type': 'str' } attribute_map = { + 'not_empty': 'notEmpty', 'event_type': 'eventType' } - def __init__(self, event_type=None): # noqa: E501 + def __init__(self, not_empty=None, event_type=None): # noqa: E501 """EventFilter - a model defined in Swagger""" # noqa: E501 + self._not_empty = None self._event_type = None self.discriminator = None + if not_empty is not None: + self.not_empty = not_empty self.event_type = event_type + @property + def not_empty(self): + """Gets the not_empty of this EventFilter. # noqa: E501 + + + :return: The not_empty of this EventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this EventFilter. + + + :param not_empty: The not_empty of this EventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + @property def event_type(self): """Gets the event_type of this EventFilter. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/event_id.py b/tb_rest_client/models/models_ce/event_id.py index e3b1ee16..697c3dec 100644 --- a/tb_rest_client/models/models_ce/event_id.py +++ b/tb_rest_client/models/models_ce/event_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EventId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,13 +28,11 @@ class EventId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_ce/event_info.py b/tb_rest_client/models/models_ce/event_info.py new file mode 100644 index 00000000..aac59048 --- /dev/null +++ b/tb_rest_client/models/models_ce/event_info.py @@ -0,0 +1,272 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EventInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'EventId', + 'tenant_id': 'TenantId', + 'type': 'str', + 'uid': 'str', + 'entity_id': 'EntityId', + 'body': 'JsonNode', + 'created_time': 'int' + } + + attribute_map = { + 'id': 'id', + 'tenant_id': 'tenantId', + 'type': 'type', + 'uid': 'uid', + 'entity_id': 'entityId', + 'body': 'body', + 'created_time': 'createdTime' + } + + def __init__(self, id=None, tenant_id=None, type=None, uid=None, entity_id=None, body=None, created_time=None): # noqa: E501 + """EventInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._tenant_id = None + self._type = None + self._uid = None + self._entity_id = None + self._body = None + self._created_time = None + self.discriminator = None + if id is not None: + self.id = id + if tenant_id is not None: + self.tenant_id = tenant_id + if type is not None: + self.type = type + if uid is not None: + self.uid = uid + if entity_id is not None: + self.entity_id = entity_id + if body is not None: + self.body = body + if created_time is not None: + self.created_time = created_time + + @property + def id(self): + """Gets the id of this EventInfo. # noqa: E501 + + + :return: The id of this EventInfo. # noqa: E501 + :rtype: EventId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EventInfo. + + + :param id: The id of this EventInfo. # noqa: E501 + :type: EventId + """ + + self._id = id + + @property + def tenant_id(self): + """Gets the tenant_id of this EventInfo. # noqa: E501 + + + :return: The tenant_id of this EventInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this EventInfo. + + + :param tenant_id: The tenant_id of this EventInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def type(self): + """Gets the type of this EventInfo. # noqa: E501 + + Event type # noqa: E501 + + :return: The type of this EventInfo. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this EventInfo. + + Event type # noqa: E501 + + :param type: The type of this EventInfo. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def uid(self): + """Gets the uid of this EventInfo. # noqa: E501 + + string # noqa: E501 + + :return: The uid of this EventInfo. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this EventInfo. + + string # noqa: E501 + + :param uid: The uid of this EventInfo. # noqa: E501 + :type: str + """ + + self._uid = uid + + @property + def entity_id(self): + """Gets the entity_id of this EventInfo. # noqa: E501 + + + :return: The entity_id of this EventInfo. # noqa: E501 + :rtype: EntityId + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this EventInfo. + + + :param entity_id: The entity_id of this EventInfo. # noqa: E501 + :type: EntityId + """ + + self._entity_id = entity_id + + @property + def body(self): + """Gets the body of this EventInfo. # noqa: E501 + + + :return: The body of this EventInfo. # noqa: E501 + :rtype: JsonNode + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EventInfo. + + + :param body: The body of this EventInfo. # noqa: E501 + :type: JsonNode + """ + + self._body = body + + @property + def created_time(self): + """Gets the created_time of this EventInfo. # noqa: E501 + + Timestamp of the event creation, in milliseconds # noqa: E501 + + :return: The created_time of this EventInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this EventInfo. + + Timestamp of the event creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this EventInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EventInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EventInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/features_info.py b/tb_rest_client/models/models_ce/features_info.py new file mode 100644 index 00000000..196e5ddf --- /dev/null +++ b/tb_rest_client/models/models_ce/features_info.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class FeaturesInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email_enabled': 'bool', + 'notification_enabled': 'bool', + 'oauth_enabled': 'bool', + 'sms_enabled': 'bool', + 'two_fa_enabled': 'bool' + } + + attribute_map = { + 'email_enabled': 'emailEnabled', + 'notification_enabled': 'notificationEnabled', + 'oauth_enabled': 'oauthEnabled', + 'sms_enabled': 'smsEnabled', + 'two_fa_enabled': 'twoFaEnabled' + } + + def __init__(self, email_enabled=None, notification_enabled=None, oauth_enabled=None, sms_enabled=None, two_fa_enabled=None): # noqa: E501 + """FeaturesInfo - a model defined in Swagger""" # noqa: E501 + self._email_enabled = None + self._notification_enabled = None + self._oauth_enabled = None + self._sms_enabled = None + self._two_fa_enabled = None + self.discriminator = None + if email_enabled is not None: + self.email_enabled = email_enabled + if notification_enabled is not None: + self.notification_enabled = notification_enabled + if oauth_enabled is not None: + self.oauth_enabled = oauth_enabled + if sms_enabled is not None: + self.sms_enabled = sms_enabled + if two_fa_enabled is not None: + self.two_fa_enabled = two_fa_enabled + + @property + def email_enabled(self): + """Gets the email_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The email_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._email_enabled + + @email_enabled.setter + def email_enabled(self, email_enabled): + """Sets the email_enabled of this FeaturesInfo. + + + :param email_enabled: The email_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._email_enabled = email_enabled + + @property + def notification_enabled(self): + """Gets the notification_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The notification_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._notification_enabled + + @notification_enabled.setter + def notification_enabled(self, notification_enabled): + """Sets the notification_enabled of this FeaturesInfo. + + + :param notification_enabled: The notification_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._notification_enabled = notification_enabled + + @property + def oauth_enabled(self): + """Gets the oauth_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The oauth_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._oauth_enabled + + @oauth_enabled.setter + def oauth_enabled(self, oauth_enabled): + """Sets the oauth_enabled of this FeaturesInfo. + + + :param oauth_enabled: The oauth_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._oauth_enabled = oauth_enabled + + @property + def sms_enabled(self): + """Gets the sms_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The sms_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._sms_enabled + + @sms_enabled.setter + def sms_enabled(self, sms_enabled): + """Sets the sms_enabled of this FeaturesInfo. + + + :param sms_enabled: The sms_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._sms_enabled = sms_enabled + + @property + def two_fa_enabled(self): + """Gets the two_fa_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The two_fa_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._two_fa_enabled + + @two_fa_enabled.setter + def two_fa_enabled(self, two_fa_enabled): + """Sets the two_fa_enabled of this FeaturesInfo. + + + :param two_fa_enabled: The two_fa_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._two_fa_enabled = two_fa_enabled + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FeaturesInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FeaturesInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/filter_predicate_valueboolean.py b/tb_rest_client/models/models_ce/filter_predicate_valueboolean.py index 73cde55b..5f45a8c8 100644 --- a/tb_rest_client/models/models_ce/filter_predicate_valueboolean.py +++ b/tb_rest_client/models/models_ce/filter_predicate_valueboolean.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class FilterPredicateValueboolean(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/filter_predicate_valuedouble.py b/tb_rest_client/models/models_ce/filter_predicate_valuedouble.py index e091d094..5bbccb3e 100644 --- a/tb_rest_client/models/models_ce/filter_predicate_valuedouble.py +++ b/tb_rest_client/models/models_ce/filter_predicate_valuedouble.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class FilterPredicateValuedouble(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/filter_predicate_valueint.py b/tb_rest_client/models/models_ce/filter_predicate_valueint.py index 262ae7c5..c3759ecf 100644 --- a/tb_rest_client/models/models_ce/filter_predicate_valueint.py +++ b/tb_rest_client/models/models_ce/filter_predicate_valueint.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class FilterPredicateValueint(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/filter_predicate_valuelong.py b/tb_rest_client/models/models_ce/filter_predicate_valuelong.py index 32a5b2d2..c646eb9f 100644 --- a/tb_rest_client/models/models_ce/filter_predicate_valuelong.py +++ b/tb_rest_client/models/models_ce/filter_predicate_valuelong.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class FilterPredicateValuelong(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/filter_predicate_valuestring.py b/tb_rest_client/models/models_ce/filter_predicate_valuestring.py index e0172503..1b39b940 100644 --- a/tb_rest_client/models/models_ce/filter_predicate_valuestring.py +++ b/tb_rest_client/models/models_ce/filter_predicate_valuestring.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class FilterPredicateValuestring(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/home_dashboard.py b/tb_rest_client/models/models_ce/home_dashboard.py index da3afc68..9fbf7d1d 100644 --- a/tb_rest_client/models/models_ce/home_dashboard.py +++ b/tb_rest_client/models/models_ce/home_dashboard.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class HomeDashboard(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class HomeDashboard(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'DashboardId', 'created_time': 'int', 'tenant_id': 'TenantId', 'name': 'str', @@ -42,7 +41,6 @@ class HomeDashboard(object): } attribute_map = { - 'external_id': 'externalId', 'created_time': 'createdTime', 'tenant_id': 'tenantId', 'name': 'name', @@ -55,9 +53,8 @@ class HomeDashboard(object): 'hide_dashboard_toolbar': 'hideDashboardToolbar' } - def __init__(self, external_id=None, created_time=None, tenant_id=None, name=None, title=None, assigned_customers=None, mobile_hide=None, mobile_order=None, image=None, configuration=None, hide_dashboard_toolbar=None): # noqa: E501 + def __init__(self, created_time=None, tenant_id=None, name=None, title=None, assigned_customers=None, mobile_hide=None, mobile_order=None, image=None, configuration=None, hide_dashboard_toolbar=None): # noqa: E501 """HomeDashboard - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._created_time = None self._tenant_id = None self._name = None @@ -69,8 +66,6 @@ def __init__(self, external_id=None, created_time=None, tenant_id=None, name=Non self._configuration = None self._hide_dashboard_toolbar = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if created_time is not None: self.created_time = created_time if tenant_id is not None: @@ -92,27 +87,6 @@ def __init__(self, external_id=None, created_time=None, tenant_id=None, name=Non if hide_dashboard_toolbar is not None: self.hide_dashboard_toolbar = hide_dashboard_toolbar - @property - def external_id(self): - """Gets the external_id of this HomeDashboard. # noqa: E501 - - - :return: The external_id of this HomeDashboard. # noqa: E501 - :rtype: DashboardId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this HomeDashboard. - - - :param external_id: The external_id of this HomeDashboard. # noqa: E501 - :type: DashboardId - """ - - self._external_id = external_id - @property def created_time(self): """Gets the created_time of this HomeDashboard. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/home_dashboard_info.py b/tb_rest_client/models/models_ce/home_dashboard_info.py index bfe857cb..7f28e67b 100644 --- a/tb_rest_client/models/models_ce/home_dashboard_info.py +++ b/tb_rest_client/models/models_ce/home_dashboard_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class HomeDashboardInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/input_stream.py b/tb_rest_client/models/models_ce/input_stream.py index d5e81c76..5d462a01 100644 --- a/tb_rest_client/models/models_ce/input_stream.py +++ b/tb_rest_client/models/models_ce/input_stream.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class InputStream(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/json_node.py b/tb_rest_client/models/models_ce/json_node.py index 6b0766a3..ed06dd43 100644 --- a/tb_rest_client/models/models_ce/json_node.py +++ b/tb_rest_client/models/models_ce/json_node.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class JsonNode(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/json_transport_payload_configuration.py b/tb_rest_client/models/models_ce/json_transport_payload_configuration.py index 8d1ad116..8152df0b 100644 --- a/tb_rest_client/models/models_ce/json_transport_payload_configuration.py +++ b/tb_rest_client/models/models_ce/json_transport_payload_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .transport_payload_type_configuration import TransportPayloadTypeConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.transport_payload_type_configuration import TransportPayloadTypeConfiguration # noqa: F401,E501 class JsonTransportPayloadConfiguration(TransportPayloadTypeConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/jwt_pair.py b/tb_rest_client/models/models_ce/jwt_pair.py index 7fb33266..666c0bc2 100644 --- a/tb_rest_client/models/models_ce/jwt_pair.py +++ b/tb_rest_client/models/models_ce/jwt_pair.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.2-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import six - class JWTPair(object): """NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. """ """ @@ -56,6 +56,7 @@ def __init__(self, scope=None, refresh_token=None, token=None): # noqa: E501 def scope(self): """Gets the scope of this JWTPair. # noqa: E501 + :return: The scope of this JWTPair. # noqa: E501 :rtype: str """ diff --git a/tb_rest_client/models/models_ce/jwt_settings.py b/tb_rest_client/models/models_ce/jwt_settings.py index 068c3fbd..1d3941e9 100644 --- a/tb_rest_client/models/models_ce/jwt_settings.py +++ b/tb_rest_client/models/models_ce/jwt_settings.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.2-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,7 +15,6 @@ import six - class JWTSettings(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/tb_rest_client/models/models_ce/key_filter.py b/tb_rest_client/models/models_ce/key_filter.py index 0fe8f290..0c28e7e0 100644 --- a/tb_rest_client/models/models_ce/key_filter.py +++ b/tb_rest_client/models/models_ce/key_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class KeyFilter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/key_filter_predicate.py b/tb_rest_client/models/models_ce/key_filter_predicate.py index 5fe11cd4..26ebef0e 100644 --- a/tb_rest_client/models/models_ce/key_filter_predicate.py +++ b/tb_rest_client/models/models_ce/key_filter_predicate.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class KeyFilterPredicate(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/last_visited_dashboard_info.py b/tb_rest_client/models/models_ce/last_visited_dashboard_info.py new file mode 100644 index 00000000..1b7a0442 --- /dev/null +++ b/tb_rest_client/models/models_ce/last_visited_dashboard_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class LastVisitedDashboardInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'title': 'str', + 'starred': 'bool', + 'last_visited': 'int' + } + + attribute_map = { + 'id': 'id', + 'title': 'title', + 'starred': 'starred', + 'last_visited': 'lastVisited' + } + + def __init__(self, id=None, title=None, starred=None, last_visited=None): # noqa: E501 + """LastVisitedDashboardInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._title = None + self._starred = None + self._last_visited = None + self.discriminator = None + if id is not None: + self.id = id + if title is not None: + self.title = title + if starred is not None: + self.starred = starred + if last_visited is not None: + self.last_visited = last_visited + + @property + def id(self): + """Gets the id of this LastVisitedDashboardInfo. # noqa: E501 + + JSON object with Dashboard id. # noqa: E501 + + :return: The id of this LastVisitedDashboardInfo. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this LastVisitedDashboardInfo. + + JSON object with Dashboard id. # noqa: E501 + + :param id: The id of this LastVisitedDashboardInfo. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def title(self): + """Gets the title of this LastVisitedDashboardInfo. # noqa: E501 + + Title of the dashboard. # noqa: E501 + + :return: The title of this LastVisitedDashboardInfo. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this LastVisitedDashboardInfo. + + Title of the dashboard. # noqa: E501 + + :param title: The title of this LastVisitedDashboardInfo. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def starred(self): + """Gets the starred of this LastVisitedDashboardInfo. # noqa: E501 + + Starred flag # noqa: E501 + + :return: The starred of this LastVisitedDashboardInfo. # noqa: E501 + :rtype: bool + """ + return self._starred + + @starred.setter + def starred(self, starred): + """Sets the starred of this LastVisitedDashboardInfo. + + Starred flag # noqa: E501 + + :param starred: The starred of this LastVisitedDashboardInfo. # noqa: E501 + :type: bool + """ + + self._starred = starred + + @property + def last_visited(self): + """Gets the last_visited of this LastVisitedDashboardInfo. # noqa: E501 + + Last visit timestamp # noqa: E501 + + :return: The last_visited of this LastVisitedDashboardInfo. # noqa: E501 + :rtype: int + """ + return self._last_visited + + @last_visited.setter + def last_visited(self, last_visited): + """Sets the last_visited of this LastVisitedDashboardInfo. + + Last visit timestamp # noqa: E501 + + :param last_visited: The last_visited of this LastVisitedDashboardInfo. # noqa: E501 + :type: int + """ + + self._last_visited = last_visited + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LastVisitedDashboardInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LastVisitedDashboardInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/life_cycle_event_filter.py b/tb_rest_client/models/models_ce/life_cycle_event_filter.py index 4820e07d..73575fea 100644 --- a/tb_rest_client/models/models_ce/life_cycle_event_filter.py +++ b/tb_rest_client/models/models_ce/life_cycle_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .event_filter import EventFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.event_filter import EventFilter # noqa: F401,E501 class LifeCycleEventFilter(EventFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -29,6 +29,7 @@ class LifeCycleEventFilter(EventFilter): and the value is json key in definition. """ swagger_types = { + 'not_empty': 'bool', 'event_type': 'str', 'server': 'str', 'event': 'str', @@ -39,6 +40,7 @@ class LifeCycleEventFilter(EventFilter): swagger_types.update(EventFilter.swagger_types) attribute_map = { + 'not_empty': 'notEmpty', 'event_type': 'eventType', 'server': 'server', 'event': 'event', @@ -48,14 +50,17 @@ class LifeCycleEventFilter(EventFilter): if hasattr(EventFilter, "attribute_map"): attribute_map.update(EventFilter.attribute_map) - def __init__(self, event_type=None, server=None, event=None, status=None, error_str=None, *args, **kwargs): # noqa: E501 + def __init__(self, not_empty=None, event_type=None, server=None, event=None, status=None, error_str=None, *args, **kwargs): # noqa: E501 """LifeCycleEventFilter - a model defined in Swagger""" # noqa: E501 + self._not_empty = None self._event_type = None self._server = None self._event = None self._status = None self._error_str = None self.discriminator = None + if not_empty is not None: + self.not_empty = not_empty self.event_type = event_type if server is not None: self.server = server @@ -67,6 +72,27 @@ def __init__(self, event_type=None, server=None, event=None, status=None, error_ self.error_str = error_str EventFilter.__init__(self, *args, **kwargs) + @property + def not_empty(self): + """Gets the not_empty of this LifeCycleEventFilter. # noqa: E501 + + + :return: The not_empty of this LifeCycleEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this LifeCycleEventFilter. + + + :param not_empty: The not_empty of this LifeCycleEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + @property def event_type(self): """Gets the event_type of this LifeCycleEventFilter. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/login_request.py b/tb_rest_client/models/models_ce/login_request.py index 140414c7..d46a9fbd 100644 --- a/tb_rest_client/models/models_ce/login_request.py +++ b/tb_rest_client/models/models_ce/login_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LoginRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/login_response.py b/tb_rest_client/models/models_ce/login_response.py index fddcd1a3..f4189747 100644 --- a/tb_rest_client/models/models_ce/login_response.py +++ b/tb_rest_client/models/models_ce/login_response.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LoginResponse(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/lw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_ce/lw_m2_m_bootstrap_server_credential.py index 0793dffc..9708d054 100644 --- a/tb_rest_client/models/models_ce/lw_m2_m_bootstrap_server_credential.py +++ b/tb_rest_client/models/models_ce/lw_m2_m_bootstrap_server_credential.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LwM2MBootstrapServerCredential(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/lw_m2_m_server_security_config_default.py b/tb_rest_client/models/models_ce/lw_m2_m_server_security_config_default.py index 5e2323d2..f0d576b1 100644 --- a/tb_rest_client/models/models_ce/lw_m2_m_server_security_config_default.py +++ b/tb_rest_client/models/models_ce/lw_m2_m_server_security_config_default.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LwM2MServerSecurityConfigDefault(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/lw_m2m_instance.py b/tb_rest_client/models/models_ce/lw_m2m_instance.py index a236617d..62d89a42 100644 --- a/tb_rest_client/models/models_ce/lw_m2m_instance.py +++ b/tb_rest_client/models/models_ce/lw_m2m_instance.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LwM2mInstance(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/lw_m2m_object.py b/tb_rest_client/models/models_ce/lw_m2m_object.py index ee8678c7..5d9ed2d6 100644 --- a/tb_rest_client/models/models_ce/lw_m2m_object.py +++ b/tb_rest_client/models/models_ce/lw_m2m_object.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LwM2mObject(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/lw_m2m_resource_observe.py b/tb_rest_client/models/models_ce/lw_m2m_resource_observe.py index 81bf7b75..d6c3e117 100644 --- a/tb_rest_client/models/models_ce/lw_m2m_resource_observe.py +++ b/tb_rest_client/models/models_ce/lw_m2m_resource_observe.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LwM2mResourceObserve(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/lwm2m_device_profile_transport_configuration.py b/tb_rest_client/models/models_ce/lwm2m_device_profile_transport_configuration.py index 6a0398e6..f136f97a 100644 --- a/tb_rest_client/models/models_ce/lwm2m_device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_ce/lwm2m_device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 class Lwm2mDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/lwm2m_device_transport_configuration.py b/tb_rest_client/models/models_ce/lwm2m_device_transport_configuration.py index 38ad45a0..e836d0ee 100644 --- a/tb_rest_client/models/models_ce/lwm2m_device_transport_configuration.py +++ b/tb_rest_client/models/models_ce/lwm2m_device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 class Lwm2mDeviceTransportConfiguration(DeviceTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/mapping.py b/tb_rest_client/models/models_ce/mapping.py index 833760a9..1a4aea92 100644 --- a/tb_rest_client/models/models_ce/mapping.py +++ b/tb_rest_client/models/models_ce/mapping.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Mapping(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/mqtt_device_profile_transport_configuration.py b/tb_rest_client/models/models_ce/mqtt_device_profile_transport_configuration.py index 3e40f89a..8c730593 100644 --- a/tb_rest_client/models/models_ce/mqtt_device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_ce/mqtt_device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class MqttDeviceProfileTransportConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,35 +28,71 @@ class MqttDeviceProfileTransportConfiguration(object): and the value is json key in definition. """ swagger_types = { + 'device_attributes_subscribe_topic': 'str', 'device_attributes_topic': 'str', 'device_telemetry_topic': 'str', 'send_ack_on_validation_exception': 'bool', + 'sparkplug': 'bool', + 'sparkplug_attributes_metric_names': 'list[str]', 'transport_payload_type_configuration': 'TransportPayloadTypeConfiguration' } attribute_map = { + 'device_attributes_subscribe_topic': 'deviceAttributesSubscribeTopic', 'device_attributes_topic': 'deviceAttributesTopic', 'device_telemetry_topic': 'deviceTelemetryTopic', 'send_ack_on_validation_exception': 'sendAckOnValidationException', + 'sparkplug': 'sparkplug', + 'sparkplug_attributes_metric_names': 'sparkplugAttributesMetricNames', 'transport_payload_type_configuration': 'transportPayloadTypeConfiguration' } - def __init__(self, device_attributes_topic=None, device_telemetry_topic=None, send_ack_on_validation_exception=None, transport_payload_type_configuration=None): # noqa: E501 + def __init__(self, device_attributes_subscribe_topic=None, device_attributes_topic=None, device_telemetry_topic=None, send_ack_on_validation_exception=None, sparkplug=None, sparkplug_attributes_metric_names=None, transport_payload_type_configuration=None): # noqa: E501 """MqttDeviceProfileTransportConfiguration - a model defined in Swagger""" # noqa: E501 + self._device_attributes_subscribe_topic = None self._device_attributes_topic = None self._device_telemetry_topic = None self._send_ack_on_validation_exception = None + self._sparkplug = None + self._sparkplug_attributes_metric_names = None self._transport_payload_type_configuration = None self.discriminator = None + if device_attributes_subscribe_topic is not None: + self.device_attributes_subscribe_topic = device_attributes_subscribe_topic if device_attributes_topic is not None: self.device_attributes_topic = device_attributes_topic if device_telemetry_topic is not None: self.device_telemetry_topic = device_telemetry_topic if send_ack_on_validation_exception is not None: self.send_ack_on_validation_exception = send_ack_on_validation_exception + if sparkplug is not None: + self.sparkplug = sparkplug + if sparkplug_attributes_metric_names is not None: + self.sparkplug_attributes_metric_names = sparkplug_attributes_metric_names if transport_payload_type_configuration is not None: self.transport_payload_type_configuration = transport_payload_type_configuration + @property + def device_attributes_subscribe_topic(self): + """Gets the device_attributes_subscribe_topic of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + + + :return: The device_attributes_subscribe_topic of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :rtype: str + """ + return self._device_attributes_subscribe_topic + + @device_attributes_subscribe_topic.setter + def device_attributes_subscribe_topic(self, device_attributes_subscribe_topic): + """Sets the device_attributes_subscribe_topic of this MqttDeviceProfileTransportConfiguration. + + + :param device_attributes_subscribe_topic: The device_attributes_subscribe_topic of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :type: str + """ + + self._device_attributes_subscribe_topic = device_attributes_subscribe_topic + @property def device_attributes_topic(self): """Gets the device_attributes_topic of this MqttDeviceProfileTransportConfiguration. # noqa: E501 @@ -120,6 +156,48 @@ def send_ack_on_validation_exception(self, send_ack_on_validation_exception): self._send_ack_on_validation_exception = send_ack_on_validation_exception + @property + def sparkplug(self): + """Gets the sparkplug of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + + + :return: The sparkplug of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :rtype: bool + """ + return self._sparkplug + + @sparkplug.setter + def sparkplug(self, sparkplug): + """Sets the sparkplug of this MqttDeviceProfileTransportConfiguration. + + + :param sparkplug: The sparkplug of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :type: bool + """ + + self._sparkplug = sparkplug + + @property + def sparkplug_attributes_metric_names(self): + """Gets the sparkplug_attributes_metric_names of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + + + :return: The sparkplug_attributes_metric_names of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :rtype: list[str] + """ + return self._sparkplug_attributes_metric_names + + @sparkplug_attributes_metric_names.setter + def sparkplug_attributes_metric_names(self, sparkplug_attributes_metric_names): + """Sets the sparkplug_attributes_metric_names of this MqttDeviceProfileTransportConfiguration. + + + :param sparkplug_attributes_metric_names: The sparkplug_attributes_metric_names of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :type: list[str] + """ + + self._sparkplug_attributes_metric_names = sparkplug_attributes_metric_names + @property def transport_payload_type_configuration(self): """Gets the transport_payload_type_configuration of this MqttDeviceProfileTransportConfiguration. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/mqtt_device_transport_configuration.py b/tb_rest_client/models/models_ce/mqtt_device_transport_configuration.py index b2528f6f..5e66dc99 100644 --- a/tb_rest_client/models/models_ce/mqtt_device_transport_configuration.py +++ b/tb_rest_client/models/models_ce/mqtt_device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 class MqttDeviceTransportConfiguration(DeviceTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/new_platform_version_notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/new_platform_version_notification_rule_trigger_config.py new file mode 100644 index 00000000..4c8aa4d0 --- /dev/null +++ b/tb_rest_client/models/models_ce/new_platform_version_notification_rule_trigger_config.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NewPlatformVersionNotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'trigger_type': 'str' + } + + attribute_map = { + 'trigger_type': 'triggerType' + } + + def __init__(self, trigger_type=None): # noqa: E501 + """NewPlatformVersionNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._trigger_type = None + self.discriminator = None + if trigger_type is not None: + self.trigger_type = trigger_type + + @property + def trigger_type(self): + """Gets the trigger_type of this NewPlatformVersionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this NewPlatformVersionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this NewPlatformVersionNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this NewPlatformVersionNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NewPlatformVersionNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NewPlatformVersionNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/no_sec_lw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_ce/no_sec_lw_m2_m_bootstrap_server_credential.py index 283bf118..3c8a78ec 100644 --- a/tb_rest_client/models/models_ce/no_sec_lw_m2_m_bootstrap_server_credential.py +++ b/tb_rest_client/models/models_ce/no_sec_lw_m2_m_bootstrap_server_credential.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class NoSecLwM2MBootstrapServerCredential(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/node_connection_info.py b/tb_rest_client/models/models_ce/node_connection_info.py index bffef402..3a9fb99c 100644 --- a/tb_rest_client/models/models_ce/node_connection_info.py +++ b/tb_rest_client/models/models_ce/node_connection_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class NodeConnectionInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/notification.py b/tb_rest_client/models/models_ce/notification.py new file mode 100644 index 00000000..bd9ea773 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification.py @@ -0,0 +1,356 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Notification(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'JsonNode', + 'created_time': 'int', + 'id': 'NotificationId', + 'info': 'NotificationInfo', + 'recipient_id': 'UserId', + 'request_id': 'NotificationRequestId', + 'status': 'str', + 'subject': 'str', + 'text': 'str', + 'type': 'str' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'created_time': 'createdTime', + 'id': 'id', + 'info': 'info', + 'recipient_id': 'recipientId', + 'request_id': 'requestId', + 'status': 'status', + 'subject': 'subject', + 'text': 'text', + 'type': 'type' + } + + def __init__(self, additional_config=None, created_time=None, id=None, info=None, recipient_id=None, request_id=None, status=None, subject=None, text=None, type=None): # noqa: E501 + """Notification - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._created_time = None + self._id = None + self._info = None + self._recipient_id = None + self._request_id = None + self._status = None + self._subject = None + self._text = None + self._type = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if created_time is not None: + self.created_time = created_time + if id is not None: + self.id = id + if info is not None: + self.info = info + if recipient_id is not None: + self.recipient_id = recipient_id + if request_id is not None: + self.request_id = request_id + if status is not None: + self.status = status + if subject is not None: + self.subject = subject + if text is not None: + self.text = text + if type is not None: + self.type = type + + @property + def additional_config(self): + """Gets the additional_config of this Notification. # noqa: E501 + + + :return: The additional_config of this Notification. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this Notification. + + + :param additional_config: The additional_config of this Notification. # noqa: E501 + :type: JsonNode + """ + + self._additional_config = additional_config + + @property + def created_time(self): + """Gets the created_time of this Notification. # noqa: E501 + + + :return: The created_time of this Notification. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this Notification. + + + :param created_time: The created_time of this Notification. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this Notification. # noqa: E501 + + + :return: The id of this Notification. # noqa: E501 + :rtype: NotificationId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Notification. + + + :param id: The id of this Notification. # noqa: E501 + :type: NotificationId + """ + + self._id = id + + @property + def info(self): + """Gets the info of this Notification. # noqa: E501 + + + :return: The info of this Notification. # noqa: E501 + :rtype: NotificationInfo + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this Notification. + + + :param info: The info of this Notification. # noqa: E501 + :type: NotificationInfo + """ + + self._info = info + + @property + def recipient_id(self): + """Gets the recipient_id of this Notification. # noqa: E501 + + + :return: The recipient_id of this Notification. # noqa: E501 + :rtype: UserId + """ + return self._recipient_id + + @recipient_id.setter + def recipient_id(self, recipient_id): + """Sets the recipient_id of this Notification. + + + :param recipient_id: The recipient_id of this Notification. # noqa: E501 + :type: UserId + """ + + self._recipient_id = recipient_id + + @property + def request_id(self): + """Gets the request_id of this Notification. # noqa: E501 + + + :return: The request_id of this Notification. # noqa: E501 + :rtype: NotificationRequestId + """ + return self._request_id + + @request_id.setter + def request_id(self, request_id): + """Sets the request_id of this Notification. + + + :param request_id: The request_id of this Notification. # noqa: E501 + :type: NotificationRequestId + """ + + self._request_id = request_id + + @property + def status(self): + """Gets the status of this Notification. # noqa: E501 + + + :return: The status of this Notification. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Notification. + + + :param status: The status of this Notification. # noqa: E501 + :type: str + """ + allowed_values = ["READ", "SENT"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def subject(self): + """Gets the subject of this Notification. # noqa: E501 + + + :return: The subject of this Notification. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this Notification. + + + :param subject: The subject of this Notification. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def text(self): + """Gets the text of this Notification. # noqa: E501 + + + :return: The text of this Notification. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this Notification. + + + :param text: The text of this Notification. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def type(self): + """Gets the type of this Notification. # noqa: E501 + + + :return: The type of this Notification. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Notification. + + + :param type: The type of this Notification. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "GENERAL", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", "RULE_NODE"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Notification, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Notification): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_delivery_method_config.py b/tb_rest_client/models/models_ce/notification_delivery_method_config.py new file mode 100644 index 00000000..5b410a8d --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_delivery_method_config.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationDeliveryMethodConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """NotificationDeliveryMethodConfig - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationDeliveryMethodConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationDeliveryMethodConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_id.py b/tb_rest_client/models/models_ce/notification_id.py new file mode 100644 index 00000000..79bdcc35 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_id.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """NotificationId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this NotificationId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this NotificationId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this NotificationId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this NotificationId. # noqa: E501 + + + :return: The entity_type of this NotificationId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this NotificationId. + + + :param entity_type: The entity_type of this NotificationId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_info.py b/tb_rest_client/models/models_ce/notification_info.py new file mode 100644 index 00000000..6bf8c80e --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_info.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'state_entity_id': 'EntityId' + } + + attribute_map = { + 'state_entity_id': 'stateEntityId' + } + + def __init__(self, state_entity_id=None): # noqa: E501 + """NotificationInfo - a model defined in Swagger""" # noqa: E501 + self._state_entity_id = None + self.discriminator = None + if state_entity_id is not None: + self.state_entity_id = state_entity_id + + @property + def state_entity_id(self): + """Gets the state_entity_id of this NotificationInfo. # noqa: E501 + + + :return: The state_entity_id of this NotificationInfo. # noqa: E501 + :rtype: EntityId + """ + return self._state_entity_id + + @state_entity_id.setter + def state_entity_id(self, state_entity_id): + """Sets the state_entity_id of this NotificationInfo. + + + :param state_entity_id: The state_entity_id of this NotificationInfo. # noqa: E501 + :type: EntityId + """ + + self._state_entity_id = state_entity_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_request.py b/tb_rest_client/models/models_ce/notification_request.py new file mode 100644 index 00000000..1021e114 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_request.py @@ -0,0 +1,402 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'NotificationRequestConfig', + 'created_time': 'int', + 'id': 'NotificationRequestId', + 'info': 'NotificationInfo', + 'originator_entity_id': 'EntityId', + 'rule_id': 'NotificationRuleId', + 'stats': 'NotificationRequestStats', + 'status': 'str', + 'targets': 'list[str]', + 'template': 'NotificationTemplate', + 'template_id': 'NotificationTemplateId', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'created_time': 'createdTime', + 'id': 'id', + 'info': 'info', + 'originator_entity_id': 'originatorEntityId', + 'rule_id': 'ruleId', + 'stats': 'stats', + 'status': 'status', + 'targets': 'targets', + 'template': 'template', + 'template_id': 'templateId', + 'tenant_id': 'tenantId' + } + + def __init__(self, additional_config=None, created_time=None, id=None, info=None, originator_entity_id=None, rule_id=None, stats=None, status=None, targets=None, template=None, template_id=None, tenant_id=None): # noqa: E501 + """NotificationRequest - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._created_time = None + self._id = None + self._info = None + self._originator_entity_id = None + self._rule_id = None + self._stats = None + self._status = None + self._targets = None + self._template = None + self._template_id = None + self._tenant_id = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if created_time is not None: + self.created_time = created_time + if id is not None: + self.id = id + if info is not None: + self.info = info + if originator_entity_id is not None: + self.originator_entity_id = originator_entity_id + if rule_id is not None: + self.rule_id = rule_id + if stats is not None: + self.stats = stats + if status is not None: + self.status = status + if targets is not None: + self.targets = targets + if template is not None: + self.template = template + if template_id is not None: + self.template_id = template_id + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def additional_config(self): + """Gets the additional_config of this NotificationRequest. # noqa: E501 + + + :return: The additional_config of this NotificationRequest. # noqa: E501 + :rtype: NotificationRequestConfig + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this NotificationRequest. + + + :param additional_config: The additional_config of this NotificationRequest. # noqa: E501 + :type: NotificationRequestConfig + """ + + self._additional_config = additional_config + + @property + def created_time(self): + """Gets the created_time of this NotificationRequest. # noqa: E501 + + + :return: The created_time of this NotificationRequest. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationRequest. + + + :param created_time: The created_time of this NotificationRequest. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this NotificationRequest. # noqa: E501 + + + :return: The id of this NotificationRequest. # noqa: E501 + :rtype: NotificationRequestId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRequest. + + + :param id: The id of this NotificationRequest. # noqa: E501 + :type: NotificationRequestId + """ + + self._id = id + + @property + def info(self): + """Gets the info of this NotificationRequest. # noqa: E501 + + + :return: The info of this NotificationRequest. # noqa: E501 + :rtype: NotificationInfo + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this NotificationRequest. + + + :param info: The info of this NotificationRequest. # noqa: E501 + :type: NotificationInfo + """ + + self._info = info + + @property + def originator_entity_id(self): + """Gets the originator_entity_id of this NotificationRequest. # noqa: E501 + + + :return: The originator_entity_id of this NotificationRequest. # noqa: E501 + :rtype: EntityId + """ + return self._originator_entity_id + + @originator_entity_id.setter + def originator_entity_id(self, originator_entity_id): + """Sets the originator_entity_id of this NotificationRequest. + + + :param originator_entity_id: The originator_entity_id of this NotificationRequest. # noqa: E501 + :type: EntityId + """ + + self._originator_entity_id = originator_entity_id + + @property + def rule_id(self): + """Gets the rule_id of this NotificationRequest. # noqa: E501 + + + :return: The rule_id of this NotificationRequest. # noqa: E501 + :rtype: NotificationRuleId + """ + return self._rule_id + + @rule_id.setter + def rule_id(self, rule_id): + """Sets the rule_id of this NotificationRequest. + + + :param rule_id: The rule_id of this NotificationRequest. # noqa: E501 + :type: NotificationRuleId + """ + + self._rule_id = rule_id + + @property + def stats(self): + """Gets the stats of this NotificationRequest. # noqa: E501 + + + :return: The stats of this NotificationRequest. # noqa: E501 + :rtype: NotificationRequestStats + """ + return self._stats + + @stats.setter + def stats(self, stats): + """Sets the stats of this NotificationRequest. + + + :param stats: The stats of this NotificationRequest. # noqa: E501 + :type: NotificationRequestStats + """ + + self._stats = stats + + @property + def status(self): + """Gets the status of this NotificationRequest. # noqa: E501 + + + :return: The status of this NotificationRequest. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this NotificationRequest. + + + :param status: The status of this NotificationRequest. # noqa: E501 + :type: str + """ + allowed_values = ["PROCESSING", "SCHEDULED", "SENT"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def targets(self): + """Gets the targets of this NotificationRequest. # noqa: E501 + + + :return: The targets of this NotificationRequest. # noqa: E501 + :rtype: list[str] + """ + return self._targets + + @targets.setter + def targets(self, targets): + """Sets the targets of this NotificationRequest. + + + :param targets: The targets of this NotificationRequest. # noqa: E501 + :type: list[str] + """ + + self._targets = targets + + @property + def template(self): + """Gets the template of this NotificationRequest. # noqa: E501 + + + :return: The template of this NotificationRequest. # noqa: E501 + :rtype: NotificationTemplate + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this NotificationRequest. + + + :param template: The template of this NotificationRequest. # noqa: E501 + :type: NotificationTemplate + """ + + self._template = template + + @property + def template_id(self): + """Gets the template_id of this NotificationRequest. # noqa: E501 + + + :return: The template_id of this NotificationRequest. # noqa: E501 + :rtype: NotificationTemplateId + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this NotificationRequest. + + + :param template_id: The template_id of this NotificationRequest. # noqa: E501 + :type: NotificationTemplateId + """ + + self._template_id = template_id + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationRequest. # noqa: E501 + + + :return: The tenant_id of this NotificationRequest. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationRequest. + + + :param tenant_id: The tenant_id of this NotificationRequest. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_request_config.py b/tb_rest_client/models/models_ce/notification_request_config.py new file mode 100644 index 00000000..aa17f2d1 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_request_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequestConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'sending_delay_in_sec': 'int' + } + + attribute_map = { + 'sending_delay_in_sec': 'sendingDelayInSec' + } + + def __init__(self, sending_delay_in_sec=None): # noqa: E501 + """NotificationRequestConfig - a model defined in Swagger""" # noqa: E501 + self._sending_delay_in_sec = None + self.discriminator = None + if sending_delay_in_sec is not None: + self.sending_delay_in_sec = sending_delay_in_sec + + @property + def sending_delay_in_sec(self): + """Gets the sending_delay_in_sec of this NotificationRequestConfig. # noqa: E501 + + + :return: The sending_delay_in_sec of this NotificationRequestConfig. # noqa: E501 + :rtype: int + """ + return self._sending_delay_in_sec + + @sending_delay_in_sec.setter + def sending_delay_in_sec(self, sending_delay_in_sec): + """Sets the sending_delay_in_sec of this NotificationRequestConfig. + + + :param sending_delay_in_sec: The sending_delay_in_sec of this NotificationRequestConfig. # noqa: E501 + :type: int + """ + + self._sending_delay_in_sec = sending_delay_in_sec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequestConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequestConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_request_id.py b/tb_rest_client/models/models_ce/notification_request_id.py new file mode 100644 index 00000000..61185002 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_request_id.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequestId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """NotificationRequestId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this NotificationRequestId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this NotificationRequestId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRequestId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this NotificationRequestId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this NotificationRequestId. # noqa: E501 + + + :return: The entity_type of this NotificationRequestId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this NotificationRequestId. + + + :param entity_type: The entity_type of this NotificationRequestId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequestId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequestId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_request_info.py b/tb_rest_client/models/models_ce/notification_request_info.py new file mode 100644 index 00000000..8c4554b8 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_request_info.py @@ -0,0 +1,461 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequestInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'NotificationRequestConfig', + 'created_time': 'int', + 'delivery_methods': 'list[str]', + 'id': 'NotificationRequestId', + 'info': 'NotificationInfo', + 'originator_entity_id': 'EntityId', + 'rule_id': 'NotificationRuleId', + 'stats': 'NotificationRequestStats', + 'status': 'str', + 'targets': 'list[str]', + 'template': 'NotificationTemplate', + 'template_id': 'NotificationTemplateId', + 'template_name': 'str', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'created_time': 'createdTime', + 'delivery_methods': 'deliveryMethods', + 'id': 'id', + 'info': 'info', + 'originator_entity_id': 'originatorEntityId', + 'rule_id': 'ruleId', + 'stats': 'stats', + 'status': 'status', + 'targets': 'targets', + 'template': 'template', + 'template_id': 'templateId', + 'template_name': 'templateName', + 'tenant_id': 'tenantId' + } + + def __init__(self, additional_config=None, created_time=None, delivery_methods=None, id=None, info=None, originator_entity_id=None, rule_id=None, stats=None, status=None, targets=None, template=None, template_id=None, template_name=None, tenant_id=None): # noqa: E501 + """NotificationRequestInfo - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._created_time = None + self._delivery_methods = None + self._id = None + self._info = None + self._originator_entity_id = None + self._rule_id = None + self._stats = None + self._status = None + self._targets = None + self._template = None + self._template_id = None + self._template_name = None + self._tenant_id = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if created_time is not None: + self.created_time = created_time + if delivery_methods is not None: + self.delivery_methods = delivery_methods + if id is not None: + self.id = id + if info is not None: + self.info = info + if originator_entity_id is not None: + self.originator_entity_id = originator_entity_id + if rule_id is not None: + self.rule_id = rule_id + if stats is not None: + self.stats = stats + if status is not None: + self.status = status + if targets is not None: + self.targets = targets + if template is not None: + self.template = template + if template_id is not None: + self.template_id = template_id + if template_name is not None: + self.template_name = template_name + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def additional_config(self): + """Gets the additional_config of this NotificationRequestInfo. # noqa: E501 + + + :return: The additional_config of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationRequestConfig + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this NotificationRequestInfo. + + + :param additional_config: The additional_config of this NotificationRequestInfo. # noqa: E501 + :type: NotificationRequestConfig + """ + + self._additional_config = additional_config + + @property + def created_time(self): + """Gets the created_time of this NotificationRequestInfo. # noqa: E501 + + + :return: The created_time of this NotificationRequestInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationRequestInfo. + + + :param created_time: The created_time of this NotificationRequestInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def delivery_methods(self): + """Gets the delivery_methods of this NotificationRequestInfo. # noqa: E501 + + + :return: The delivery_methods of this NotificationRequestInfo. # noqa: E501 + :rtype: list[str] + """ + return self._delivery_methods + + @delivery_methods.setter + def delivery_methods(self, delivery_methods): + """Sets the delivery_methods of this NotificationRequestInfo. + + + :param delivery_methods: The delivery_methods of this NotificationRequestInfo. # noqa: E501 + :type: list[str] + """ + allowed_values = ["EMAIL", "SLACK", "SMS", "WEB"] # noqa: E501 + if not set(delivery_methods).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `delivery_methods` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(delivery_methods) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._delivery_methods = delivery_methods + + @property + def id(self): + """Gets the id of this NotificationRequestInfo. # noqa: E501 + + + :return: The id of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationRequestId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRequestInfo. + + + :param id: The id of this NotificationRequestInfo. # noqa: E501 + :type: NotificationRequestId + """ + + self._id = id + + @property + def info(self): + """Gets the info of this NotificationRequestInfo. # noqa: E501 + + + :return: The info of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationInfo + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this NotificationRequestInfo. + + + :param info: The info of this NotificationRequestInfo. # noqa: E501 + :type: NotificationInfo + """ + + self._info = info + + @property + def originator_entity_id(self): + """Gets the originator_entity_id of this NotificationRequestInfo. # noqa: E501 + + + :return: The originator_entity_id of this NotificationRequestInfo. # noqa: E501 + :rtype: EntityId + """ + return self._originator_entity_id + + @originator_entity_id.setter + def originator_entity_id(self, originator_entity_id): + """Sets the originator_entity_id of this NotificationRequestInfo. + + + :param originator_entity_id: The originator_entity_id of this NotificationRequestInfo. # noqa: E501 + :type: EntityId + """ + + self._originator_entity_id = originator_entity_id + + @property + def rule_id(self): + """Gets the rule_id of this NotificationRequestInfo. # noqa: E501 + + + :return: The rule_id of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationRuleId + """ + return self._rule_id + + @rule_id.setter + def rule_id(self, rule_id): + """Sets the rule_id of this NotificationRequestInfo. + + + :param rule_id: The rule_id of this NotificationRequestInfo. # noqa: E501 + :type: NotificationRuleId + """ + + self._rule_id = rule_id + + @property + def stats(self): + """Gets the stats of this NotificationRequestInfo. # noqa: E501 + + + :return: The stats of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationRequestStats + """ + return self._stats + + @stats.setter + def stats(self, stats): + """Sets the stats of this NotificationRequestInfo. + + + :param stats: The stats of this NotificationRequestInfo. # noqa: E501 + :type: NotificationRequestStats + """ + + self._stats = stats + + @property + def status(self): + """Gets the status of this NotificationRequestInfo. # noqa: E501 + + + :return: The status of this NotificationRequestInfo. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this NotificationRequestInfo. + + + :param status: The status of this NotificationRequestInfo. # noqa: E501 + :type: str + """ + allowed_values = ["PROCESSING", "SCHEDULED", "SENT"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def targets(self): + """Gets the targets of this NotificationRequestInfo. # noqa: E501 + + + :return: The targets of this NotificationRequestInfo. # noqa: E501 + :rtype: list[str] + """ + return self._targets + + @targets.setter + def targets(self, targets): + """Sets the targets of this NotificationRequestInfo. + + + :param targets: The targets of this NotificationRequestInfo. # noqa: E501 + :type: list[str] + """ + + self._targets = targets + + @property + def template(self): + """Gets the template of this NotificationRequestInfo. # noqa: E501 + + + :return: The template of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationTemplate + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this NotificationRequestInfo. + + + :param template: The template of this NotificationRequestInfo. # noqa: E501 + :type: NotificationTemplate + """ + + self._template = template + + @property + def template_id(self): + """Gets the template_id of this NotificationRequestInfo. # noqa: E501 + + + :return: The template_id of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationTemplateId + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this NotificationRequestInfo. + + + :param template_id: The template_id of this NotificationRequestInfo. # noqa: E501 + :type: NotificationTemplateId + """ + + self._template_id = template_id + + @property + def template_name(self): + """Gets the template_name of this NotificationRequestInfo. # noqa: E501 + + + :return: The template_name of this NotificationRequestInfo. # noqa: E501 + :rtype: str + """ + return self._template_name + + @template_name.setter + def template_name(self, template_name): + """Sets the template_name of this NotificationRequestInfo. + + + :param template_name: The template_name of this NotificationRequestInfo. # noqa: E501 + :type: str + """ + + self._template_name = template_name + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationRequestInfo. # noqa: E501 + + + :return: The tenant_id of this NotificationRequestInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationRequestInfo. + + + :param tenant_id: The tenant_id of this NotificationRequestInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequestInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequestInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_request_preview.py b/tb_rest_client/models/models_ce/notification_request_preview.py new file mode 100644 index 00000000..58eb4192 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_request_preview.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequestPreview(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'processed_templates': 'dict(str, DeliveryMethodNotificationTemplate)', + 'recipients_count_by_target': 'dict(str, int)', + 'recipients_preview': 'list[str]', + 'total_recipients_count': 'int' + } + + attribute_map = { + 'processed_templates': 'processedTemplates', + 'recipients_count_by_target': 'recipientsCountByTarget', + 'recipients_preview': 'recipientsPreview', + 'total_recipients_count': 'totalRecipientsCount' + } + + def __init__(self, processed_templates=None, recipients_count_by_target=None, recipients_preview=None, total_recipients_count=None): # noqa: E501 + """NotificationRequestPreview - a model defined in Swagger""" # noqa: E501 + self._processed_templates = None + self._recipients_count_by_target = None + self._recipients_preview = None + self._total_recipients_count = None + self.discriminator = None + if processed_templates is not None: + self.processed_templates = processed_templates + if recipients_count_by_target is not None: + self.recipients_count_by_target = recipients_count_by_target + if recipients_preview is not None: + self.recipients_preview = recipients_preview + if total_recipients_count is not None: + self.total_recipients_count = total_recipients_count + + @property + def processed_templates(self): + """Gets the processed_templates of this NotificationRequestPreview. # noqa: E501 + + + :return: The processed_templates of this NotificationRequestPreview. # noqa: E501 + :rtype: dict(str, DeliveryMethodNotificationTemplate) + """ + return self._processed_templates + + @processed_templates.setter + def processed_templates(self, processed_templates): + """Sets the processed_templates of this NotificationRequestPreview. + + + :param processed_templates: The processed_templates of this NotificationRequestPreview. # noqa: E501 + :type: dict(str, DeliveryMethodNotificationTemplate) + """ + + self._processed_templates = processed_templates + + @property + def recipients_count_by_target(self): + """Gets the recipients_count_by_target of this NotificationRequestPreview. # noqa: E501 + + + :return: The recipients_count_by_target of this NotificationRequestPreview. # noqa: E501 + :rtype: dict(str, int) + """ + return self._recipients_count_by_target + + @recipients_count_by_target.setter + def recipients_count_by_target(self, recipients_count_by_target): + """Sets the recipients_count_by_target of this NotificationRequestPreview. + + + :param recipients_count_by_target: The recipients_count_by_target of this NotificationRequestPreview. # noqa: E501 + :type: dict(str, int) + """ + + self._recipients_count_by_target = recipients_count_by_target + + @property + def recipients_preview(self): + """Gets the recipients_preview of this NotificationRequestPreview. # noqa: E501 + + + :return: The recipients_preview of this NotificationRequestPreview. # noqa: E501 + :rtype: list[str] + """ + return self._recipients_preview + + @recipients_preview.setter + def recipients_preview(self, recipients_preview): + """Sets the recipients_preview of this NotificationRequestPreview. + + + :param recipients_preview: The recipients_preview of this NotificationRequestPreview. # noqa: E501 + :type: list[str] + """ + + self._recipients_preview = recipients_preview + + @property + def total_recipients_count(self): + """Gets the total_recipients_count of this NotificationRequestPreview. # noqa: E501 + + + :return: The total_recipients_count of this NotificationRequestPreview. # noqa: E501 + :rtype: int + """ + return self._total_recipients_count + + @total_recipients_count.setter + def total_recipients_count(self, total_recipients_count): + """Sets the total_recipients_count of this NotificationRequestPreview. + + + :param total_recipients_count: The total_recipients_count of this NotificationRequestPreview. # noqa: E501 + :type: int + """ + + self._total_recipients_count = total_recipients_count + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequestPreview, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequestPreview): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_request_stats.py b/tb_rest_client/models/models_ce/notification_request_stats.py new file mode 100644 index 00000000..6b73febd --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_request_stats.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequestStats(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'error': 'str', + 'errors': 'dict(str, object)', + 'sent': 'dict(str, AtomicInteger)' + } + + attribute_map = { + 'error': 'error', + 'errors': 'errors', + 'sent': 'sent' + } + + def __init__(self, error=None, errors=None, sent=None): # noqa: E501 + """NotificationRequestStats - a model defined in Swagger""" # noqa: E501 + self._error = None + self._errors = None + self._sent = None + self.discriminator = None + if error is not None: + self.error = error + if errors is not None: + self.errors = errors + if sent is not None: + self.sent = sent + + @property + def error(self): + """Gets the error of this NotificationRequestStats. # noqa: E501 + + + :return: The error of this NotificationRequestStats. # noqa: E501 + :rtype: str + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this NotificationRequestStats. + + + :param error: The error of this NotificationRequestStats. # noqa: E501 + :type: str + """ + + self._error = error + + @property + def errors(self): + """Gets the errors of this NotificationRequestStats. # noqa: E501 + + + :return: The errors of this NotificationRequestStats. # noqa: E501 + :rtype: dict(str, object) + """ + return self._errors + + @errors.setter + def errors(self, errors): + """Sets the errors of this NotificationRequestStats. + + + :param errors: The errors of this NotificationRequestStats. # noqa: E501 + :type: dict(str, object) + """ + + self._errors = errors + + @property + def sent(self): + """Gets the sent of this NotificationRequestStats. # noqa: E501 + + + :return: The sent of this NotificationRequestStats. # noqa: E501 + :rtype: dict(str, AtomicInteger) + """ + return self._sent + + @sent.setter + def sent(self, sent): + """Sets the sent of this NotificationRequestStats. + + + :param sent: The sent of this NotificationRequestStats. # noqa: E501 + :type: dict(str, AtomicInteger) + """ + + self._sent = sent + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequestStats, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequestStats): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_rule.py b/tb_rest_client/models/models_ce/notification_rule.py new file mode 100644 index 00000000..c3b14663 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_rule.py @@ -0,0 +1,329 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRule(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'NotificationRuleConfig', + 'created_time': 'int', + 'id': 'NotificationRuleId', + 'name': 'str', + 'recipients_config': 'NotificationRuleRecipientsConfig', + 'template_id': 'NotificationTemplateId', + 'tenant_id': 'TenantId', + 'trigger_config': 'NotificationRuleTriggerConfig', + 'trigger_type': 'str' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'created_time': 'createdTime', + 'id': 'id', + 'name': 'name', + 'recipients_config': 'recipientsConfig', + 'template_id': 'templateId', + 'tenant_id': 'tenantId', + 'trigger_config': 'triggerConfig', + 'trigger_type': 'triggerType' + } + + def __init__(self, additional_config=None, created_time=None, id=None, name=None, recipients_config=None, template_id=None, tenant_id=None, trigger_config=None, trigger_type=None): # noqa: E501 + """NotificationRule - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._created_time = None + self._id = None + self._name = None + self._recipients_config = None + self._template_id = None + self._tenant_id = None + self._trigger_config = None + self._trigger_type = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if created_time is not None: + self.created_time = created_time + if id is not None: + self.id = id + self.name = name + self.recipients_config = recipients_config + self.template_id = template_id + if tenant_id is not None: + self.tenant_id = tenant_id + self.trigger_config = trigger_config + self.trigger_type = trigger_type + + @property + def additional_config(self): + """Gets the additional_config of this NotificationRule. # noqa: E501 + + + :return: The additional_config of this NotificationRule. # noqa: E501 + :rtype: NotificationRuleConfig + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this NotificationRule. + + + :param additional_config: The additional_config of this NotificationRule. # noqa: E501 + :type: NotificationRuleConfig + """ + + self._additional_config = additional_config + + @property + def created_time(self): + """Gets the created_time of this NotificationRule. # noqa: E501 + + + :return: The created_time of this NotificationRule. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationRule. + + + :param created_time: The created_time of this NotificationRule. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this NotificationRule. # noqa: E501 + + + :return: The id of this NotificationRule. # noqa: E501 + :rtype: NotificationRuleId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRule. + + + :param id: The id of this NotificationRule. # noqa: E501 + :type: NotificationRuleId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this NotificationRule. # noqa: E501 + + + :return: The name of this NotificationRule. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this NotificationRule. + + + :param name: The name of this NotificationRule. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def recipients_config(self): + """Gets the recipients_config of this NotificationRule. # noqa: E501 + + + :return: The recipients_config of this NotificationRule. # noqa: E501 + :rtype: NotificationRuleRecipientsConfig + """ + return self._recipients_config + + @recipients_config.setter + def recipients_config(self, recipients_config): + """Sets the recipients_config of this NotificationRule. + + + :param recipients_config: The recipients_config of this NotificationRule. # noqa: E501 + :type: NotificationRuleRecipientsConfig + """ + if recipients_config is None: + raise ValueError("Invalid value for `recipients_config`, must not be `None`") # noqa: E501 + + self._recipients_config = recipients_config + + @property + def template_id(self): + """Gets the template_id of this NotificationRule. # noqa: E501 + + + :return: The template_id of this NotificationRule. # noqa: E501 + :rtype: NotificationTemplateId + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this NotificationRule. + + + :param template_id: The template_id of this NotificationRule. # noqa: E501 + :type: NotificationTemplateId + """ + if template_id is None: + raise ValueError("Invalid value for `template_id`, must not be `None`") # noqa: E501 + + self._template_id = template_id + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationRule. # noqa: E501 + + + :return: The tenant_id of this NotificationRule. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationRule. + + + :param tenant_id: The tenant_id of this NotificationRule. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def trigger_config(self): + """Gets the trigger_config of this NotificationRule. # noqa: E501 + + + :return: The trigger_config of this NotificationRule. # noqa: E501 + :rtype: NotificationRuleTriggerConfig + """ + return self._trigger_config + + @trigger_config.setter + def trigger_config(self, trigger_config): + """Sets the trigger_config of this NotificationRule. + + + :param trigger_config: The trigger_config of this NotificationRule. # noqa: E501 + :type: NotificationRuleTriggerConfig + """ + if trigger_config is None: + raise ValueError("Invalid value for `trigger_config`, must not be `None`") # noqa: E501 + + self._trigger_config = trigger_config + + @property + def trigger_type(self): + """Gets the trigger_type of this NotificationRule. # noqa: E501 + + + :return: The trigger_type of this NotificationRule. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this NotificationRule. + + + :param trigger_type: The trigger_type of this NotificationRule. # noqa: E501 + :type: str + """ + if trigger_type is None: + raise ValueError("Invalid value for `trigger_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_rule_config.py b/tb_rest_client/models/models_ce/notification_rule_config.py new file mode 100644 index 00000000..142c48f1 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_rule_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRuleConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str' + } + + attribute_map = { + 'description': 'description' + } + + def __init__(self, description=None): # noqa: E501 + """NotificationRuleConfig - a model defined in Swagger""" # noqa: E501 + self._description = None + self.discriminator = None + if description is not None: + self.description = description + + @property + def description(self): + """Gets the description of this NotificationRuleConfig. # noqa: E501 + + + :return: The description of this NotificationRuleConfig. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this NotificationRuleConfig. + + + :param description: The description of this NotificationRuleConfig. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRuleConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRuleConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_rule_id.py b/tb_rest_client/models/models_ce/notification_rule_id.py new file mode 100644 index 00000000..7eaf595e --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_rule_id.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRuleId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """NotificationRuleId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this NotificationRuleId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this NotificationRuleId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRuleId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this NotificationRuleId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this NotificationRuleId. # noqa: E501 + + + :return: The entity_type of this NotificationRuleId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this NotificationRuleId. + + + :param entity_type: The entity_type of this NotificationRuleId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRuleId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRuleId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_rule_info.py b/tb_rest_client/models/models_ce/notification_rule_info.py new file mode 100644 index 00000000..88529365 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_rule_info.py @@ -0,0 +1,388 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRuleInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'NotificationRuleConfig', + 'created_time': 'int', + 'delivery_methods': 'list[str]', + 'id': 'NotificationRuleId', + 'name': 'str', + 'recipients_config': 'NotificationRuleRecipientsConfig', + 'template_id': 'NotificationTemplateId', + 'template_name': 'str', + 'tenant_id': 'TenantId', + 'trigger_config': 'NotificationRuleTriggerConfig', + 'trigger_type': 'str' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'created_time': 'createdTime', + 'delivery_methods': 'deliveryMethods', + 'id': 'id', + 'name': 'name', + 'recipients_config': 'recipientsConfig', + 'template_id': 'templateId', + 'template_name': 'templateName', + 'tenant_id': 'tenantId', + 'trigger_config': 'triggerConfig', + 'trigger_type': 'triggerType' + } + + def __init__(self, additional_config=None, created_time=None, delivery_methods=None, id=None, name=None, recipients_config=None, template_id=None, template_name=None, tenant_id=None, trigger_config=None, trigger_type=None): # noqa: E501 + """NotificationRuleInfo - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._created_time = None + self._delivery_methods = None + self._id = None + self._name = None + self._recipients_config = None + self._template_id = None + self._template_name = None + self._tenant_id = None + self._trigger_config = None + self._trigger_type = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if created_time is not None: + self.created_time = created_time + if delivery_methods is not None: + self.delivery_methods = delivery_methods + if id is not None: + self.id = id + self.name = name + self.recipients_config = recipients_config + self.template_id = template_id + if template_name is not None: + self.template_name = template_name + if tenant_id is not None: + self.tenant_id = tenant_id + self.trigger_config = trigger_config + self.trigger_type = trigger_type + + @property + def additional_config(self): + """Gets the additional_config of this NotificationRuleInfo. # noqa: E501 + + + :return: The additional_config of this NotificationRuleInfo. # noqa: E501 + :rtype: NotificationRuleConfig + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this NotificationRuleInfo. + + + :param additional_config: The additional_config of this NotificationRuleInfo. # noqa: E501 + :type: NotificationRuleConfig + """ + + self._additional_config = additional_config + + @property + def created_time(self): + """Gets the created_time of this NotificationRuleInfo. # noqa: E501 + + + :return: The created_time of this NotificationRuleInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationRuleInfo. + + + :param created_time: The created_time of this NotificationRuleInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def delivery_methods(self): + """Gets the delivery_methods of this NotificationRuleInfo. # noqa: E501 + + + :return: The delivery_methods of this NotificationRuleInfo. # noqa: E501 + :rtype: list[str] + """ + return self._delivery_methods + + @delivery_methods.setter + def delivery_methods(self, delivery_methods): + """Sets the delivery_methods of this NotificationRuleInfo. + + + :param delivery_methods: The delivery_methods of this NotificationRuleInfo. # noqa: E501 + :type: list[str] + """ + allowed_values = ["EMAIL", "SLACK", "SMS", "WEB"] # noqa: E501 + if not set(delivery_methods).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `delivery_methods` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(delivery_methods) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._delivery_methods = delivery_methods + + @property + def id(self): + """Gets the id of this NotificationRuleInfo. # noqa: E501 + + + :return: The id of this NotificationRuleInfo. # noqa: E501 + :rtype: NotificationRuleId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRuleInfo. + + + :param id: The id of this NotificationRuleInfo. # noqa: E501 + :type: NotificationRuleId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this NotificationRuleInfo. # noqa: E501 + + + :return: The name of this NotificationRuleInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this NotificationRuleInfo. + + + :param name: The name of this NotificationRuleInfo. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def recipients_config(self): + """Gets the recipients_config of this NotificationRuleInfo. # noqa: E501 + + + :return: The recipients_config of this NotificationRuleInfo. # noqa: E501 + :rtype: NotificationRuleRecipientsConfig + """ + return self._recipients_config + + @recipients_config.setter + def recipients_config(self, recipients_config): + """Sets the recipients_config of this NotificationRuleInfo. + + + :param recipients_config: The recipients_config of this NotificationRuleInfo. # noqa: E501 + :type: NotificationRuleRecipientsConfig + """ + if recipients_config is None: + raise ValueError("Invalid value for `recipients_config`, must not be `None`") # noqa: E501 + + self._recipients_config = recipients_config + + @property + def template_id(self): + """Gets the template_id of this NotificationRuleInfo. # noqa: E501 + + + :return: The template_id of this NotificationRuleInfo. # noqa: E501 + :rtype: NotificationTemplateId + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this NotificationRuleInfo. + + + :param template_id: The template_id of this NotificationRuleInfo. # noqa: E501 + :type: NotificationTemplateId + """ + if template_id is None: + raise ValueError("Invalid value for `template_id`, must not be `None`") # noqa: E501 + + self._template_id = template_id + + @property + def template_name(self): + """Gets the template_name of this NotificationRuleInfo. # noqa: E501 + + + :return: The template_name of this NotificationRuleInfo. # noqa: E501 + :rtype: str + """ + return self._template_name + + @template_name.setter + def template_name(self, template_name): + """Sets the template_name of this NotificationRuleInfo. + + + :param template_name: The template_name of this NotificationRuleInfo. # noqa: E501 + :type: str + """ + + self._template_name = template_name + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationRuleInfo. # noqa: E501 + + + :return: The tenant_id of this NotificationRuleInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationRuleInfo. + + + :param tenant_id: The tenant_id of this NotificationRuleInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def trigger_config(self): + """Gets the trigger_config of this NotificationRuleInfo. # noqa: E501 + + + :return: The trigger_config of this NotificationRuleInfo. # noqa: E501 + :rtype: NotificationRuleTriggerConfig + """ + return self._trigger_config + + @trigger_config.setter + def trigger_config(self, trigger_config): + """Sets the trigger_config of this NotificationRuleInfo. + + + :param trigger_config: The trigger_config of this NotificationRuleInfo. # noqa: E501 + :type: NotificationRuleTriggerConfig + """ + if trigger_config is None: + raise ValueError("Invalid value for `trigger_config`, must not be `None`") # noqa: E501 + + self._trigger_config = trigger_config + + @property + def trigger_type(self): + """Gets the trigger_type of this NotificationRuleInfo. # noqa: E501 + + + :return: The trigger_type of this NotificationRuleInfo. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this NotificationRuleInfo. + + + :param trigger_type: The trigger_type of this NotificationRuleInfo. # noqa: E501 + :type: str + """ + if trigger_type is None: + raise ValueError("Invalid value for `trigger_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRuleInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRuleInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_rule_recipients_config.py b/tb_rest_client/models/models_ce/notification_rule_recipients_config.py new file mode 100644 index 00000000..aeb3cfb6 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_rule_recipients_config.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRuleRecipientsConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'trigger_type': 'str' + } + + attribute_map = { + 'trigger_type': 'triggerType' + } + + def __init__(self, trigger_type=None): # noqa: E501 + """NotificationRuleRecipientsConfig - a model defined in Swagger""" # noqa: E501 + self._trigger_type = None + self.discriminator = None + self.trigger_type = trigger_type + + @property + def trigger_type(self): + """Gets the trigger_type of this NotificationRuleRecipientsConfig. # noqa: E501 + + + :return: The trigger_type of this NotificationRuleRecipientsConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this NotificationRuleRecipientsConfig. + + + :param trigger_type: The trigger_type of this NotificationRuleRecipientsConfig. # noqa: E501 + :type: str + """ + if trigger_type is None: + raise ValueError("Invalid value for `trigger_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRuleRecipientsConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRuleRecipientsConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/notification_rule_trigger_config.py new file mode 100644 index 00000000..d20dc510 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_rule_trigger_config.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'trigger_type': 'str' + } + + attribute_map = { + 'trigger_type': 'triggerType' + } + + def __init__(self, trigger_type=None): # noqa: E501 + """NotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._trigger_type = None + self.discriminator = None + if trigger_type is not None: + self.trigger_type = trigger_type + + @property + def trigger_type(self): + """Gets the trigger_type of this NotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this NotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this NotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this NotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_settings.py b/tb_rest_client/models/models_ce/notification_settings.py new file mode 100644 index 00000000..94a024f2 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_settings.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationSettings(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'delivery_methods_configs': 'dict(str, NotificationDeliveryMethodConfig)' + } + + attribute_map = { + 'delivery_methods_configs': 'deliveryMethodsConfigs' + } + + def __init__(self, delivery_methods_configs=None): # noqa: E501 + """NotificationSettings - a model defined in Swagger""" # noqa: E501 + self._delivery_methods_configs = None + self.discriminator = None + self.delivery_methods_configs = delivery_methods_configs + + @property + def delivery_methods_configs(self): + """Gets the delivery_methods_configs of this NotificationSettings. # noqa: E501 + + + :return: The delivery_methods_configs of this NotificationSettings. # noqa: E501 + :rtype: dict(str, NotificationDeliveryMethodConfig) + """ + return self._delivery_methods_configs + + @delivery_methods_configs.setter + def delivery_methods_configs(self, delivery_methods_configs): + """Sets the delivery_methods_configs of this NotificationSettings. + + + :param delivery_methods_configs: The delivery_methods_configs of this NotificationSettings. # noqa: E501 + :type: dict(str, NotificationDeliveryMethodConfig) + """ + if delivery_methods_configs is None: + raise ValueError("Invalid value for `delivery_methods_configs`, must not be `None`") # noqa: E501 + + self._delivery_methods_configs = delivery_methods_configs + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationSettings, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationSettings): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_target.py b/tb_rest_client/models/models_ce/notification_target.py new file mode 100644 index 00000000..02afa552 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_target.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTarget(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'configuration': 'NotificationTargetConfig', + 'created_time': 'int', + 'id': 'NotificationTargetId', + 'name': 'str', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'configuration': 'configuration', + 'created_time': 'createdTime', + 'id': 'id', + 'name': 'name', + 'tenant_id': 'tenantId' + } + + def __init__(self, configuration=None, created_time=None, id=None, name=None, tenant_id=None): # noqa: E501 + """NotificationTarget - a model defined in Swagger""" # noqa: E501 + self._configuration = None + self._created_time = None + self._id = None + self._name = None + self._tenant_id = None + self.discriminator = None + self.configuration = configuration + if created_time is not None: + self.created_time = created_time + if id is not None: + self.id = id + self.name = name + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def configuration(self): + """Gets the configuration of this NotificationTarget. # noqa: E501 + + + :return: The configuration of this NotificationTarget. # noqa: E501 + :rtype: NotificationTargetConfig + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this NotificationTarget. + + + :param configuration: The configuration of this NotificationTarget. # noqa: E501 + :type: NotificationTargetConfig + """ + if configuration is None: + raise ValueError("Invalid value for `configuration`, must not be `None`") # noqa: E501 + + self._configuration = configuration + + @property + def created_time(self): + """Gets the created_time of this NotificationTarget. # noqa: E501 + + + :return: The created_time of this NotificationTarget. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationTarget. + + + :param created_time: The created_time of this NotificationTarget. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this NotificationTarget. # noqa: E501 + + + :return: The id of this NotificationTarget. # noqa: E501 + :rtype: NotificationTargetId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationTarget. + + + :param id: The id of this NotificationTarget. # noqa: E501 + :type: NotificationTargetId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this NotificationTarget. # noqa: E501 + + + :return: The name of this NotificationTarget. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this NotificationTarget. + + + :param name: The name of this NotificationTarget. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationTarget. # noqa: E501 + + + :return: The tenant_id of this NotificationTarget. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationTarget. + + + :param tenant_id: The tenant_id of this NotificationTarget. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTarget, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTarget): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_target_config.py b/tb_rest_client/models/models_ce/notification_target_config.py new file mode 100644 index 00000000..e6fdc324 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_target_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTargetConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str' + } + + attribute_map = { + 'description': 'description' + } + + def __init__(self, description=None): # noqa: E501 + """NotificationTargetConfig - a model defined in Swagger""" # noqa: E501 + self._description = None + self.discriminator = None + if description is not None: + self.description = description + + @property + def description(self): + """Gets the description of this NotificationTargetConfig. # noqa: E501 + + + :return: The description of this NotificationTargetConfig. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this NotificationTargetConfig. + + + :param description: The description of this NotificationTargetConfig. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTargetConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTargetConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_target_id.py b/tb_rest_client/models/models_ce/notification_target_id.py new file mode 100644 index 00000000..4e9b886b --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_target_id.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTargetId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """NotificationTargetId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this NotificationTargetId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this NotificationTargetId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationTargetId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this NotificationTargetId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this NotificationTargetId. # noqa: E501 + + + :return: The entity_type of this NotificationTargetId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this NotificationTargetId. + + + :param entity_type: The entity_type of this NotificationTargetId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTargetId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTargetId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_template.py b/tb_rest_client/models/models_ce/notification_template.py new file mode 100644 index 00000000..67009925 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_template.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'configuration': 'NotificationTemplateConfig', + 'created_time': 'int', + 'id': 'NotificationTemplateId', + 'name': 'str', + 'notification_type': 'str', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'configuration': 'configuration', + 'created_time': 'createdTime', + 'id': 'id', + 'name': 'name', + 'notification_type': 'notificationType', + 'tenant_id': 'tenantId' + } + + def __init__(self, configuration=None, created_time=None, id=None, name=None, notification_type=None, tenant_id=None): # noqa: E501 + """NotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._configuration = None + self._created_time = None + self._id = None + self._name = None + self._notification_type = None + self._tenant_id = None + self.discriminator = None + self.configuration = configuration + if created_time is not None: + self.created_time = created_time + if id is not None: + self.id = id + if name is not None: + self.name = name + self.notification_type = notification_type + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def configuration(self): + """Gets the configuration of this NotificationTemplate. # noqa: E501 + + + :return: The configuration of this NotificationTemplate. # noqa: E501 + :rtype: NotificationTemplateConfig + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this NotificationTemplate. + + + :param configuration: The configuration of this NotificationTemplate. # noqa: E501 + :type: NotificationTemplateConfig + """ + if configuration is None: + raise ValueError("Invalid value for `configuration`, must not be `None`") # noqa: E501 + + self._configuration = configuration + + @property + def created_time(self): + """Gets the created_time of this NotificationTemplate. # noqa: E501 + + + :return: The created_time of this NotificationTemplate. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationTemplate. + + + :param created_time: The created_time of this NotificationTemplate. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this NotificationTemplate. # noqa: E501 + + + :return: The id of this NotificationTemplate. # noqa: E501 + :rtype: NotificationTemplateId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationTemplate. + + + :param id: The id of this NotificationTemplate. # noqa: E501 + :type: NotificationTemplateId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this NotificationTemplate. # noqa: E501 + + + :return: The name of this NotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this NotificationTemplate. + + + :param name: The name of this NotificationTemplate. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def notification_type(self): + """Gets the notification_type of this NotificationTemplate. # noqa: E501 + + + :return: The notification_type of this NotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._notification_type + + @notification_type.setter + def notification_type(self, notification_type): + """Sets the notification_type of this NotificationTemplate. + + + :param notification_type: The notification_type of this NotificationTemplate. # noqa: E501 + :type: str + """ + if notification_type is None: + raise ValueError("Invalid value for `notification_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "GENERAL", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", "RULE_NODE"] # noqa: E501 + if notification_type not in allowed_values: + raise ValueError( + "Invalid value for `notification_type` ({0}), must be one of {1}" # noqa: E501 + .format(notification_type, allowed_values) + ) + + self._notification_type = notification_type + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationTemplate. # noqa: E501 + + + :return: The tenant_id of this NotificationTemplate. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationTemplate. + + + :param tenant_id: The tenant_id of this NotificationTemplate. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_template_config.py b/tb_rest_client/models/models_ce/notification_template_config.py new file mode 100644 index 00000000..48c864ff --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_template_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTemplateConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'delivery_methods_templates': 'dict(str, DeliveryMethodNotificationTemplate)' + } + + attribute_map = { + 'delivery_methods_templates': 'deliveryMethodsTemplates' + } + + def __init__(self, delivery_methods_templates=None): # noqa: E501 + """NotificationTemplateConfig - a model defined in Swagger""" # noqa: E501 + self._delivery_methods_templates = None + self.discriminator = None + if delivery_methods_templates is not None: + self.delivery_methods_templates = delivery_methods_templates + + @property + def delivery_methods_templates(self): + """Gets the delivery_methods_templates of this NotificationTemplateConfig. # noqa: E501 + + + :return: The delivery_methods_templates of this NotificationTemplateConfig. # noqa: E501 + :rtype: dict(str, DeliveryMethodNotificationTemplate) + """ + return self._delivery_methods_templates + + @delivery_methods_templates.setter + def delivery_methods_templates(self, delivery_methods_templates): + """Sets the delivery_methods_templates of this NotificationTemplateConfig. + + + :param delivery_methods_templates: The delivery_methods_templates of this NotificationTemplateConfig. # noqa: E501 + :type: dict(str, DeliveryMethodNotificationTemplate) + """ + + self._delivery_methods_templates = delivery_methods_templates + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTemplateConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTemplateConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/notification_template_id.py b/tb_rest_client/models/models_ce/notification_template_id.py new file mode 100644 index 00000000..87eb8ba6 --- /dev/null +++ b/tb_rest_client/models/models_ce/notification_template_id.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTemplateId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """NotificationTemplateId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this NotificationTemplateId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this NotificationTemplateId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationTemplateId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this NotificationTemplateId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this NotificationTemplateId. # noqa: E501 + + + :return: The entity_type of this NotificationTemplateId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this NotificationTemplateId. + + + :param entity_type: The entity_type of this NotificationTemplateId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTemplateId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTemplateId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/numeric_filter_predicate.py b/tb_rest_client/models/models_ce/numeric_filter_predicate.py index 9356a89f..c3450609 100644 --- a/tb_rest_client/models/models_ce/numeric_filter_predicate.py +++ b/tb_rest_client/models/models_ce/numeric_filter_predicate.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 +from tb_rest_client.models.models_ce.key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 class NumericFilterPredicate(KeyFilterPredicate): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/o_auth2_basic_mapper_config.py b/tb_rest_client/models/models_ce/o_auth2_basic_mapper_config.py index 31e9cfbb..e4000921 100644 --- a/tb_rest_client/models/models_ce/o_auth2_basic_mapper_config.py +++ b/tb_rest_client/models/models_ce/o_auth2_basic_mapper_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2BasicMapperConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/o_auth2_client_info.py b/tb_rest_client/models/models_ce/o_auth2_client_info.py index 4deab942..4b6bcdae 100644 --- a/tb_rest_client/models/models_ce/o_auth2_client_info.py +++ b/tb_rest_client/models/models_ce/o_auth2_client_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2ClientInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/o_auth2_client_registration_template.py b/tb_rest_client/models/models_ce/o_auth2_client_registration_template.py index c95b9bc9..6fc70f38 100644 --- a/tb_rest_client/models/models_ce/o_auth2_client_registration_template.py +++ b/tb_rest_client/models/models_ce/o_auth2_client_registration_template.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2ClientRegistrationTemplate(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/o_auth2_client_registration_template_id.py b/tb_rest_client/models/models_ce/o_auth2_client_registration_template_id.py index 1939ba9f..ae380cdc 100644 --- a/tb_rest_client/models/models_ce/o_auth2_client_registration_template_id.py +++ b/tb_rest_client/models/models_ce/o_auth2_client_registration_template_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2ClientRegistrationTemplateId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,13 +28,11 @@ class OAuth2ClientRegistrationTemplateId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_ce/o_auth2_custom_mapper_config.py b/tb_rest_client/models/models_ce/o_auth2_custom_mapper_config.py index a680150b..e167f521 100644 --- a/tb_rest_client/models/models_ce/o_auth2_custom_mapper_config.py +++ b/tb_rest_client/models/models_ce/o_auth2_custom_mapper_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2CustomMapperConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/o_auth2_domain_info.py b/tb_rest_client/models/models_ce/o_auth2_domain_info.py index 25fab05a..40493912 100644 --- a/tb_rest_client/models/models_ce/o_auth2_domain_info.py +++ b/tb_rest_client/models/models_ce/o_auth2_domain_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2DomainInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/o_auth2_info.py b/tb_rest_client/models/models_ce/o_auth2_info.py index 447a4e04..5f9c9e44 100644 --- a/tb_rest_client/models/models_ce/o_auth2_info.py +++ b/tb_rest_client/models/models_ce/o_auth2_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2Info(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/o_auth2_mapper_config.py b/tb_rest_client/models/models_ce/o_auth2_mapper_config.py index 591db16c..c9548b17 100644 --- a/tb_rest_client/models/models_ce/o_auth2_mapper_config.py +++ b/tb_rest_client/models/models_ce/o_auth2_mapper_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2MapperConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/o_auth2_mobile_info.py b/tb_rest_client/models/models_ce/o_auth2_mobile_info.py index 13882422..0269b233 100644 --- a/tb_rest_client/models/models_ce/o_auth2_mobile_info.py +++ b/tb_rest_client/models/models_ce/o_auth2_mobile_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2MobileInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/o_auth2_params_info.py b/tb_rest_client/models/models_ce/o_auth2_params_info.py index 02062335..302085bb 100644 --- a/tb_rest_client/models/models_ce/o_auth2_params_info.py +++ b/tb_rest_client/models/models_ce/o_auth2_params_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2ParamsInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/o_auth2_registration_info.py b/tb_rest_client/models/models_ce/o_auth2_registration_info.py index 84ea945b..e1e741bb 100644 --- a/tb_rest_client/models/models_ce/o_auth2_registration_info.py +++ b/tb_rest_client/models/models_ce/o_auth2_registration_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2RegistrationInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/object_attributes.py b/tb_rest_client/models/models_ce/object_attributes.py index 3a15a50b..6f94d45c 100644 --- a/tb_rest_client/models/models_ce/object_attributes.py +++ b/tb_rest_client/models/models_ce/object_attributes.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ObjectAttributes(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/object_node.py b/tb_rest_client/models/models_ce/object_node.py index 70caef21..c500b07a 100644 --- a/tb_rest_client/models/models_ce/object_node.py +++ b/tb_rest_client/models/models_ce/object_node.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ObjectNode(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/originator_entity_owner_users_filter.py b/tb_rest_client/models/models_ce/originator_entity_owner_users_filter.py new file mode 100644 index 00000000..badcde4b --- /dev/null +++ b/tb_rest_client/models/models_ce/originator_entity_owner_users_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class OriginatorEntityOwnerUsersFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """OriginatorEntityOwnerUsersFilter - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OriginatorEntityOwnerUsersFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OriginatorEntityOwnerUsersFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/ota_package.py b/tb_rest_client/models/models_ce/ota_package.py index 0694929b..609fd8d4 100644 --- a/tb_rest_client/models/models_ce/ota_package.py +++ b/tb_rest_client/models/models_ce/ota_package.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OtaPackage(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/ota_package_id.py b/tb_rest_client/models/models_ce/ota_package_id.py index ebef15cd..2dd95027 100644 --- a/tb_rest_client/models/models_ce/ota_package_id.py +++ b/tb_rest_client/models/models_ce/ota_package_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OtaPackageId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/ota_package_info.py b/tb_rest_client/models/models_ce/ota_package_info.py index 03b3732a..4e6d58d1 100644 --- a/tb_rest_client/models/models_ce/ota_package_info.py +++ b/tb_rest_client/models/models_ce/ota_package_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OtaPackageInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/ota_package_ota_package_id_body.py b/tb_rest_client/models/models_ce/ota_package_ota_package_id_body.py index 96702f5e..1c6a61f9 100644 --- a/tb_rest_client/models/models_ce/ota_package_ota_package_id_body.py +++ b/tb_rest_client/models/models_ce/ota_package_ota_package_id_body.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OtaPackageOtaPackageIdBody(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/other_configuration.py b/tb_rest_client/models/models_ce/other_configuration.py index 4586580a..fe58a82a 100644 --- a/tb_rest_client/models/models_ce/other_configuration.py +++ b/tb_rest_client/models/models_ce/other_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OtherConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_alarm_comment_info.py b/tb_rest_client/models/models_ce/page_data_alarm_comment_info.py new file mode 100644 index 00000000..feb57ade --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_alarm_comment_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataAlarmCommentInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[AlarmCommentInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataAlarmCommentInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataAlarmCommentInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataAlarmCommentInfo. # noqa: E501 + :rtype: list[AlarmCommentInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAlarmCommentInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataAlarmCommentInfo. # noqa: E501 + :type: list[AlarmCommentInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAlarmCommentInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataAlarmCommentInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAlarmCommentInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataAlarmCommentInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAlarmCommentInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataAlarmCommentInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAlarmCommentInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataAlarmCommentInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataAlarmCommentInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataAlarmCommentInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAlarmCommentInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataAlarmCommentInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataAlarmCommentInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataAlarmCommentInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/page_data_alarm_data.py b/tb_rest_client/models/models_ce/page_data_alarm_data.py index 9ff36094..eec83aec 100644 --- a/tb_rest_client/models/models_ce/page_data_alarm_data.py +++ b/tb_rest_client/models/models_ce/page_data_alarm_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataAlarmData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_alarm_info.py b/tb_rest_client/models/models_ce/page_data_alarm_info.py index 4d602019..4364305c 100644 --- a/tb_rest_client/models/models_ce/page_data_alarm_info.py +++ b/tb_rest_client/models/models_ce/page_data_alarm_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataAlarmInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_asset.py b/tb_rest_client/models/models_ce/page_data_asset.py index 472127e4..d3ddcfd8 100644 --- a/tb_rest_client/models/models_ce/page_data_asset.py +++ b/tb_rest_client/models/models_ce/page_data_asset.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataAsset(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_asset_info.py b/tb_rest_client/models/models_ce/page_data_asset_info.py index 5c10f5ad..a9266bd3 100644 --- a/tb_rest_client/models/models_ce/page_data_asset_info.py +++ b/tb_rest_client/models/models_ce/page_data_asset_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataAssetInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_asset_profile.py b/tb_rest_client/models/models_ce/page_data_asset_profile.py new file mode 100644 index 00000000..ad816abe --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_asset_profile.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataAssetProfile(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[AssetProfile]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataAssetProfile - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataAssetProfile. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataAssetProfile. # noqa: E501 + :rtype: list[AssetProfile] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAssetProfile. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataAssetProfile. # noqa: E501 + :type: list[AssetProfile] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAssetProfile. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataAssetProfile. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAssetProfile. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataAssetProfile. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAssetProfile. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataAssetProfile. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAssetProfile. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataAssetProfile. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataAssetProfile. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataAssetProfile. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAssetProfile. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataAssetProfile. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataAssetProfile, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataAssetProfile): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/page_data_asset_profile_info.py b/tb_rest_client/models/models_ce/page_data_asset_profile_info.py new file mode 100644 index 00000000..ccf22de8 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_asset_profile_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataAssetProfileInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[AssetProfileInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataAssetProfileInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataAssetProfileInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataAssetProfileInfo. # noqa: E501 + :rtype: list[AssetProfileInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAssetProfileInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataAssetProfileInfo. # noqa: E501 + :type: list[AssetProfileInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAssetProfileInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataAssetProfileInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAssetProfileInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataAssetProfileInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAssetProfileInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataAssetProfileInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAssetProfileInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataAssetProfileInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataAssetProfileInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataAssetProfileInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAssetProfileInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataAssetProfileInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataAssetProfileInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataAssetProfileInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/page_data_audit_log.py b/tb_rest_client/models/models_ce/page_data_audit_log.py index b4b471b8..87adde92 100644 --- a/tb_rest_client/models/models_ce/page_data_audit_log.py +++ b/tb_rest_client/models/models_ce/page_data_audit_log.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataAuditLog(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_customer.py b/tb_rest_client/models/models_ce/page_data_customer.py index 18d0bda1..14d7a6d7 100644 --- a/tb_rest_client/models/models_ce/page_data_customer.py +++ b/tb_rest_client/models/models_ce/page_data_customer.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataCustomer(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_dashboard_info.py b/tb_rest_client/models/models_ce/page_data_dashboard_info.py index 15f30d63..2014287d 100644 --- a/tb_rest_client/models/models_ce/page_data_dashboard_info.py +++ b/tb_rest_client/models/models_ce/page_data_dashboard_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataDashboardInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_device.py b/tb_rest_client/models/models_ce/page_data_device.py index ddc13a02..7520964e 100644 --- a/tb_rest_client/models/models_ce/page_data_device.py +++ b/tb_rest_client/models/models_ce/page_data_device.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataDevice(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_device_info.py b/tb_rest_client/models/models_ce/page_data_device_info.py index 3c45215d..33161e62 100644 --- a/tb_rest_client/models/models_ce/page_data_device_info.py +++ b/tb_rest_client/models/models_ce/page_data_device_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataDeviceInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_device_profile.py b/tb_rest_client/models/models_ce/page_data_device_profile.py index 72c274bd..7946edab 100644 --- a/tb_rest_client/models/models_ce/page_data_device_profile.py +++ b/tb_rest_client/models/models_ce/page_data_device_profile.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataDeviceProfile(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_device_profile_info.py b/tb_rest_client/models/models_ce/page_data_device_profile_info.py index f31895b7..a6c59200 100644 --- a/tb_rest_client/models/models_ce/page_data_device_profile_info.py +++ b/tb_rest_client/models/models_ce/page_data_device_profile_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataDeviceProfileInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_edge.py b/tb_rest_client/models/models_ce/page_data_edge.py index 4443d49e..df02d3b7 100644 --- a/tb_rest_client/models/models_ce/page_data_edge.py +++ b/tb_rest_client/models/models_ce/page_data_edge.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEdge(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_edge_event.py b/tb_rest_client/models/models_ce/page_data_edge_event.py index 66377a20..20d8c642 100644 --- a/tb_rest_client/models/models_ce/page_data_edge_event.py +++ b/tb_rest_client/models/models_ce/page_data_edge_event.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEdgeEvent(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_edge_info.py b/tb_rest_client/models/models_ce/page_data_edge_info.py index 82ec4f24..698f33ca 100644 --- a/tb_rest_client/models/models_ce/page_data_edge_info.py +++ b/tb_rest_client/models/models_ce/page_data_edge_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEdgeInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_entity_data.py b/tb_rest_client/models/models_ce/page_data_entity_data.py index 167cd554..55dc120b 100644 --- a/tb_rest_client/models/models_ce/page_data_entity_data.py +++ b/tb_rest_client/models/models_ce/page_data_entity_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEntityData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_entity_info.py b/tb_rest_client/models/models_ce/page_data_entity_info.py index a04167ad..43030d84 100644 --- a/tb_rest_client/models/models_ce/page_data_entity_info.py +++ b/tb_rest_client/models/models_ce/page_data_entity_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEntityInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_entity_version.py b/tb_rest_client/models/models_ce/page_data_entity_version.py index 0d48d3cb..0c37e798 100644 --- a/tb_rest_client/models/models_ce/page_data_entity_version.py +++ b/tb_rest_client/models/models_ce/page_data_entity_version.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEntityVersion(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_entity_view.py b/tb_rest_client/models/models_ce/page_data_entity_view.py index 0304a5d6..28f1b7c7 100644 --- a/tb_rest_client/models/models_ce/page_data_entity_view.py +++ b/tb_rest_client/models/models_ce/page_data_entity_view.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEntityView(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_entity_view_info.py b/tb_rest_client/models/models_ce/page_data_entity_view_info.py index 381c5abb..b6b0d1e0 100644 --- a/tb_rest_client/models/models_ce/page_data_entity_view_info.py +++ b/tb_rest_client/models/models_ce/page_data_entity_view_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEntityViewInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_event.py b/tb_rest_client/models/models_ce/page_data_event.py index 1c4067b3..86d7c49e 100644 --- a/tb_rest_client/models/models_ce/page_data_event.py +++ b/tb_rest_client/models/models_ce/page_data_event.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.4.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_ce/page_data_event_info.py b/tb_rest_client/models/models_ce/page_data_event_info.py new file mode 100644 index 00000000..7259ae55 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_event_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataEventInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[EventInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataEventInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataEventInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataEventInfo. # noqa: E501 + :rtype: list[EventInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEventInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataEventInfo. # noqa: E501 + :type: list[EventInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEventInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataEventInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEventInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataEventInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEventInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataEventInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEventInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataEventInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataEventInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataEventInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEventInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataEventInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataEventInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataEventInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/page_data_notification.py b/tb_rest_client/models/models_ce/page_data_notification.py new file mode 100644 index 00000000..c7c7f5c4 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_notification.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataNotification(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[Notification]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataNotification - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataNotification. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataNotification. # noqa: E501 + :rtype: list[Notification] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataNotification. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataNotification. # noqa: E501 + :type: list[Notification] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataNotification. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataNotification. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataNotification. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataNotification. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataNotification. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataNotification. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataNotification. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataNotification. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataNotification. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataNotification. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataNotification. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataNotification. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataNotification, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataNotification): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/page_data_notification_request_info.py b/tb_rest_client/models/models_ce/page_data_notification_request_info.py new file mode 100644 index 00000000..9acd1fe9 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_notification_request_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataNotificationRequestInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[NotificationRequestInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataNotificationRequestInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataNotificationRequestInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataNotificationRequestInfo. # noqa: E501 + :rtype: list[NotificationRequestInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataNotificationRequestInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataNotificationRequestInfo. # noqa: E501 + :type: list[NotificationRequestInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataNotificationRequestInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataNotificationRequestInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataNotificationRequestInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataNotificationRequestInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataNotificationRequestInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataNotificationRequestInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataNotificationRequestInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataNotificationRequestInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataNotificationRequestInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataNotificationRequestInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataNotificationRequestInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataNotificationRequestInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataNotificationRequestInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataNotificationRequestInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/page_data_notification_rule_info.py b/tb_rest_client/models/models_ce/page_data_notification_rule_info.py new file mode 100644 index 00000000..8b1675d4 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_notification_rule_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataNotificationRuleInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[NotificationRuleInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataNotificationRuleInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataNotificationRuleInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataNotificationRuleInfo. # noqa: E501 + :rtype: list[NotificationRuleInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataNotificationRuleInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataNotificationRuleInfo. # noqa: E501 + :type: list[NotificationRuleInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataNotificationRuleInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataNotificationRuleInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataNotificationRuleInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataNotificationRuleInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataNotificationRuleInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataNotificationRuleInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataNotificationRuleInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataNotificationRuleInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataNotificationRuleInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataNotificationRuleInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataNotificationRuleInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataNotificationRuleInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataNotificationRuleInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataNotificationRuleInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/page_data_notification_target.py b/tb_rest_client/models/models_ce/page_data_notification_target.py new file mode 100644 index 00000000..5f41199a --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_notification_target.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataNotificationTarget(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[NotificationTarget]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataNotificationTarget - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataNotificationTarget. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataNotificationTarget. # noqa: E501 + :rtype: list[NotificationTarget] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataNotificationTarget. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataNotificationTarget. # noqa: E501 + :type: list[NotificationTarget] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataNotificationTarget. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataNotificationTarget. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataNotificationTarget. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataNotificationTarget. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataNotificationTarget. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataNotificationTarget. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataNotificationTarget. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataNotificationTarget. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataNotificationTarget. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataNotificationTarget. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataNotificationTarget. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataNotificationTarget. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataNotificationTarget, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataNotificationTarget): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/page_data_notification_template.py b/tb_rest_client/models/models_ce/page_data_notification_template.py new file mode 100644 index 00000000..070093ae --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_notification_template.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataNotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[NotificationTemplate]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataNotificationTemplate. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataNotificationTemplate. # noqa: E501 + :rtype: list[NotificationTemplate] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataNotificationTemplate. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataNotificationTemplate. # noqa: E501 + :type: list[NotificationTemplate] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataNotificationTemplate. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataNotificationTemplate. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataNotificationTemplate. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataNotificationTemplate. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataNotificationTemplate. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataNotificationTemplate. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataNotificationTemplate. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataNotificationTemplate. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataNotificationTemplate. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataNotificationTemplate. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/page_data_ota_package_info.py b/tb_rest_client/models/models_ce/page_data_ota_package_info.py index 9f2f7c14..454f26a9 100644 --- a/tb_rest_client/models/models_ce/page_data_ota_package_info.py +++ b/tb_rest_client/models/models_ce/page_data_ota_package_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataOtaPackageInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_queue.py b/tb_rest_client/models/models_ce/page_data_queue.py index c240e244..883bd763 100644 --- a/tb_rest_client/models/models_ce/page_data_queue.py +++ b/tb_rest_client/models/models_ce/page_data_queue.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataQueue(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_rule_chain.py b/tb_rest_client/models/models_ce/page_data_rule_chain.py index 8a2f0c52..4a7985f6 100644 --- a/tb_rest_client/models/models_ce/page_data_rule_chain.py +++ b/tb_rest_client/models/models_ce/page_data_rule_chain.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataRuleChain(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_tb_resource_info.py b/tb_rest_client/models/models_ce/page_data_tb_resource_info.py index 9f3c4f78..846ee1f6 100644 --- a/tb_rest_client/models/models_ce/page_data_tb_resource_info.py +++ b/tb_rest_client/models/models_ce/page_data_tb_resource_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataTbResourceInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_tenant.py b/tb_rest_client/models/models_ce/page_data_tenant.py index e459c9b7..711ade7a 100644 --- a/tb_rest_client/models/models_ce/page_data_tenant.py +++ b/tb_rest_client/models/models_ce/page_data_tenant.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataTenant(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_tenant_info.py b/tb_rest_client/models/models_ce/page_data_tenant_info.py index 2e45decf..483e0090 100644 --- a/tb_rest_client/models/models_ce/page_data_tenant_info.py +++ b/tb_rest_client/models/models_ce/page_data_tenant_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataTenantInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_tenant_profile.py b/tb_rest_client/models/models_ce/page_data_tenant_profile.py index 902de183..09f1b455 100644 --- a/tb_rest_client/models/models_ce/page_data_tenant_profile.py +++ b/tb_rest_client/models/models_ce/page_data_tenant_profile.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataTenantProfile(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_user.py b/tb_rest_client/models/models_ce/page_data_user.py index 9dc2bd61..e89047b8 100644 --- a/tb_rest_client/models/models_ce/page_data_user.py +++ b/tb_rest_client/models/models_ce/page_data_user.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataUser(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/page_data_user_email_info.py b/tb_rest_client/models/models_ce/page_data_user_email_info.py new file mode 100644 index 00000000..0a759303 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_user_email_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataUserEmailInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[UserEmailInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataUserEmailInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataUserEmailInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataUserEmailInfo. # noqa: E501 + :rtype: list[UserEmailInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataUserEmailInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataUserEmailInfo. # noqa: E501 + :type: list[UserEmailInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataUserEmailInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataUserEmailInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataUserEmailInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataUserEmailInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataUserEmailInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataUserEmailInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataUserEmailInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataUserEmailInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataUserEmailInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataUserEmailInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataUserEmailInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataUserEmailInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataUserEmailInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataUserEmailInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/page_data_widgets_bundle.py b/tb_rest_client/models/models_ce/page_data_widgets_bundle.py index 06ee0c58..da1b65eb 100644 --- a/tb_rest_client/models/models_ce/page_data_widgets_bundle.py +++ b/tb_rest_client/models/models_ce/page_data_widgets_bundle.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataWidgetsBundle(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/platform_two_fa_settings.py b/tb_rest_client/models/models_ce/platform_two_fa_settings.py index e2cd0717..923053a6 100644 --- a/tb_rest_client/models/models_ce/platform_two_fa_settings.py +++ b/tb_rest_client/models/models_ce/platform_two_fa_settings.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PlatformTwoFaSettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/platform_users_notification_target_config.py b/tb_rest_client/models/models_ce/platform_users_notification_target_config.py new file mode 100644 index 00000000..d00f2578 --- /dev/null +++ b/tb_rest_client/models/models_ce/platform_users_notification_target_config.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.notification_target_config import NotificationTargetConfig # noqa: F401,E501 + +class PlatformUsersNotificationTargetConfig(NotificationTargetConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'users_filter': 'UsersFilter' + } + if hasattr(NotificationTargetConfig, "swagger_types"): + swagger_types.update(NotificationTargetConfig.swagger_types) + + attribute_map = { + 'description': 'description', + 'users_filter': 'usersFilter' + } + if hasattr(NotificationTargetConfig, "attribute_map"): + attribute_map.update(NotificationTargetConfig.attribute_map) + + def __init__(self, description=None, users_filter=None, *args, **kwargs): # noqa: E501 + """PlatformUsersNotificationTargetConfig - a model defined in Swagger""" # noqa: E501 + self._description = None + self._users_filter = None + self.discriminator = None + if description is not None: + self.description = description + self.users_filter = users_filter + NotificationTargetConfig.__init__(self, *args, **kwargs) + + @property + def description(self): + """Gets the description of this PlatformUsersNotificationTargetConfig. # noqa: E501 + + + :return: The description of this PlatformUsersNotificationTargetConfig. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this PlatformUsersNotificationTargetConfig. + + + :param description: The description of this PlatformUsersNotificationTargetConfig. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def users_filter(self): + """Gets the users_filter of this PlatformUsersNotificationTargetConfig. # noqa: E501 + + + :return: The users_filter of this PlatformUsersNotificationTargetConfig. # noqa: E501 + :rtype: UsersFilter + """ + return self._users_filter + + @users_filter.setter + def users_filter(self, users_filter): + """Sets the users_filter of this PlatformUsersNotificationTargetConfig. + + + :param users_filter: The users_filter of this PlatformUsersNotificationTargetConfig. # noqa: E501 + :type: UsersFilter + """ + if users_filter is None: + raise ValueError("Invalid value for `users_filter`, must not be `None`") # noqa: E501 + + self._users_filter = users_filter + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PlatformUsersNotificationTargetConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PlatformUsersNotificationTargetConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/power_saving_configuration.py b/tb_rest_client/models/models_ce/power_saving_configuration.py index 4cbe2f4a..99f56168 100644 --- a/tb_rest_client/models/models_ce/power_saving_configuration.py +++ b/tb_rest_client/models/models_ce/power_saving_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PowerSavingConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/processing_strategy.py b/tb_rest_client/models/models_ce/processing_strategy.py index 6bdc2749..5719b7a0 100644 --- a/tb_rest_client/models/models_ce/processing_strategy.py +++ b/tb_rest_client/models/models_ce/processing_strategy.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ProcessingStrategy(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/proto_transport_payload_configuration.py b/tb_rest_client/models/models_ce/proto_transport_payload_configuration.py index dd885ab8..c45fec29 100644 --- a/tb_rest_client/models/models_ce/proto_transport_payload_configuration.py +++ b/tb_rest_client/models/models_ce/proto_transport_payload_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .transport_payload_type_configuration import TransportPayloadTypeConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.transport_payload_type_configuration import TransportPayloadTypeConfiguration # noqa: F401,E501 class ProtoTransportPayloadConfiguration(TransportPayloadTypeConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/psk_lw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_ce/psklw_m2_m_bootstrap_server_credential.py similarity index 98% rename from tb_rest_client/models/models_ce/psk_lw_m2_m_bootstrap_server_credential.py rename to tb_rest_client/models/models_ce/psklw_m2_m_bootstrap_server_credential.py index 6c655ed1..aa3dff44 100644 --- a/tb_rest_client/models/models_ce/psk_lw_m2_m_bootstrap_server_credential.py +++ b/tb_rest_client/models/models_ce/psklw_m2_m_bootstrap_server_credential.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .lw_m2_m_bootstrap_server_credential import LwM2MBootstrapServerCredential # noqa: F401,E501 +from tb_rest_client.models.models_ce.lw_m2_m_bootstrap_server_credential import LwM2MBootstrapServerCredential # noqa: F401,E501 class PSKLwM2MBootstrapServerCredential(LwM2MBootstrapServerCredential): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/queue.py b/tb_rest_client/models/models_ce/queue.py index f585406c..fadb787e 100644 --- a/tb_rest_client/models/models_ce/queue.py +++ b/tb_rest_client/models/models_ce/queue.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Queue(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/queue_id.py b/tb_rest_client/models/models_ce/queue_id.py index 1880022d..cebd83a7 100644 --- a/tb_rest_client/models/models_ce/queue_id.py +++ b/tb_rest_client/models/models_ce/queue_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class QueueId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -90,7 +90,7 @@ def entity_type(self, entity_type): """ if entity_type is None: raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/relation_entity_type_filter.py b/tb_rest_client/models/models_ce/relation_entity_type_filter.py index b72cf307..c5e6310f 100644 --- a/tb_rest_client/models/models_ce/relation_entity_type_filter.py +++ b/tb_rest_client/models/models_ce/relation_entity_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RelationEntityTypeFilter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -90,7 +90,7 @@ def entity_types(self, entity_types): :param entity_types: The entity_types of this RelationEntityTypeFilter. # noqa: E501 :type: list[str] """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if not set(entity_types).issubset(set(allowed_values)): raise ValueError( "Invalid values for `entity_types` [{0}], must be a subset of [{1}]" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/relations_query_filter.py b/tb_rest_client/models/models_ce/relations_query_filter.py index 5d0f57c1..a5a27963 100644 --- a/tb_rest_client/models/models_ce/relations_query_filter.py +++ b/tb_rest_client/models/models_ce/relations_query_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class RelationsQueryFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -212,7 +212,7 @@ def multi_root_entities_type(self, multi_root_entities_type): :param multi_root_entities_type: The multi_root_entities_type of this RelationsQueryFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if multi_root_entities_type not in allowed_values: raise ValueError( "Invalid value for `multi_root_entities_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/relations_search_parameters.py b/tb_rest_client/models/models_ce/relations_search_parameters.py index 1976dc88..9d759acd 100644 --- a/tb_rest_client/models/models_ce/relations_search_parameters.py +++ b/tb_rest_client/models/models_ce/relations_search_parameters.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RelationsSearchParameters(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -110,7 +110,7 @@ def root_type(self, root_type): :param root_type: The root_type of this RelationsSearchParameters. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if root_type not in allowed_values: raise ValueError( "Invalid value for `root_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/repeating_alarm_condition_spec.py b/tb_rest_client/models/models_ce/repeating_alarm_condition_spec.py index 21458fc9..10231041 100644 --- a/tb_rest_client/models/models_ce/repeating_alarm_condition_spec.py +++ b/tb_rest_client/models/models_ce/repeating_alarm_condition_spec.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 +from tb_rest_client.models.models_ce.alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 class RepeatingAlarmConditionSpec(AlarmConditionSpec): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/repository_settings.py b/tb_rest_client/models/models_ce/repository_settings.py index 891980f3..3950ef69 100644 --- a/tb_rest_client/models/models_ce/repository_settings.py +++ b/tb_rest_client/models/models_ce/repository_settings.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RepositorySettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -34,7 +34,9 @@ class RepositorySettings(object): 'private_key': 'str', 'private_key_file_name': 'str', 'private_key_password': 'str', + 'read_only': 'bool', 'repository_uri': 'str', + 'show_merge_commits': 'bool', 'username': 'str' } @@ -45,11 +47,13 @@ class RepositorySettings(object): 'private_key': 'privateKey', 'private_key_file_name': 'privateKeyFileName', 'private_key_password': 'privateKeyPassword', + 'read_only': 'readOnly', 'repository_uri': 'repositoryUri', + 'show_merge_commits': 'showMergeCommits', 'username': 'username' } - def __init__(self, auth_method=None, default_branch=None, password=None, private_key=None, private_key_file_name=None, private_key_password=None, repository_uri=None, username=None): # noqa: E501 + def __init__(self, auth_method=None, default_branch=None, password=None, private_key=None, private_key_file_name=None, private_key_password=None, read_only=None, repository_uri=None, show_merge_commits=None, username=None): # noqa: E501 """RepositorySettings - a model defined in Swagger""" # noqa: E501 self._auth_method = None self._default_branch = None @@ -57,7 +61,9 @@ def __init__(self, auth_method=None, default_branch=None, password=None, private self._private_key = None self._private_key_file_name = None self._private_key_password = None + self._read_only = None self._repository_uri = None + self._show_merge_commits = None self._username = None self.discriminator = None if auth_method is not None: @@ -72,8 +78,12 @@ def __init__(self, auth_method=None, default_branch=None, password=None, private self.private_key_file_name = private_key_file_name if private_key_password is not None: self.private_key_password = private_key_password + if read_only is not None: + self.read_only = read_only if repository_uri is not None: self.repository_uri = repository_uri + if show_merge_commits is not None: + self.show_merge_commits = show_merge_commits if username is not None: self.username = username @@ -209,6 +219,27 @@ def private_key_password(self, private_key_password): self._private_key_password = private_key_password + @property + def read_only(self): + """Gets the read_only of this RepositorySettings. # noqa: E501 + + + :return: The read_only of this RepositorySettings. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this RepositorySettings. + + + :param read_only: The read_only of this RepositorySettings. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + @property def repository_uri(self): """Gets the repository_uri of this RepositorySettings. # noqa: E501 @@ -230,6 +261,27 @@ def repository_uri(self, repository_uri): self._repository_uri = repository_uri + @property + def show_merge_commits(self): + """Gets the show_merge_commits of this RepositorySettings. # noqa: E501 + + + :return: The show_merge_commits of this RepositorySettings. # noqa: E501 + :rtype: bool + """ + return self._show_merge_commits + + @show_merge_commits.setter + def show_merge_commits(self, show_merge_commits): + """Sets the show_merge_commits of this RepositorySettings. + + + :param show_merge_commits: The show_merge_commits of this RepositorySettings. # noqa: E501 + :type: bool + """ + + self._show_merge_commits = show_merge_commits + @property def username(self): """Gets the username of this RepositorySettings. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/repository_settings_info.py b/tb_rest_client/models/models_ce/repository_settings_info.py new file mode 100644 index 00000000..9340ea9a --- /dev/null +++ b/tb_rest_client/models/models_ce/repository_settings_info.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class RepositorySettingsInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'configured': 'bool', + 'read_only': 'bool' + } + + attribute_map = { + 'configured': 'configured', + 'read_only': 'readOnly' + } + + def __init__(self, configured=None, read_only=None): # noqa: E501 + """RepositorySettingsInfo - a model defined in Swagger""" # noqa: E501 + self._configured = None + self._read_only = None + self.discriminator = None + if configured is not None: + self.configured = configured + if read_only is not None: + self.read_only = read_only + + @property + def configured(self): + """Gets the configured of this RepositorySettingsInfo. # noqa: E501 + + + :return: The configured of this RepositorySettingsInfo. # noqa: E501 + :rtype: bool + """ + return self._configured + + @configured.setter + def configured(self, configured): + """Sets the configured of this RepositorySettingsInfo. + + + :param configured: The configured of this RepositorySettingsInfo. # noqa: E501 + :type: bool + """ + + self._configured = configured + + @property + def read_only(self): + """Gets the read_only of this RepositorySettingsInfo. # noqa: E501 + + + :return: The read_only of this RepositorySettingsInfo. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this RepositorySettingsInfo. + + + :param read_only: The read_only of this RepositorySettingsInfo. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RepositorySettingsInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepositorySettingsInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/reset_password_email_request.py b/tb_rest_client/models/models_ce/reset_password_email_request.py index ae28a552..f6f1e431 100644 --- a/tb_rest_client/models/models_ce/reset_password_email_request.py +++ b/tb_rest_client/models/models_ce/reset_password_email_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ResetPasswordEmailRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/reset_password_request.py b/tb_rest_client/models/models_ce/reset_password_request.py index 8dfe4fdd..1ad86646 100644 --- a/tb_rest_client/models/models_ce/reset_password_request.py +++ b/tb_rest_client/models/models_ce/reset_password_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ResetPasswordRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/resource.py b/tb_rest_client/models/models_ce/resource.py index 118bcc76..2d7e0cb2 100644 --- a/tb_rest_client/models/models_ce/resource.py +++ b/tb_rest_client/models/models_ce/resource.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Resource(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/response_entity.py b/tb_rest_client/models/models_ce/response_entity.py index 677bf072..3add8aee 100644 --- a/tb_rest_client/models/models_ce/response_entity.py +++ b/tb_rest_client/models/models_ce/response_entity.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ResponseEntity(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/rpc.py b/tb_rest_client/models/models_ce/rpc.py index d458f8e9..ac3532ba 100644 --- a/tb_rest_client/models/models_ce/rpc.py +++ b/tb_rest_client/models/models_ce/rpc.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Rpc(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/rpc_id.py b/tb_rest_client/models/models_ce/rpc_id.py index d7e23001..fc5c3416 100644 --- a/tb_rest_client/models/models_ce/rpc_id.py +++ b/tb_rest_client/models/models_ce/rpc_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RpcId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/rpk_lw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_ce/rpklw_m2_m_bootstrap_server_credential.py similarity index 99% rename from tb_rest_client/models/models_ce/rpk_lw_m2_m_bootstrap_server_credential.py rename to tb_rest_client/models/models_ce/rpklw_m2_m_bootstrap_server_credential.py index 748a840f..d3538eeb 100644 --- a/tb_rest_client/models/models_ce/rpk_lw_m2_m_bootstrap_server_credential.py +++ b/tb_rest_client/models/models_ce/rpklw_m2_m_bootstrap_server_credential.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RPKLwM2MBootstrapServerCredential(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/rule_chain.py b/tb_rest_client/models/models_ce/rule_chain.py index aab0d5ca..c920e2dc 100644 --- a/tb_rest_client/models/models_ce/rule_chain.py +++ b/tb_rest_client/models/models_ce/rule_chain.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChain(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -29,7 +29,6 @@ class RuleChain(object): """ swagger_types = { 'additional_info': 'JsonNode', - 'external_id': 'RuleChainId', 'id': 'RuleChainId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -43,7 +42,6 @@ class RuleChain(object): attribute_map = { 'additional_info': 'additionalInfo', - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -55,10 +53,9 @@ class RuleChain(object): 'configuration': 'configuration' } - def __init__(self, additional_info=None, external_id=None, id=None, created_time=None, tenant_id=None, name=None, type=None, first_rule_node_id=None, root=None, debug_mode=None, configuration=None): # noqa: E501 + def __init__(self, additional_info=None, id=None, created_time=None, tenant_id=None, name=None, type=None, first_rule_node_id=None, root=None, debug_mode=None, configuration=None): # noqa: E501 """RuleChain - a model defined in Swagger""" # noqa: E501 self._additional_info = None - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -71,8 +68,6 @@ def __init__(self, additional_info=None, external_id=None, id=None, created_time self.discriminator = None if additional_info is not None: self.additional_info = additional_info - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -111,27 +106,6 @@ def additional_info(self, additional_info): self._additional_info = additional_info - @property - def external_id(self): - """Gets the external_id of this RuleChain. # noqa: E501 - - - :return: The external_id of this RuleChain. # noqa: E501 - :rtype: RuleChainId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this RuleChain. - - - :param external_id: The external_id of this RuleChain. # noqa: E501 - :type: RuleChainId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this RuleChain. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/rule_chain_connection_info.py b/tb_rest_client/models/models_ce/rule_chain_connection_info.py index 2e0b3fa9..18903920 100644 --- a/tb_rest_client/models/models_ce/rule_chain_connection_info.py +++ b/tb_rest_client/models/models_ce/rule_chain_connection_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainConnectionInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/rule_chain_data.py b/tb_rest_client/models/models_ce/rule_chain_data.py index 6d288f4c..75fc3407 100644 --- a/tb_rest_client/models/models_ce/rule_chain_data.py +++ b/tb_rest_client/models/models_ce/rule_chain_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/rule_chain_debug_event_filter.py b/tb_rest_client/models/models_ce/rule_chain_debug_event_filter.py new file mode 100644 index 00000000..113d36ae --- /dev/null +++ b/tb_rest_client/models/models_ce/rule_chain_debug_event_filter.py @@ -0,0 +1,261 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.event_filter import EventFilter # noqa: F401,E501 + +class RuleChainDebugEventFilter(EventFilter): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'error': 'bool', + 'not_empty': 'bool', + 'event_type': 'str', + 'server': 'str', + 'message': 'str', + 'error_str': 'str' + } + if hasattr(EventFilter, "swagger_types"): + swagger_types.update(EventFilter.swagger_types) + + attribute_map = { + 'error': 'error', + 'not_empty': 'notEmpty', + 'event_type': 'eventType', + 'server': 'server', + 'message': 'message', + 'error_str': 'errorStr' + } + if hasattr(EventFilter, "attribute_map"): + attribute_map.update(EventFilter.attribute_map) + + def __init__(self, error=None, not_empty=None, event_type=None, server=None, message=None, error_str=None, *args, **kwargs): # noqa: E501 + """RuleChainDebugEventFilter - a model defined in Swagger""" # noqa: E501 + self._error = None + self._not_empty = None + self._event_type = None + self._server = None + self._message = None + self._error_str = None + self.discriminator = None + if error is not None: + self.error = error + if not_empty is not None: + self.not_empty = not_empty + self.event_type = event_type + if server is not None: + self.server = server + if message is not None: + self.message = message + if error_str is not None: + self.error_str = error_str + EventFilter.__init__(self, *args, **kwargs) + + @property + def error(self): + """Gets the error of this RuleChainDebugEventFilter. # noqa: E501 + + + :return: The error of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: bool + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this RuleChainDebugEventFilter. + + + :param error: The error of this RuleChainDebugEventFilter. # noqa: E501 + :type: bool + """ + + self._error = error + + @property + def not_empty(self): + """Gets the not_empty of this RuleChainDebugEventFilter. # noqa: E501 + + + :return: The not_empty of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this RuleChainDebugEventFilter. + + + :param not_empty: The not_empty of this RuleChainDebugEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + + @property + def event_type(self): + """Gets the event_type of this RuleChainDebugEventFilter. # noqa: E501 + + String value representing the event type # noqa: E501 + + :return: The event_type of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._event_type + + @event_type.setter + def event_type(self, event_type): + """Sets the event_type of this RuleChainDebugEventFilter. + + String value representing the event type # noqa: E501 + + :param event_type: The event_type of this RuleChainDebugEventFilter. # noqa: E501 + :type: str + """ + if event_type is None: + raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 + allowed_values = ["DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "STATS"] # noqa: E501 + if event_type not in allowed_values: + raise ValueError( + "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 + .format(event_type, allowed_values) + ) + + self._event_type = event_type + + @property + def server(self): + """Gets the server of this RuleChainDebugEventFilter. # noqa: E501 + + String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + + :return: The server of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._server + + @server.setter + def server(self, server): + """Sets the server of this RuleChainDebugEventFilter. + + String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + + :param server: The server of this RuleChainDebugEventFilter. # noqa: E501 + :type: str + """ + + self._server = server + + @property + def message(self): + """Gets the message of this RuleChainDebugEventFilter. # noqa: E501 + + String value representing the message # noqa: E501 + + :return: The message of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this RuleChainDebugEventFilter. + + String value representing the message # noqa: E501 + + :param message: The message of this RuleChainDebugEventFilter. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def error_str(self): + """Gets the error_str of this RuleChainDebugEventFilter. # noqa: E501 + + The case insensitive 'contains' filter based on error message # noqa: E501 + + :return: The error_str of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._error_str + + @error_str.setter + def error_str(self, error_str): + """Sets the error_str of this RuleChainDebugEventFilter. + + The case insensitive 'contains' filter based on error message # noqa: E501 + + :param error_str: The error_str of this RuleChainDebugEventFilter. # noqa: E501 + :type: str + """ + + self._error_str = error_str + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RuleChainDebugEventFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleChainDebugEventFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/rule_chain_export_data.py b/tb_rest_client/models/models_ce/rule_chain_export_data.py index 8f19f0b7..ae70efc7 100644 --- a/tb_rest_client/models/models_ce/rule_chain_export_data.py +++ b/tb_rest_client/models/models_ce/rule_chain_export_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 class RuleChainExportData(EntityExportDataobject): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -128,7 +128,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this RuleChainExportData. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/rule_chain_id.py b/tb_rest_client/models/models_ce/rule_chain_id.py index cfeb31e8..1e070817 100644 --- a/tb_rest_client/models/models_ce/rule_chain_id.py +++ b/tb_rest_client/models/models_ce/rule_chain_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/rule_chain_import_result.py b/tb_rest_client/models/models_ce/rule_chain_import_result.py index 5c25b3a2..95860c76 100644 --- a/tb_rest_client/models/models_ce/rule_chain_import_result.py +++ b/tb_rest_client/models/models_ce/rule_chain_import_result.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainImportResult(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/rule_chain_meta_data.py b/tb_rest_client/models/models_ce/rule_chain_meta_data.py index 9ad9e148..357f2d32 100644 --- a/tb_rest_client/models/models_ce/rule_chain_meta_data.py +++ b/tb_rest_client/models/models_ce/rule_chain_meta_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainMetaData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/rule_chain_output_labels_usage.py b/tb_rest_client/models/models_ce/rule_chain_output_labels_usage.py index ec888a09..3974c2c7 100644 --- a/tb_rest_client/models/models_ce/rule_chain_output_labels_usage.py +++ b/tb_rest_client/models/models_ce/rule_chain_output_labels_usage.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainOutputLabelsUsage(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/rule_engine_component_lifecycle_event_notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/rule_engine_component_lifecycle_event_notification_rule_trigger_config.py new file mode 100644 index 00000000..55899e08 --- /dev/null +++ b/tb_rest_client/models/models_ce/rule_engine_component_lifecycle_event_notification_rule_trigger_config.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 + +class RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'only_rule_chain_lifecycle_failures': 'bool', + 'only_rule_node_lifecycle_failures': 'bool', + 'rule_chain_events': 'list[str]', + 'rule_chains': 'list[str]', + 'rule_node_events': 'list[str]', + 'track_rule_node_events': 'bool', + 'trigger_type': 'str' + } + if hasattr(NotificationRuleTriggerConfig, "swagger_types"): + swagger_types.update(NotificationRuleTriggerConfig.swagger_types) + + attribute_map = { + 'only_rule_chain_lifecycle_failures': 'onlyRuleChainLifecycleFailures', + 'only_rule_node_lifecycle_failures': 'onlyRuleNodeLifecycleFailures', + 'rule_chain_events': 'ruleChainEvents', + 'rule_chains': 'ruleChains', + 'rule_node_events': 'ruleNodeEvents', + 'track_rule_node_events': 'trackRuleNodeEvents', + 'trigger_type': 'triggerType' + } + if hasattr(NotificationRuleTriggerConfig, "attribute_map"): + attribute_map.update(NotificationRuleTriggerConfig.attribute_map) + + def __init__(self, only_rule_chain_lifecycle_failures=None, only_rule_node_lifecycle_failures=None, rule_chain_events=None, rule_chains=None, rule_node_events=None, track_rule_node_events=None, trigger_type=None, *args, **kwargs): # noqa: E501 + """RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._only_rule_chain_lifecycle_failures = None + self._only_rule_node_lifecycle_failures = None + self._rule_chain_events = None + self._rule_chains = None + self._rule_node_events = None + self._track_rule_node_events = None + self._trigger_type = None + self.discriminator = None + if only_rule_chain_lifecycle_failures is not None: + self.only_rule_chain_lifecycle_failures = only_rule_chain_lifecycle_failures + if only_rule_node_lifecycle_failures is not None: + self.only_rule_node_lifecycle_failures = only_rule_node_lifecycle_failures + if rule_chain_events is not None: + self.rule_chain_events = rule_chain_events + if rule_chains is not None: + self.rule_chains = rule_chains + if rule_node_events is not None: + self.rule_node_events = rule_node_events + if track_rule_node_events is not None: + self.track_rule_node_events = track_rule_node_events + if trigger_type is not None: + self.trigger_type = trigger_type + NotificationRuleTriggerConfig.__init__(self, *args, **kwargs) + + @property + def only_rule_chain_lifecycle_failures(self): + """Gets the only_rule_chain_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The only_rule_chain_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._only_rule_chain_lifecycle_failures + + @only_rule_chain_lifecycle_failures.setter + def only_rule_chain_lifecycle_failures(self, only_rule_chain_lifecycle_failures): + """Sets the only_rule_chain_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param only_rule_chain_lifecycle_failures: The only_rule_chain_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._only_rule_chain_lifecycle_failures = only_rule_chain_lifecycle_failures + + @property + def only_rule_node_lifecycle_failures(self): + """Gets the only_rule_node_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The only_rule_node_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._only_rule_node_lifecycle_failures + + @only_rule_node_lifecycle_failures.setter + def only_rule_node_lifecycle_failures(self, only_rule_node_lifecycle_failures): + """Sets the only_rule_node_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param only_rule_node_lifecycle_failures: The only_rule_node_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._only_rule_node_lifecycle_failures = only_rule_node_lifecycle_failures + + @property + def rule_chain_events(self): + """Gets the rule_chain_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The rule_chain_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._rule_chain_events + + @rule_chain_events.setter + def rule_chain_events(self, rule_chain_events): + """Sets the rule_chain_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param rule_chain_events: The rule_chain_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACTIVATED", "CREATED", "DELETED", "STARTED", "STOPPED", "SUSPENDED", "UPDATED"] # noqa: E501 + if not set(rule_chain_events).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `rule_chain_events` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(rule_chain_events) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._rule_chain_events = rule_chain_events + + @property + def rule_chains(self): + """Gets the rule_chains of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The rule_chains of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._rule_chains + + @rule_chains.setter + def rule_chains(self, rule_chains): + """Sets the rule_chains of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param rule_chains: The rule_chains of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._rule_chains = rule_chains + + @property + def rule_node_events(self): + """Gets the rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._rule_node_events + + @rule_node_events.setter + def rule_node_events(self, rule_node_events): + """Sets the rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param rule_node_events: The rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACTIVATED", "CREATED", "DELETED", "STARTED", "STOPPED", "SUSPENDED", "UPDATED"] # noqa: E501 + if not set(rule_node_events).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `rule_node_events` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(rule_node_events) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._rule_node_events = rule_node_events + + @property + def track_rule_node_events(self): + """Gets the track_rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The track_rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._track_rule_node_events + + @track_rule_node_events.setter + def track_rule_node_events(self, track_rule_node_events): + """Sets the track_rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param track_rule_node_events: The track_rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._track_rule_node_events = track_rule_node_events + + @property + def trigger_type(self): + """Gets the trigger_type of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/rule_node.py b/tb_rest_client/models/models_ce/rule_node.py index 14801f44..756f62f1 100644 --- a/tb_rest_client/models/models_ce/rule_node.py +++ b/tb_rest_client/models/models_ce/rule_node.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleNode(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -35,8 +35,9 @@ class RuleNode(object): 'type': 'str', 'name': 'str', 'debug_mode': 'bool', - 'configuration': 'JsonNode', - 'additional_info': 'JsonNode' + 'singleton_mode': 'bool', + 'additional_info': 'JsonNode', + 'configuration': 'JsonNode' } attribute_map = { @@ -47,11 +48,12 @@ class RuleNode(object): 'type': 'type', 'name': 'name', 'debug_mode': 'debugMode', - 'configuration': 'configuration', - 'additional_info': 'additionalInfo' + 'singleton_mode': 'singletonMode', + 'additional_info': 'additionalInfo', + 'configuration': 'configuration' } - def __init__(self, external_id=None, id=None, created_time=None, rule_chain_id=None, type=None, name=None, debug_mode=None, configuration=None, additional_info=None): # noqa: E501 + def __init__(self, external_id=None, id=None, created_time=None, rule_chain_id=None, type=None, name=None, debug_mode=None, singleton_mode=None, additional_info=None, configuration=None): # noqa: E501 """RuleNode - a model defined in Swagger""" # noqa: E501 self._external_id = None self._id = None @@ -60,8 +62,9 @@ def __init__(self, external_id=None, id=None, created_time=None, rule_chain_id=N self._type = None self._name = None self._debug_mode = None - self._configuration = None + self._singleton_mode = None self._additional_info = None + self._configuration = None self.discriminator = None if external_id is not None: self.external_id = external_id @@ -77,10 +80,12 @@ def __init__(self, external_id=None, id=None, created_time=None, rule_chain_id=N self.name = name if debug_mode is not None: self.debug_mode = debug_mode - if configuration is not None: - self.configuration = configuration + if singleton_mode is not None: + self.singleton_mode = singleton_mode if additional_info is not None: self.additional_info = additional_info + if configuration is not None: + self.configuration = configuration @property def external_id(self): @@ -238,25 +243,27 @@ def debug_mode(self, debug_mode): self._debug_mode = debug_mode @property - def configuration(self): - """Gets the configuration of this RuleNode. # noqa: E501 + def singleton_mode(self): + """Gets the singleton_mode of this RuleNode. # noqa: E501 + Enable/disable singleton mode. # noqa: E501 - :return: The configuration of this RuleNode. # noqa: E501 - :rtype: JsonNode + :return: The singleton_mode of this RuleNode. # noqa: E501 + :rtype: bool """ - return self._configuration + return self._singleton_mode - @configuration.setter - def configuration(self, configuration): - """Sets the configuration of this RuleNode. + @singleton_mode.setter + def singleton_mode(self, singleton_mode): + """Sets the singleton_mode of this RuleNode. + Enable/disable singleton mode. # noqa: E501 - :param configuration: The configuration of this RuleNode. # noqa: E501 - :type: JsonNode + :param singleton_mode: The singleton_mode of this RuleNode. # noqa: E501 + :type: bool """ - self._configuration = configuration + self._singleton_mode = singleton_mode @property def additional_info(self): @@ -279,6 +286,27 @@ def additional_info(self, additional_info): self._additional_info = additional_info + @property + def configuration(self): + """Gets the configuration of this RuleNode. # noqa: E501 + + + :return: The configuration of this RuleNode. # noqa: E501 + :rtype: JsonNode + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this RuleNode. + + + :param configuration: The configuration of this RuleNode. # noqa: E501 + :type: JsonNode + """ + + self._configuration = configuration + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_ce/debug_rule_node_event_filter.py b/tb_rest_client/models/models_ce/rule_node_debug_event_filter.py similarity index 63% rename from tb_rest_client/models/models_ce/debug_rule_node_event_filter.py rename to tb_rest_client/models/models_ce/rule_node_debug_event_filter.py index d43a5f38..6f89ede7 100644 --- a/tb_rest_client/models/models_ce/debug_rule_node_event_filter.py +++ b/tb_rest_client/models/models_ce/rule_node_debug_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .event_filter import EventFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.event_filter import EventFilter # noqa: F401,E501 -class DebugRuleNodeEventFilter(EventFilter): - """ +class RuleNodeDebugEventFilter(EventFilter): + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -30,15 +30,17 @@ class DebugRuleNodeEventFilter(EventFilter): """ swagger_types = { 'error': 'bool', + 'not_empty': 'bool', 'event_type': 'str', - 'msg_direction_type': 'str', 'server': 'str', - 'data_search': 'str', - 'metadata_search': 'str', - 'entity_name': 'str', - 'relation_type': 'str', + 'msg_direction_type': 'str', 'entity_id': 'str', + 'entity_type': 'str', + 'msg_id': 'str', 'msg_type': 'str', + 'relation_type': 'str', + 'data_search': 'str', + 'metadata_search': 'str', 'error_str': 'str' } if hasattr(EventFilter, "swagger_types"): @@ -46,96 +48,125 @@ class DebugRuleNodeEventFilter(EventFilter): attribute_map = { 'error': 'error', + 'not_empty': 'notEmpty', 'event_type': 'eventType', - 'msg_direction_type': 'msgDirectionType', 'server': 'server', - 'data_search': 'dataSearch', - 'metadata_search': 'metadataSearch', - 'entity_name': 'entityName', - 'relation_type': 'relationType', + 'msg_direction_type': 'msgDirectionType', 'entity_id': 'entityId', + 'entity_type': 'entityType', + 'msg_id': 'msgId', 'msg_type': 'msgType', + 'relation_type': 'relationType', + 'data_search': 'dataSearch', + 'metadata_search': 'metadataSearch', 'error_str': 'errorStr' } if hasattr(EventFilter, "attribute_map"): attribute_map.update(EventFilter.attribute_map) - def __init__(self, error=None, event_type=None, msg_direction_type=None, server=None, data_search=None, metadata_search=None, entity_name=None, relation_type=None, entity_id=None, msg_type=None, error_str=None, *args, **kwargs): # noqa: E501 - """DebugRuleNodeEventFilter - a model defined in Swagger""" # noqa: E501 + def __init__(self, error=None, not_empty=None, event_type=None, server=None, msg_direction_type=None, entity_id=None, entity_type=None, msg_id=None, msg_type=None, relation_type=None, data_search=None, metadata_search=None, error_str=None, *args, **kwargs): # noqa: E501 + """RuleNodeDebugEventFilter - a model defined in Swagger""" # noqa: E501 self._error = None + self._not_empty = None self._event_type = None - self._msg_direction_type = None self._server = None - self._data_search = None - self._metadata_search = None - self._entity_name = None - self._relation_type = None + self._msg_direction_type = None self._entity_id = None + self._entity_type = None + self._msg_id = None self._msg_type = None + self._relation_type = None + self._data_search = None + self._metadata_search = None self._error_str = None self.discriminator = None if error is not None: self.error = error + if not_empty is not None: + self.not_empty = not_empty self.event_type = event_type - if msg_direction_type is not None: - self.msg_direction_type = msg_direction_type if server is not None: self.server = server - if data_search is not None: - self.data_search = data_search - if metadata_search is not None: - self.metadata_search = metadata_search - if entity_name is not None: - self.entity_name = entity_name - if relation_type is not None: - self.relation_type = relation_type + if msg_direction_type is not None: + self.msg_direction_type = msg_direction_type if entity_id is not None: self.entity_id = entity_id + if entity_type is not None: + self.entity_type = entity_type + if msg_id is not None: + self.msg_id = msg_id if msg_type is not None: self.msg_type = msg_type + if relation_type is not None: + self.relation_type = relation_type + if data_search is not None: + self.data_search = data_search + if metadata_search is not None: + self.metadata_search = metadata_search if error_str is not None: self.error_str = error_str EventFilter.__init__(self, *args, **kwargs) @property def error(self): - """Gets the error of this DebugRuleNodeEventFilter. # noqa: E501 + """Gets the error of this RuleNodeDebugEventFilter. # noqa: E501 - :return: The error of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The error of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: bool """ return self._error @error.setter def error(self, error): - """Sets the error of this DebugRuleNodeEventFilter. + """Sets the error of this RuleNodeDebugEventFilter. - :param error: The error of this DebugRuleNodeEventFilter. # noqa: E501 + :param error: The error of this RuleNodeDebugEventFilter. # noqa: E501 :type: bool """ self._error = error + @property + def not_empty(self): + """Gets the not_empty of this RuleNodeDebugEventFilter. # noqa: E501 + + + :return: The not_empty of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this RuleNodeDebugEventFilter. + + + :param not_empty: The not_empty of this RuleNodeDebugEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + @property def event_type(self): - """Gets the event_type of this DebugRuleNodeEventFilter. # noqa: E501 + """Gets the event_type of this RuleNodeDebugEventFilter. # noqa: E501 String value representing the event type # noqa: E501 - :return: The event_type of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The event_type of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: str """ return self._event_type @event_type.setter def event_type(self, event_type): - """Sets the event_type of this DebugRuleNodeEventFilter. + """Sets the event_type of this RuleNodeDebugEventFilter. String value representing the event type # noqa: E501 - :param event_type: The event_type of this DebugRuleNodeEventFilter. # noqa: E501 + :param event_type: The event_type of this RuleNodeDebugEventFilter. # noqa: E501 :type: str """ if event_type is None: @@ -149,24 +180,47 @@ def event_type(self, event_type): self._event_type = event_type + @property + def server(self): + """Gets the server of this RuleNodeDebugEventFilter. # noqa: E501 + + String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + + :return: The server of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._server + + @server.setter + def server(self, server): + """Sets the server of this RuleNodeDebugEventFilter. + + String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + + :param server: The server of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + + self._server = server + @property def msg_direction_type(self): - """Gets the msg_direction_type of this DebugRuleNodeEventFilter. # noqa: E501 + """Gets the msg_direction_type of this RuleNodeDebugEventFilter. # noqa: E501 String value representing msg direction type (incoming to entity or outcoming from entity) # noqa: E501 - :return: The msg_direction_type of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The msg_direction_type of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: str """ return self._msg_direction_type @msg_direction_type.setter def msg_direction_type(self, msg_direction_type): - """Sets the msg_direction_type of this DebugRuleNodeEventFilter. + """Sets the msg_direction_type of this RuleNodeDebugEventFilter. String value representing msg direction type (incoming to entity or outcoming from entity) # noqa: E501 - :param msg_direction_type: The msg_direction_type of this DebugRuleNodeEventFilter. # noqa: E501 + :param msg_direction_type: The msg_direction_type of this RuleNodeDebugEventFilter. # noqa: E501 :type: str """ allowed_values = ["IN", "OUT"] # noqa: E501 @@ -179,190 +233,190 @@ def msg_direction_type(self, msg_direction_type): self._msg_direction_type = msg_direction_type @property - def server(self): - """Gets the server of this DebugRuleNodeEventFilter. # noqa: E501 + def entity_id(self): + """Gets the entity_id of this RuleNodeDebugEventFilter. # noqa: E501 - String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + String value representing the entity id in the event body (originator of the message) # noqa: E501 - :return: The server of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The entity_id of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: str """ - return self._server + return self._entity_id - @server.setter - def server(self, server): - """Sets the server of this DebugRuleNodeEventFilter. + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this RuleNodeDebugEventFilter. - String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + String value representing the entity id in the event body (originator of the message) # noqa: E501 - :param server: The server of this DebugRuleNodeEventFilter. # noqa: E501 + :param entity_id: The entity_id of this RuleNodeDebugEventFilter. # noqa: E501 :type: str """ - self._server = server + self._entity_id = entity_id @property - def data_search(self): - """Gets the data_search of this DebugRuleNodeEventFilter. # noqa: E501 + def entity_type(self): + """Gets the entity_type of this RuleNodeDebugEventFilter. # noqa: E501 - The case insensitive 'contains' filter based on data (key and value) for the message. # noqa: E501 + String value representing the entity type # noqa: E501 - :return: The data_search of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The entity_type of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: str """ - return self._data_search + return self._entity_type - @data_search.setter - def data_search(self, data_search): - """Sets the data_search of this DebugRuleNodeEventFilter. + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this RuleNodeDebugEventFilter. - The case insensitive 'contains' filter based on data (key and value) for the message. # noqa: E501 + String value representing the entity type # noqa: E501 - :param data_search: The data_search of this DebugRuleNodeEventFilter. # noqa: E501 + :param entity_type: The entity_type of this RuleNodeDebugEventFilter. # noqa: E501 :type: str """ + allowed_values = ["DEVICE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) - self._data_search = data_search + self._entity_type = entity_type @property - def metadata_search(self): - """Gets the metadata_search of this DebugRuleNodeEventFilter. # noqa: E501 + def msg_id(self): + """Gets the msg_id of this RuleNodeDebugEventFilter. # noqa: E501 - The case insensitive 'contains' filter based on metadata (key and value) for the message. # noqa: E501 + String value representing the message id in the rule engine # noqa: E501 - :return: The metadata_search of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The msg_id of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: str """ - return self._metadata_search + return self._msg_id - @metadata_search.setter - def metadata_search(self, metadata_search): - """Sets the metadata_search of this DebugRuleNodeEventFilter. + @msg_id.setter + def msg_id(self, msg_id): + """Sets the msg_id of this RuleNodeDebugEventFilter. - The case insensitive 'contains' filter based on metadata (key and value) for the message. # noqa: E501 + String value representing the message id in the rule engine # noqa: E501 - :param metadata_search: The metadata_search of this DebugRuleNodeEventFilter. # noqa: E501 + :param msg_id: The msg_id of this RuleNodeDebugEventFilter. # noqa: E501 :type: str """ - self._metadata_search = metadata_search + self._msg_id = msg_id @property - def entity_name(self): - """Gets the entity_name of this DebugRuleNodeEventFilter. # noqa: E501 + def msg_type(self): + """Gets the msg_type of this RuleNodeDebugEventFilter. # noqa: E501 - String value representing the entity type # noqa: E501 + String value representing the message type # noqa: E501 - :return: The entity_name of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The msg_type of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: str """ - return self._entity_name + return self._msg_type - @entity_name.setter - def entity_name(self, entity_name): - """Sets the entity_name of this DebugRuleNodeEventFilter. + @msg_type.setter + def msg_type(self, msg_type): + """Sets the msg_type of this RuleNodeDebugEventFilter. - String value representing the entity type # noqa: E501 + String value representing the message type # noqa: E501 - :param entity_name: The entity_name of this DebugRuleNodeEventFilter. # noqa: E501 + :param msg_type: The msg_type of this RuleNodeDebugEventFilter. # noqa: E501 :type: str """ - allowed_values = ["DEVICE"] # noqa: E501 - if entity_name not in allowed_values: - raise ValueError( - "Invalid value for `entity_name` ({0}), must be one of {1}" # noqa: E501 - .format(entity_name, allowed_values) - ) - self._entity_name = entity_name + self._msg_type = msg_type @property def relation_type(self): - """Gets the relation_type of this DebugRuleNodeEventFilter. # noqa: E501 + """Gets the relation_type of this RuleNodeDebugEventFilter. # noqa: E501 String value representing the type of message routing # noqa: E501 - :return: The relation_type of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The relation_type of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: str """ return self._relation_type @relation_type.setter def relation_type(self, relation_type): - """Sets the relation_type of this DebugRuleNodeEventFilter. + """Sets the relation_type of this RuleNodeDebugEventFilter. String value representing the type of message routing # noqa: E501 - :param relation_type: The relation_type of this DebugRuleNodeEventFilter. # noqa: E501 + :param relation_type: The relation_type of this RuleNodeDebugEventFilter. # noqa: E501 :type: str """ self._relation_type = relation_type @property - def entity_id(self): - """Gets the entity_id of this DebugRuleNodeEventFilter. # noqa: E501 + def data_search(self): + """Gets the data_search of this RuleNodeDebugEventFilter. # noqa: E501 - String value representing the entity id in the event body (originator of the message) # noqa: E501 + The case insensitive 'contains' filter based on data (key and value) for the message. # noqa: E501 - :return: The entity_id of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The data_search of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: str """ - return self._entity_id + return self._data_search - @entity_id.setter - def entity_id(self, entity_id): - """Sets the entity_id of this DebugRuleNodeEventFilter. + @data_search.setter + def data_search(self, data_search): + """Sets the data_search of this RuleNodeDebugEventFilter. - String value representing the entity id in the event body (originator of the message) # noqa: E501 + The case insensitive 'contains' filter based on data (key and value) for the message. # noqa: E501 - :param entity_id: The entity_id of this DebugRuleNodeEventFilter. # noqa: E501 + :param data_search: The data_search of this RuleNodeDebugEventFilter. # noqa: E501 :type: str """ - self._entity_id = entity_id + self._data_search = data_search @property - def msg_type(self): - """Gets the msg_type of this DebugRuleNodeEventFilter. # noqa: E501 + def metadata_search(self): + """Gets the metadata_search of this RuleNodeDebugEventFilter. # noqa: E501 - String value representing the message type # noqa: E501 + The case insensitive 'contains' filter based on metadata (key and value) for the message. # noqa: E501 - :return: The msg_type of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The metadata_search of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: str """ - return self._msg_type + return self._metadata_search - @msg_type.setter - def msg_type(self, msg_type): - """Sets the msg_type of this DebugRuleNodeEventFilter. + @metadata_search.setter + def metadata_search(self, metadata_search): + """Sets the metadata_search of this RuleNodeDebugEventFilter. - String value representing the message type # noqa: E501 + The case insensitive 'contains' filter based on metadata (key and value) for the message. # noqa: E501 - :param msg_type: The msg_type of this DebugRuleNodeEventFilter. # noqa: E501 + :param metadata_search: The metadata_search of this RuleNodeDebugEventFilter. # noqa: E501 :type: str """ - self._msg_type = msg_type + self._metadata_search = metadata_search @property def error_str(self): - """Gets the error_str of this DebugRuleNodeEventFilter. # noqa: E501 + """Gets the error_str of this RuleNodeDebugEventFilter. # noqa: E501 The case insensitive 'contains' filter based on error message # noqa: E501 - :return: The error_str of this DebugRuleNodeEventFilter. # noqa: E501 + :return: The error_str of this RuleNodeDebugEventFilter. # noqa: E501 :rtype: str """ return self._error_str @error_str.setter def error_str(self, error_str): - """Sets the error_str of this DebugRuleNodeEventFilter. + """Sets the error_str of this RuleNodeDebugEventFilter. The case insensitive 'contains' filter based on error message # noqa: E501 - :param error_str: The error_str of this DebugRuleNodeEventFilter. # noqa: E501 + :param error_str: The error_str of this RuleNodeDebugEventFilter. # noqa: E501 :type: str """ @@ -389,7 +443,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(DebugRuleNodeEventFilter, dict): + if issubclass(RuleNodeDebugEventFilter, dict): for key, value in self.items(): result[key] = value @@ -405,7 +459,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, DebugRuleNodeEventFilter): + if not isinstance(other, RuleNodeDebugEventFilter): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/rule_node_id.py b/tb_rest_client/models/models_ce/rule_node_id.py index 84f74788..94ac418b 100644 --- a/tb_rest_client/models/models_ce/rule_node_id.py +++ b/tb_rest_client/models/models_ce/rule_node_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleNodeId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/save_device_with_credentials_request.py b/tb_rest_client/models/models_ce/save_device_with_credentials_request.py index 0dd15fee..122c8b15 100644 --- a/tb_rest_client/models/models_ce/save_device_with_credentials_request.py +++ b/tb_rest_client/models/models_ce/save_device_with_credentials_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SaveDeviceWithCredentialsRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/save_ota_package_info_request.py b/tb_rest_client/models/models_ce/save_ota_package_info_request.py index 351a2198..ed8c7a32 100644 --- a/tb_rest_client/models/models_ce/save_ota_package_info_request.py +++ b/tb_rest_client/models/models_ce/save_ota_package_info_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SaveOtaPackageInfoRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/security_settings.py b/tb_rest_client/models/models_ce/security_settings.py index 6fd282e1..1d43a8bc 100644 --- a/tb_rest_client/models/models_ce/security_settings.py +++ b/tb_rest_client/models/models_ce/security_settings.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SecuritySettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/shared_attributes_setting_snmp_communication_config.py b/tb_rest_client/models/models_ce/shared_attributes_setting_snmp_communication_config.py index 2947a3f1..05475c3c 100644 --- a/tb_rest_client/models/models_ce/shared_attributes_setting_snmp_communication_config.py +++ b/tb_rest_client/models/models_ce/shared_attributes_setting_snmp_communication_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .snmp_communication_config import SnmpCommunicationConfig # noqa: F401,E501 +from tb_rest_client.models.models_ce.snmp_communication_config import SnmpCommunicationConfig # noqa: F401,E501 class SharedAttributesSettingSnmpCommunicationConfig(SnmpCommunicationConfig): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/short_customer_info.py b/tb_rest_client/models/models_ce/short_customer_info.py index 0609bc76..a2c1ba5d 100644 --- a/tb_rest_client/models/models_ce/short_customer_info.py +++ b/tb_rest_client/models/models_ce/short_customer_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ShortCustomerInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/sign_up_request.py b/tb_rest_client/models/models_ce/sign_up_request.py index 14a96d82..08ddd298 100644 --- a/tb_rest_client/models/models_ce/sign_up_request.py +++ b/tb_rest_client/models/models_ce/sign_up_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.3.3 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_ce/simple_alarm_condition_spec.py b/tb_rest_client/models/models_ce/simple_alarm_condition_spec.py index eb7b9f51..1cc18f98 100644 --- a/tb_rest_client/models/models_ce/simple_alarm_condition_spec.py +++ b/tb_rest_client/models/models_ce/simple_alarm_condition_spec.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,11 @@ import re # noqa: F401 import six -from .alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 +from tb_rest_client.models.models_ce.alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 class SimpleAlarmConditionSpec(AlarmConditionSpec): - """ + """NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. """ """ @@ -87,3 +88,7 @@ def __eq__(self, other): def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other + + +if __name__ == '__main__': + SimpleAlarmConditionSpec() diff --git a/tb_rest_client/models/models_ce/single_entity_filter.py b/tb_rest_client/models/models_ce/single_entity_filter.py index c8085d6a..c7e744f5 100644 --- a/tb_rest_client/models/models_ce/single_entity_filter.py +++ b/tb_rest_client/models/models_ce/single_entity_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_filter import EntityFilter # noqa: F401,E501 class SingleEntityFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/single_entity_version_create_request.py b/tb_rest_client/models/models_ce/single_entity_version_create_request.py index df96b9ea..5bef9b8d 100644 --- a/tb_rest_client/models/models_ce/single_entity_version_create_request.py +++ b/tb_rest_client/models/models_ce/single_entity_version_create_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .version_create_request import VersionCreateRequest # noqa: F401,E501 +from tb_rest_client.models.models_ce.version_create_request import VersionCreateRequest # noqa: F401,E501 class SingleEntityVersionCreateRequest(VersionCreateRequest): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -66,7 +66,7 @@ def __init__(self, branch=None, config=None, entity_id=None, type=None, version_ self.type = type if version_name is not None: self.version_name = version_name - VersionCreateRequest.__init__(self, branch, type, version_name) + VersionCreateRequest.__init__(self, *args, **kwargs) @property def branch(self): diff --git a/tb_rest_client/models/models_ce/single_entity_version_load_request.py b/tb_rest_client/models/models_ce/single_entity_version_load_request.py index 4c7d1fa5..9284a792 100644 --- a/tb_rest_client/models/models_ce/single_entity_version_load_request.py +++ b/tb_rest_client/models/models_ce/single_entity_version_load_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .version_load_request import VersionLoadRequest # noqa: F401,E501 +from tb_rest_client.models.models_ce.version_load_request import VersionLoadRequest # noqa: F401,E501 class SingleEntityVersionLoadRequest(VersionLoadRequest): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -61,7 +61,7 @@ def __init__(self, config=None, external_entity_id=None, type=None, version_id=N self.type = type if version_id is not None: self.version_id = version_id - VersionLoadRequest.__init__(self, type, version_id) + VersionLoadRequest.__init__(self, *args, **kwargs) @property def config(self): diff --git a/tb_rest_client/models/models_ce/slack_conversation.py b/tb_rest_client/models/models_ce/slack_conversation.py new file mode 100644 index 00000000..a3846878 --- /dev/null +++ b/tb_rest_client/models/models_ce/slack_conversation.py @@ -0,0 +1,247 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SlackConversation(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'id': 'str', + 'name': 'str', + 'title': 'str', + 'type': 'str', + 'whole_name': 'str' + } + + attribute_map = { + 'email': 'email', + 'id': 'id', + 'name': 'name', + 'title': 'title', + 'type': 'type', + 'whole_name': 'wholeName' + } + + def __init__(self, email=None, id=None, name=None, title=None, type=None, whole_name=None): # noqa: E501 + """SlackConversation - a model defined in Swagger""" # noqa: E501 + self._email = None + self._id = None + self._name = None + self._title = None + self._type = None + self._whole_name = None + self.discriminator = None + if email is not None: + self.email = email + if id is not None: + self.id = id + if name is not None: + self.name = name + if title is not None: + self.title = title + self.type = type + if whole_name is not None: + self.whole_name = whole_name + + @property + def email(self): + """Gets the email of this SlackConversation. # noqa: E501 + + + :return: The email of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this SlackConversation. + + + :param email: The email of this SlackConversation. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def id(self): + """Gets the id of this SlackConversation. # noqa: E501 + + + :return: The id of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SlackConversation. + + + :param id: The id of this SlackConversation. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this SlackConversation. # noqa: E501 + + + :return: The name of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this SlackConversation. + + + :param name: The name of this SlackConversation. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def title(self): + """Gets the title of this SlackConversation. # noqa: E501 + + + :return: The title of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this SlackConversation. + + + :param title: The title of this SlackConversation. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def type(self): + """Gets the type of this SlackConversation. # noqa: E501 + + + :return: The type of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this SlackConversation. + + + :param type: The type of this SlackConversation. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["DIRECT", "PRIVATE_CHANNEL", "PUBLIC_CHANNEL"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def whole_name(self): + """Gets the whole_name of this SlackConversation. # noqa: E501 + + + :return: The whole_name of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._whole_name + + @whole_name.setter + def whole_name(self, whole_name): + """Sets the whole_name of this SlackConversation. + + + :param whole_name: The whole_name of this SlackConversation. # noqa: E501 + :type: str + """ + + self._whole_name = whole_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SlackConversation, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SlackConversation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/slack_delivery_method_notification_template.py b/tb_rest_client/models/models_ce/slack_delivery_method_notification_template.py new file mode 100644 index 00000000..b828a935 --- /dev/null +++ b/tb_rest_client/models/models_ce/slack_delivery_method_notification_template.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SlackDeliveryMethodNotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'enabled': 'bool' + } + + attribute_map = { + 'body': 'body', + 'enabled': 'enabled' + } + + def __init__(self, body=None, enabled=None): # noqa: E501 + """SlackDeliveryMethodNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._body = None + self._enabled = None + self.discriminator = None + if body is not None: + self.body = body + if enabled is not None: + self.enabled = enabled + + @property + def body(self): + """Gets the body of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The body of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SlackDeliveryMethodNotificationTemplate. + + + :param body: The body of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def enabled(self): + """Gets the enabled of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The enabled of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this SlackDeliveryMethodNotificationTemplate. + + + :param enabled: The enabled of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SlackDeliveryMethodNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SlackDeliveryMethodNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/slack_notification_delivery_method_config.py b/tb_rest_client/models/models_ce/slack_notification_delivery_method_config.py new file mode 100644 index 00000000..369cacb6 --- /dev/null +++ b/tb_rest_client/models/models_ce/slack_notification_delivery_method_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SlackNotificationDeliveryMethodConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'bot_token': 'str' + } + + attribute_map = { + 'bot_token': 'botToken' + } + + def __init__(self, bot_token=None): # noqa: E501 + """SlackNotificationDeliveryMethodConfig - a model defined in Swagger""" # noqa: E501 + self._bot_token = None + self.discriminator = None + if bot_token is not None: + self.bot_token = bot_token + + @property + def bot_token(self): + """Gets the bot_token of this SlackNotificationDeliveryMethodConfig. # noqa: E501 + + + :return: The bot_token of this SlackNotificationDeliveryMethodConfig. # noqa: E501 + :rtype: str + """ + return self._bot_token + + @bot_token.setter + def bot_token(self, bot_token): + """Sets the bot_token of this SlackNotificationDeliveryMethodConfig. + + + :param bot_token: The bot_token of this SlackNotificationDeliveryMethodConfig. # noqa: E501 + :type: str + """ + + self._bot_token = bot_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SlackNotificationDeliveryMethodConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SlackNotificationDeliveryMethodConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/slack_notification_target_config.py b/tb_rest_client/models/models_ce/slack_notification_target_config.py new file mode 100644 index 00000000..3075ec72 --- /dev/null +++ b/tb_rest_client/models/models_ce/slack_notification_target_config.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.notification_target_config import NotificationTargetConfig # noqa: F401,E501 + +class SlackNotificationTargetConfig(NotificationTargetConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'conversation': 'SlackConversation', + 'conversation_type': 'str', + 'description': 'str' + } + if hasattr(NotificationTargetConfig, "swagger_types"): + swagger_types.update(NotificationTargetConfig.swagger_types) + + attribute_map = { + 'conversation': 'conversation', + 'conversation_type': 'conversationType', + 'description': 'description' + } + if hasattr(NotificationTargetConfig, "attribute_map"): + attribute_map.update(NotificationTargetConfig.attribute_map) + + def __init__(self, conversation=None, conversation_type=None, description=None, *args, **kwargs): # noqa: E501 + """SlackNotificationTargetConfig - a model defined in Swagger""" # noqa: E501 + self._conversation = None + self._conversation_type = None + self._description = None + self.discriminator = None + self.conversation = conversation + if conversation_type is not None: + self.conversation_type = conversation_type + if description is not None: + self.description = description + NotificationTargetConfig.__init__(self, *args, **kwargs) + + @property + def conversation(self): + """Gets the conversation of this SlackNotificationTargetConfig. # noqa: E501 + + + :return: The conversation of this SlackNotificationTargetConfig. # noqa: E501 + :rtype: SlackConversation + """ + return self._conversation + + @conversation.setter + def conversation(self, conversation): + """Sets the conversation of this SlackNotificationTargetConfig. + + + :param conversation: The conversation of this SlackNotificationTargetConfig. # noqa: E501 + :type: SlackConversation + """ + if conversation is None: + raise ValueError("Invalid value for `conversation`, must not be `None`") # noqa: E501 + + self._conversation = conversation + + @property + def conversation_type(self): + """Gets the conversation_type of this SlackNotificationTargetConfig. # noqa: E501 + + + :return: The conversation_type of this SlackNotificationTargetConfig. # noqa: E501 + :rtype: str + """ + return self._conversation_type + + @conversation_type.setter + def conversation_type(self, conversation_type): + """Sets the conversation_type of this SlackNotificationTargetConfig. + + + :param conversation_type: The conversation_type of this SlackNotificationTargetConfig. # noqa: E501 + :type: str + """ + allowed_values = ["DIRECT", "PRIVATE_CHANNEL", "PUBLIC_CHANNEL"] # noqa: E501 + if conversation_type not in allowed_values: + raise ValueError( + "Invalid value for `conversation_type` ({0}), must be one of {1}" # noqa: E501 + .format(conversation_type, allowed_values) + ) + + self._conversation_type = conversation_type + + @property + def description(self): + """Gets the description of this SlackNotificationTargetConfig. # noqa: E501 + + + :return: The description of this SlackNotificationTargetConfig. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this SlackNotificationTargetConfig. + + + :param description: The description of this SlackNotificationTargetConfig. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SlackNotificationTargetConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SlackNotificationTargetConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/smpp_sms_provider_configuration.py b/tb_rest_client/models/models_ce/smpp_sms_provider_configuration.py index eb02117b..1f1f8b26 100644 --- a/tb_rest_client/models/models_ce/smpp_sms_provider_configuration.py +++ b/tb_rest_client/models/models_ce/smpp_sms_provider_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 class SmppSmsProviderConfiguration(SmsProviderConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/sms_delivery_method_notification_template.py b/tb_rest_client/models/models_ce/sms_delivery_method_notification_template.py new file mode 100644 index 00000000..66f420dc --- /dev/null +++ b/tb_rest_client/models/models_ce/sms_delivery_method_notification_template.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SmsDeliveryMethodNotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'enabled': 'bool' + } + + attribute_map = { + 'body': 'body', + 'enabled': 'enabled' + } + + def __init__(self, body=None, enabled=None): # noqa: E501 + """SmsDeliveryMethodNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._body = None + self._enabled = None + self.discriminator = None + if body is not None: + self.body = body + if enabled is not None: + self.enabled = enabled + + @property + def body(self): + """Gets the body of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The body of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SmsDeliveryMethodNotificationTemplate. + + + :param body: The body of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def enabled(self): + """Gets the enabled of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The enabled of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this SmsDeliveryMethodNotificationTemplate. + + + :param enabled: The enabled of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmsDeliveryMethodNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmsDeliveryMethodNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/sms_provider_configuration.py b/tb_rest_client/models/models_ce/sms_provider_configuration.py index dd0c9880..1946a097 100644 --- a/tb_rest_client/models/models_ce/sms_provider_configuration.py +++ b/tb_rest_client/models/models_ce/sms_provider_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SmsProviderConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/sms_two_fa_account_config.py b/tb_rest_client/models/models_ce/sms_two_fa_account_config.py index 5b628b56..52b24074 100644 --- a/tb_rest_client/models/models_ce/sms_two_fa_account_config.py +++ b/tb_rest_client/models/models_ce/sms_two_fa_account_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .two_fa_account_config import TwoFaAccountConfig # noqa: F401,E501 +from tb_rest_client.models.models_ce.two_fa_account_config import TwoFaAccountConfig # noqa: F401,E501 class SmsTwoFaAccountConfig(TwoFaAccountConfig): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/sms_two_fa_provider_config.py b/tb_rest_client/models/models_ce/sms_two_fa_provider_config.py index 5be09903..b14dbadf 100644 --- a/tb_rest_client/models/models_ce/sms_two_fa_provider_config.py +++ b/tb_rest_client/models/models_ce/sms_two_fa_provider_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SmsTwoFaProviderConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/snmp_communication_config.py b/tb_rest_client/models/models_ce/snmp_communication_config.py index ce559763..bdc99be1 100644 --- a/tb_rest_client/models/models_ce/snmp_communication_config.py +++ b/tb_rest_client/models/models_ce/snmp_communication_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SnmpCommunicationConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/snmp_device_profile_transport_configuration.py b/tb_rest_client/models/models_ce/snmp_device_profile_transport_configuration.py index fa525417..e922dd40 100644 --- a/tb_rest_client/models/models_ce/snmp_device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_ce/snmp_device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 class SnmpDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/snmp_device_transport_configuration.py b/tb_rest_client/models/models_ce/snmp_device_transport_configuration.py index 2c3ef498..7fd928ec 100644 --- a/tb_rest_client/models/models_ce/snmp_device_transport_configuration.py +++ b/tb_rest_client/models/models_ce/snmp_device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 class SnmpDeviceTransportConfiguration(DeviceTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/snmp_mapping.py b/tb_rest_client/models/models_ce/snmp_mapping.py index a56294ed..97269cd4 100644 --- a/tb_rest_client/models/models_ce/snmp_mapping.py +++ b/tb_rest_client/models/models_ce/snmp_mapping.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SnmpMapping(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/specific_time_schedule.py b/tb_rest_client/models/models_ce/specific_time_schedule.py index 85595b3e..11f0f38b 100644 --- a/tb_rest_client/models/models_ce/specific_time_schedule.py +++ b/tb_rest_client/models/models_ce/specific_time_schedule.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SpecificTimeSchedule(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/starred_dashboard_info.py b/tb_rest_client/models/models_ce/starred_dashboard_info.py new file mode 100644 index 00000000..e2d7327c --- /dev/null +++ b/tb_rest_client/models/models_ce/starred_dashboard_info.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class StarredDashboardInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'title': 'str', + 'starred_at': 'int' + } + + attribute_map = { + 'id': 'id', + 'title': 'title', + 'starred_at': 'starredAt' + } + + def __init__(self, id=None, title=None, starred_at=None): # noqa: E501 + """StarredDashboardInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._title = None + self._starred_at = None + self.discriminator = None + if id is not None: + self.id = id + if title is not None: + self.title = title + if starred_at is not None: + self.starred_at = starred_at + + @property + def id(self): + """Gets the id of this StarredDashboardInfo. # noqa: E501 + + JSON object with Dashboard id. # noqa: E501 + + :return: The id of this StarredDashboardInfo. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this StarredDashboardInfo. + + JSON object with Dashboard id. # noqa: E501 + + :param id: The id of this StarredDashboardInfo. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def title(self): + """Gets the title of this StarredDashboardInfo. # noqa: E501 + + Title of the dashboard. # noqa: E501 + + :return: The title of this StarredDashboardInfo. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this StarredDashboardInfo. + + Title of the dashboard. # noqa: E501 + + :param title: The title of this StarredDashboardInfo. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def starred_at(self): + """Gets the starred_at of this StarredDashboardInfo. # noqa: E501 + + Starred timestamp # noqa: E501 + + :return: The starred_at of this StarredDashboardInfo. # noqa: E501 + :rtype: int + """ + return self._starred_at + + @starred_at.setter + def starred_at(self, starred_at): + """Sets the starred_at of this StarredDashboardInfo. + + Starred timestamp # noqa: E501 + + :param starred_at: The starred_at of this StarredDashboardInfo. # noqa: E501 + :type: int + """ + + self._starred_at = starred_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(StarredDashboardInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StarredDashboardInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/statistics_event_filter.py b/tb_rest_client/models/models_ce/statistics_event_filter.py index bfba32b8..0a18d5e4 100644 --- a/tb_rest_client/models/models_ce/statistics_event_filter.py +++ b/tb_rest_client/models/models_ce/statistics_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .event_filter import EventFilter # noqa: F401,E501 +from tb_rest_client.models.models_ce.event_filter import EventFilter # noqa: F401,E501 class StatisticsEventFilter(EventFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -29,39 +29,75 @@ class StatisticsEventFilter(EventFilter): and the value is json key in definition. """ swagger_types = { + 'not_empty': 'bool', 'event_type': 'str', 'server': 'str', - 'messages_processed': 'int', - 'errors_occurred': 'int' + 'min_messages_processed': 'int', + 'max_messages_processed': 'int', + 'min_errors_occurred': 'int', + 'max_errors_occurred': 'int' } if hasattr(EventFilter, "swagger_types"): swagger_types.update(EventFilter.swagger_types) attribute_map = { + 'not_empty': 'notEmpty', 'event_type': 'eventType', 'server': 'server', - 'messages_processed': 'messagesProcessed', - 'errors_occurred': 'errorsOccurred' + 'min_messages_processed': 'minMessagesProcessed', + 'max_messages_processed': 'maxMessagesProcessed', + 'min_errors_occurred': 'minErrorsOccurred', + 'max_errors_occurred': 'maxErrorsOccurred' } if hasattr(EventFilter, "attribute_map"): attribute_map.update(EventFilter.attribute_map) - def __init__(self, event_type=None, server=None, messages_processed=None, errors_occurred=None, *args, **kwargs): # noqa: E501 + def __init__(self, not_empty=None, event_type=None, server=None, min_messages_processed=None, max_messages_processed=None, min_errors_occurred=None, max_errors_occurred=None, *args, **kwargs): # noqa: E501 """StatisticsEventFilter - a model defined in Swagger""" # noqa: E501 + self._not_empty = None self._event_type = None self._server = None - self._messages_processed = None - self._errors_occurred = None + self._min_messages_processed = None + self._max_messages_processed = None + self._min_errors_occurred = None + self._max_errors_occurred = None self.discriminator = None + if not_empty is not None: + self.not_empty = not_empty self.event_type = event_type if server is not None: self.server = server - if messages_processed is not None: - self.messages_processed = messages_processed - if errors_occurred is not None: - self.errors_occurred = errors_occurred + if min_messages_processed is not None: + self.min_messages_processed = min_messages_processed + if max_messages_processed is not None: + self.max_messages_processed = max_messages_processed + if min_errors_occurred is not None: + self.min_errors_occurred = min_errors_occurred + if max_errors_occurred is not None: + self.max_errors_occurred = max_errors_occurred EventFilter.__init__(self, *args, **kwargs) + @property + def not_empty(self): + """Gets the not_empty of this StatisticsEventFilter. # noqa: E501 + + + :return: The not_empty of this StatisticsEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this StatisticsEventFilter. + + + :param not_empty: The not_empty of this StatisticsEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + @property def event_type(self): """Gets the event_type of this StatisticsEventFilter. # noqa: E501 @@ -117,50 +153,96 @@ def server(self, server): self._server = server @property - def messages_processed(self): - """Gets the messages_processed of this StatisticsEventFilter. # noqa: E501 + def min_messages_processed(self): + """Gets the min_messages_processed of this StatisticsEventFilter. # noqa: E501 The minimum number of successfully processed messages # noqa: E501 - :return: The messages_processed of this StatisticsEventFilter. # noqa: E501 + :return: The min_messages_processed of this StatisticsEventFilter. # noqa: E501 :rtype: int """ - return self._messages_processed + return self._min_messages_processed - @messages_processed.setter - def messages_processed(self, messages_processed): - """Sets the messages_processed of this StatisticsEventFilter. + @min_messages_processed.setter + def min_messages_processed(self, min_messages_processed): + """Sets the min_messages_processed of this StatisticsEventFilter. The minimum number of successfully processed messages # noqa: E501 - :param messages_processed: The messages_processed of this StatisticsEventFilter. # noqa: E501 + :param min_messages_processed: The min_messages_processed of this StatisticsEventFilter. # noqa: E501 :type: int """ - self._messages_processed = messages_processed + self._min_messages_processed = min_messages_processed @property - def errors_occurred(self): - """Gets the errors_occurred of this StatisticsEventFilter. # noqa: E501 + def max_messages_processed(self): + """Gets the max_messages_processed of this StatisticsEventFilter. # noqa: E501 + + The maximum number of successfully processed messages # noqa: E501 + + :return: The max_messages_processed of this StatisticsEventFilter. # noqa: E501 + :rtype: int + """ + return self._max_messages_processed + + @max_messages_processed.setter + def max_messages_processed(self, max_messages_processed): + """Sets the max_messages_processed of this StatisticsEventFilter. + + The maximum number of successfully processed messages # noqa: E501 + + :param max_messages_processed: The max_messages_processed of this StatisticsEventFilter. # noqa: E501 + :type: int + """ + + self._max_messages_processed = max_messages_processed + + @property + def min_errors_occurred(self): + """Gets the min_errors_occurred of this StatisticsEventFilter. # noqa: E501 The minimum number of errors occurred during messages processing # noqa: E501 - :return: The errors_occurred of this StatisticsEventFilter. # noqa: E501 + :return: The min_errors_occurred of this StatisticsEventFilter. # noqa: E501 :rtype: int """ - return self._errors_occurred + return self._min_errors_occurred - @errors_occurred.setter - def errors_occurred(self, errors_occurred): - """Sets the errors_occurred of this StatisticsEventFilter. + @min_errors_occurred.setter + def min_errors_occurred(self, min_errors_occurred): + """Sets the min_errors_occurred of this StatisticsEventFilter. The minimum number of errors occurred during messages processing # noqa: E501 - :param errors_occurred: The errors_occurred of this StatisticsEventFilter. # noqa: E501 + :param min_errors_occurred: The min_errors_occurred of this StatisticsEventFilter. # noqa: E501 + :type: int + """ + + self._min_errors_occurred = min_errors_occurred + + @property + def max_errors_occurred(self): + """Gets the max_errors_occurred of this StatisticsEventFilter. # noqa: E501 + + The maximum number of errors occurred during messages processing # noqa: E501 + + :return: The max_errors_occurred of this StatisticsEventFilter. # noqa: E501 + :rtype: int + """ + return self._max_errors_occurred + + @max_errors_occurred.setter + def max_errors_occurred(self, max_errors_occurred): + """Sets the max_errors_occurred of this StatisticsEventFilter. + + The maximum number of errors occurred during messages processing # noqa: E501 + + :param max_errors_occurred: The max_errors_occurred of this StatisticsEventFilter. # noqa: E501 :type: int """ - self._errors_occurred = errors_occurred + self._max_errors_occurred = max_errors_occurred def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_ce/string_filter_predicate.py b/tb_rest_client/models/models_ce/string_filter_predicate.py index 9fe18961..41b305a3 100644 --- a/tb_rest_client/models/models_ce/string_filter_predicate.py +++ b/tb_rest_client/models/models_ce/string_filter_predicate.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 +from tb_rest_client.models.models_ce.key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 class StringFilterPredicate(KeyFilterPredicate): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/submit_strategy.py b/tb_rest_client/models/models_ce/submit_strategy.py index d9308baa..82635e0e 100644 --- a/tb_rest_client/models/models_ce/submit_strategy.py +++ b/tb_rest_client/models/models_ce/submit_strategy.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SubmitStrategy(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/system_administrators_filter.py b/tb_rest_client/models/models_ce/system_administrators_filter.py new file mode 100644 index 00000000..1afc9d1a --- /dev/null +++ b/tb_rest_client/models/models_ce/system_administrators_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SystemAdministratorsFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """SystemAdministratorsFilter - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SystemAdministratorsFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemAdministratorsFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/system_info.py b/tb_rest_client/models/models_ce/system_info.py new file mode 100644 index 00000000..945dfae3 --- /dev/null +++ b/tb_rest_client/models/models_ce/system_info.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SystemInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'monolith': 'bool', + 'system_data': 'list[SystemInfoData]' + } + + attribute_map = { + 'monolith': 'monolith', + 'system_data': 'systemData' + } + + def __init__(self, monolith=None, system_data=None): # noqa: E501 + """SystemInfo - a model defined in Swagger""" # noqa: E501 + self._monolith = None + self._system_data = None + self.discriminator = None + if monolith is not None: + self.monolith = monolith + if system_data is not None: + self.system_data = system_data + + @property + def monolith(self): + """Gets the monolith of this SystemInfo. # noqa: E501 + + + :return: The monolith of this SystemInfo. # noqa: E501 + :rtype: bool + """ + return self._monolith + + @monolith.setter + def monolith(self, monolith): + """Sets the monolith of this SystemInfo. + + + :param monolith: The monolith of this SystemInfo. # noqa: E501 + :type: bool + """ + + self._monolith = monolith + + @property + def system_data(self): + """Gets the system_data of this SystemInfo. # noqa: E501 + + System data. # noqa: E501 + + :return: The system_data of this SystemInfo. # noqa: E501 + :rtype: list[SystemInfoData] + """ + return self._system_data + + @system_data.setter + def system_data(self, system_data): + """Sets the system_data of this SystemInfo. + + System data. # noqa: E501 + + :param system_data: The system_data of this SystemInfo. # noqa: E501 + :type: list[SystemInfoData] + """ + + self._system_data = system_data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SystemInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/system_info_data.py b/tb_rest_client/models/models_ce/system_info_data.py new file mode 100644 index 00000000..699df470 --- /dev/null +++ b/tb_rest_client/models/models_ce/system_info_data.py @@ -0,0 +1,308 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SystemInfoData(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'service_id': 'str', + 'service_type': 'str', + 'cpu_usage': 'int', + 'cpu_count': 'int', + 'memory_usage': 'int', + 'total_memory': 'int', + 'disc_usage': 'int', + 'total_disc_space': 'int' + } + + attribute_map = { + 'service_id': 'serviceId', + 'service_type': 'serviceType', + 'cpu_usage': 'cpuUsage', + 'cpu_count': 'cpuCount', + 'memory_usage': 'memoryUsage', + 'total_memory': 'totalMemory', + 'disc_usage': 'discUsage', + 'total_disc_space': 'totalDiscSpace' + } + + def __init__(self, service_id=None, service_type=None, cpu_usage=None, cpu_count=None, memory_usage=None, total_memory=None, disc_usage=None, total_disc_space=None): # noqa: E501 + """SystemInfoData - a model defined in Swagger""" # noqa: E501 + self._service_id = None + self._service_type = None + self._cpu_usage = None + self._cpu_count = None + self._memory_usage = None + self._total_memory = None + self._disc_usage = None + self._total_disc_space = None + self.discriminator = None + if service_id is not None: + self.service_id = service_id + if service_type is not None: + self.service_type = service_type + if cpu_usage is not None: + self.cpu_usage = cpu_usage + if cpu_count is not None: + self.cpu_count = cpu_count + if memory_usage is not None: + self.memory_usage = memory_usage + if total_memory is not None: + self.total_memory = total_memory + if disc_usage is not None: + self.disc_usage = disc_usage + if total_disc_space is not None: + self.total_disc_space = total_disc_space + + @property + def service_id(self): + """Gets the service_id of this SystemInfoData. # noqa: E501 + + Service Id. # noqa: E501 + + :return: The service_id of this SystemInfoData. # noqa: E501 + :rtype: str + """ + return self._service_id + + @service_id.setter + def service_id(self, service_id): + """Sets the service_id of this SystemInfoData. + + Service Id. # noqa: E501 + + :param service_id: The service_id of this SystemInfoData. # noqa: E501 + :type: str + """ + + self._service_id = service_id + + @property + def service_type(self): + """Gets the service_type of this SystemInfoData. # noqa: E501 + + Service type. # noqa: E501 + + :return: The service_type of this SystemInfoData. # noqa: E501 + :rtype: str + """ + return self._service_type + + @service_type.setter + def service_type(self, service_type): + """Sets the service_type of this SystemInfoData. + + Service type. # noqa: E501 + + :param service_type: The service_type of this SystemInfoData. # noqa: E501 + :type: str + """ + + self._service_type = service_type + + @property + def cpu_usage(self): + """Gets the cpu_usage of this SystemInfoData. # noqa: E501 + + CPU usage, in percent. # noqa: E501 + + :return: The cpu_usage of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._cpu_usage + + @cpu_usage.setter + def cpu_usage(self, cpu_usage): + """Sets the cpu_usage of this SystemInfoData. + + CPU usage, in percent. # noqa: E501 + + :param cpu_usage: The cpu_usage of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._cpu_usage = cpu_usage + + @property + def cpu_count(self): + """Gets the cpu_count of this SystemInfoData. # noqa: E501 + + Total CPU usage. # noqa: E501 + + :return: The cpu_count of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._cpu_count + + @cpu_count.setter + def cpu_count(self, cpu_count): + """Sets the cpu_count of this SystemInfoData. + + Total CPU usage. # noqa: E501 + + :param cpu_count: The cpu_count of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._cpu_count = cpu_count + + @property + def memory_usage(self): + """Gets the memory_usage of this SystemInfoData. # noqa: E501 + + Memory usage, in percent. # noqa: E501 + + :return: The memory_usage of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._memory_usage + + @memory_usage.setter + def memory_usage(self, memory_usage): + """Sets the memory_usage of this SystemInfoData. + + Memory usage, in percent. # noqa: E501 + + :param memory_usage: The memory_usage of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._memory_usage = memory_usage + + @property + def total_memory(self): + """Gets the total_memory of this SystemInfoData. # noqa: E501 + + Total memory in bytes. # noqa: E501 + + :return: The total_memory of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._total_memory + + @total_memory.setter + def total_memory(self, total_memory): + """Sets the total_memory of this SystemInfoData. + + Total memory in bytes. # noqa: E501 + + :param total_memory: The total_memory of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._total_memory = total_memory + + @property + def disc_usage(self): + """Gets the disc_usage of this SystemInfoData. # noqa: E501 + + Disk usage, in percent. # noqa: E501 + + :return: The disc_usage of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._disc_usage + + @disc_usage.setter + def disc_usage(self, disc_usage): + """Sets the disc_usage of this SystemInfoData. + + Disk usage, in percent. # noqa: E501 + + :param disc_usage: The disc_usage of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._disc_usage = disc_usage + + @property + def total_disc_space(self): + """Gets the total_disc_space of this SystemInfoData. # noqa: E501 + + Total disc space in bytes. # noqa: E501 + + :return: The total_disc_space of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._total_disc_space + + @total_disc_space.setter + def total_disc_space(self, total_disc_space): + """Sets the total_disc_space of this SystemInfoData. + + Total disc space in bytes. # noqa: E501 + + :param total_disc_space: The total_disc_space of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._total_disc_space = total_disc_space + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SystemInfoData, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemInfoData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/tb_resource.py b/tb_rest_client/models/models_ce/tb_resource.py index 076661ff..b699eb61 100644 --- a/tb_rest_client/models/models_ce/tb_resource.py +++ b/tb_rest_client/models/models_ce/tb_resource.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TbResource(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/tb_resource_id.py b/tb_rest_client/models/models_ce/tb_resource_id.py index f9d5063d..38c0a9c3 100644 --- a/tb_rest_client/models/models_ce/tb_resource_id.py +++ b/tb_rest_client/models/models_ce/tb_resource_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TbResourceId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/tb_resource_info.py b/tb_rest_client/models/models_ce/tb_resource_info.py index 6a834ab0..7e1c4e4b 100644 --- a/tb_rest_client/models/models_ce/tb_resource_info.py +++ b/tb_rest_client/models/models_ce/tb_resource_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TbResourceInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/telemetry_entity_view.py b/tb_rest_client/models/models_ce/telemetry_entity_view.py index 955fc6d0..28a8c442 100644 --- a/tb_rest_client/models/models_ce/telemetry_entity_view.py +++ b/tb_rest_client/models/models_ce/telemetry_entity_view.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TelemetryEntityView(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/telemetry_mapping_configuration.py b/tb_rest_client/models/models_ce/telemetry_mapping_configuration.py index 3bf3c11c..dc428ff7 100644 --- a/tb_rest_client/models/models_ce/telemetry_mapping_configuration.py +++ b/tb_rest_client/models/models_ce/telemetry_mapping_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TelemetryMappingConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/telemetry_querying_snmp_communication_config.py b/tb_rest_client/models/models_ce/telemetry_querying_snmp_communication_config.py index 7c0f988b..f84f6b2a 100644 --- a/tb_rest_client/models/models_ce/telemetry_querying_snmp_communication_config.py +++ b/tb_rest_client/models/models_ce/telemetry_querying_snmp_communication_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .snmp_communication_config import SnmpCommunicationConfig # noqa: F401,E501 +from tb_rest_client.models.models_ce.snmp_communication_config import SnmpCommunicationConfig # noqa: F401,E501 class TelemetryQueryingSnmpCommunicationConfig(SnmpCommunicationConfig): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/tenant.py b/tb_rest_client/models/models_ce/tenant.py index 75c8f6e8..6ad23a08 100644 --- a/tb_rest_client/models/models_ce/tenant.py +++ b/tb_rest_client/models/models_ce/tenant.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Tenant(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -167,8 +167,6 @@ def title(self, title): :param title: The title of this Tenant. # noqa: E501 :type: str """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 self._title = title @@ -422,6 +420,8 @@ def email(self, email): :param email: The email of this Tenant. # noqa: E501 :type: str """ + if email is None: + raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 self._email = email diff --git a/tb_rest_client/models/models_ce/tenant_administrators_filter.py b/tb_rest_client/models/models_ce/tenant_administrators_filter.py new file mode 100644 index 00000000..b42eaffc --- /dev/null +++ b/tb_rest_client/models/models_ce/tenant_administrators_filter.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.users_filter import UsersFilter # noqa: F401,E501 + +class TenantAdministratorsFilter(UsersFilter): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'tenant_profiles_ids': 'list[str]', + 'tenants_ids': 'list[str]' + } + if hasattr(UsersFilter, "swagger_types"): + swagger_types.update(UsersFilter.swagger_types) + + attribute_map = { + 'tenant_profiles_ids': 'tenantProfilesIds', + 'tenants_ids': 'tenantsIds' + } + if hasattr(UsersFilter, "attribute_map"): + attribute_map.update(UsersFilter.attribute_map) + + def __init__(self, tenant_profiles_ids=None, tenants_ids=None, *args, **kwargs): # noqa: E501 + """TenantAdministratorsFilter - a model defined in Swagger""" # noqa: E501 + self._tenant_profiles_ids = None + self._tenants_ids = None + self.discriminator = None + if tenant_profiles_ids is not None: + self.tenant_profiles_ids = tenant_profiles_ids + if tenants_ids is not None: + self.tenants_ids = tenants_ids + UsersFilter.__init__(self, *args, **kwargs) + + @property + def tenant_profiles_ids(self): + """Gets the tenant_profiles_ids of this TenantAdministratorsFilter. # noqa: E501 + + + :return: The tenant_profiles_ids of this TenantAdministratorsFilter. # noqa: E501 + :rtype: list[str] + """ + return self._tenant_profiles_ids + + @tenant_profiles_ids.setter + def tenant_profiles_ids(self, tenant_profiles_ids): + """Sets the tenant_profiles_ids of this TenantAdministratorsFilter. + + + :param tenant_profiles_ids: The tenant_profiles_ids of this TenantAdministratorsFilter. # noqa: E501 + :type: list[str] + """ + + self._tenant_profiles_ids = tenant_profiles_ids + + @property + def tenants_ids(self): + """Gets the tenants_ids of this TenantAdministratorsFilter. # noqa: E501 + + + :return: The tenants_ids of this TenantAdministratorsFilter. # noqa: E501 + :rtype: list[str] + """ + return self._tenants_ids + + @tenants_ids.setter + def tenants_ids(self, tenants_ids): + """Sets the tenants_ids of this TenantAdministratorsFilter. + + + :param tenants_ids: The tenants_ids of this TenantAdministratorsFilter. # noqa: E501 + :type: list[str] + """ + + self._tenants_ids = tenants_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TenantAdministratorsFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TenantAdministratorsFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/tenant_id.py b/tb_rest_client/models/models_ce/tenant_id.py index f2f6dc54..bee5893a 100644 --- a/tb_rest_client/models/models_ce/tenant_id.py +++ b/tb_rest_client/models/models_ce/tenant_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/tenant_info.py b/tb_rest_client/models/models_ce/tenant_info.py index 13b5e05f..da1d433f 100644 --- a/tb_rest_client/models/models_ce/tenant_info.py +++ b/tb_rest_client/models/models_ce/tenant_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -264,8 +264,6 @@ def country(self, country): :param country: The country of this TenantInfo. # noqa: E501 :type: str """ - if country is None: - raise ValueError("Invalid value for `country`, must not be `None`") # noqa: E501 self._country = country @@ -289,8 +287,6 @@ def state(self, state): :param state: The state of this TenantInfo. # noqa: E501 :type: str """ - if state is None: - raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501 self._state = state @@ -314,8 +310,6 @@ def city(self, city): :param city: The city of this TenantInfo. # noqa: E501 :type: str """ - if city is None: - raise ValueError("Invalid value for `city`, must not be `None`") # noqa: E501 self._city = city @@ -339,8 +333,6 @@ def address(self, address): :param address: The address of this TenantInfo. # noqa: E501 :type: str """ - if address is None: - raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 self._address = address @@ -364,8 +356,6 @@ def address2(self, address2): :param address2: The address2 of this TenantInfo. # noqa: E501 :type: str """ - if address2 is None: - raise ValueError("Invalid value for `address2`, must not be `None`") # noqa: E501 self._address2 = address2 @@ -389,8 +379,6 @@ def zip(self, zip): :param zip: The zip of this TenantInfo. # noqa: E501 :type: str """ - if zip is None: - raise ValueError("Invalid value for `zip`, must not be `None`") # noqa: E501 self._zip = zip @@ -414,8 +402,6 @@ def phone(self, phone): :param phone: The phone of this TenantInfo. # noqa: E501 :type: str """ - if phone is None: - raise ValueError("Invalid value for `phone`, must not be `None`") # noqa: E501 self._phone = phone @@ -439,8 +425,6 @@ def email(self, email): :param email: The email of this TenantInfo. # noqa: E501 :type: str """ - if email is None: - raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 self._email = email diff --git a/tb_rest_client/models/models_ce/tenant_profile.py b/tb_rest_client/models/models_ce/tenant_profile.py index 19ff05db..2496070f 100644 --- a/tb_rest_client/models/models_ce/tenant_profile.py +++ b/tb_rest_client/models/models_ce/tenant_profile.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantProfile(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -33,7 +33,6 @@ class TenantProfile(object): 'created_time': 'int', 'name': 'str', 'description': 'str', - 'isolated_tb_core': 'bool', 'isolated_tb_rule_engine': 'bool', 'profile_data': 'TenantProfileData' } @@ -44,19 +43,17 @@ class TenantProfile(object): 'created_time': 'createdTime', 'name': 'name', 'description': 'description', - 'isolated_tb_core': 'isolatedTbCore', 'isolated_tb_rule_engine': 'isolatedTbRuleEngine', 'profile_data': 'profileData' } - def __init__(self, default=None, id=None, created_time=None, name=None, description=None, isolated_tb_core=None, isolated_tb_rule_engine=None, profile_data=None): # noqa: E501 + def __init__(self, default=None, id=None, created_time=None, name=None, description=None, isolated_tb_rule_engine=None, profile_data=None): # noqa: E501 """TenantProfile - a model defined in Swagger""" # noqa: E501 self._default = None self._id = None self._created_time = None self._name = None self._description = None - self._isolated_tb_core = None self._isolated_tb_rule_engine = None self._profile_data = None self.discriminator = None @@ -70,8 +67,6 @@ def __init__(self, default=None, id=None, created_time=None, name=None, descript self.name = name if description is not None: self.description = description - if isolated_tb_core is not None: - self.isolated_tb_core = isolated_tb_core if isolated_tb_rule_engine is not None: self.isolated_tb_rule_engine = isolated_tb_rule_engine if profile_data is not None: @@ -188,29 +183,6 @@ def description(self, description): self._description = description - @property - def isolated_tb_core(self): - """Gets the isolated_tb_core of this TenantProfile. # noqa: E501 - - If enabled, will push all messages related to this tenant and processed by core platform services into separate queue. Useful for complex microservices deployments, to isolate processing of the data for specific tenants # noqa: E501 - - :return: The isolated_tb_core of this TenantProfile. # noqa: E501 - :rtype: bool - """ - return self._isolated_tb_core - - @isolated_tb_core.setter - def isolated_tb_core(self, isolated_tb_core): - """Sets the isolated_tb_core of this TenantProfile. - - If enabled, will push all messages related to this tenant and processed by core platform services into separate queue. Useful for complex microservices deployments, to isolate processing of the data for specific tenants # noqa: E501 - - :param isolated_tb_core: The isolated_tb_core of this TenantProfile. # noqa: E501 - :type: bool - """ - - self._isolated_tb_core = isolated_tb_core - @property def isolated_tb_rule_engine(self): """Gets the isolated_tb_rule_engine of this TenantProfile. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/tenant_profile_configuration.py b/tb_rest_client/models/models_ce/tenant_profile_configuration.py index 879d2972..ba3bedab 100644 --- a/tb_rest_client/models/models_ce/tenant_profile_configuration.py +++ b/tb_rest_client/models/models_ce/tenant_profile_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantProfileConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/tenant_profile_data.py b/tb_rest_client/models/models_ce/tenant_profile_data.py index 4811f73f..6d13996e 100644 --- a/tb_rest_client/models/models_ce/tenant_profile_data.py +++ b/tb_rest_client/models/models_ce/tenant_profile_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantProfileData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/tenant_profile_id.py b/tb_rest_client/models/models_ce/tenant_profile_id.py index 2e24c358..4e175d21 100644 --- a/tb_rest_client/models/models_ce/tenant_profile_id.py +++ b/tb_rest_client/models/models_ce/tenant_profile_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantProfileId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/tenant_profile_queue_configuration.py b/tb_rest_client/models/models_ce/tenant_profile_queue_configuration.py index eab419c6..ac4dcb27 100644 --- a/tb_rest_client/models/models_ce/tenant_profile_queue_configuration.py +++ b/tb_rest_client/models/models_ce/tenant_profile_queue_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantProfileQueueConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/test_sms_request.py b/tb_rest_client/models/models_ce/test_sms_request.py index 9b1a8323..1b1b9646 100644 --- a/tb_rest_client/models/models_ce/test_sms_request.py +++ b/tb_rest_client/models/models_ce/test_sms_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TestSmsRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/thingsboard_credentials_expired_response.py b/tb_rest_client/models/models_ce/thingsboard_credentials_expired_response.py index 9d52d228..8683f59d 100644 --- a/tb_rest_client/models/models_ce/thingsboard_credentials_expired_response.py +++ b/tb_rest_client/models/models_ce/thingsboard_credentials_expired_response.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ThingsboardCredentialsExpiredResponse(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/thingsboard_error_response.py b/tb_rest_client/models/models_ce/thingsboard_error_response.py index c5005ed5..19590f7f 100644 --- a/tb_rest_client/models/models_ce/thingsboard_error_response.py +++ b/tb_rest_client/models/models_ce/thingsboard_error_response.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ThingsboardErrorResponse(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/to_device_rpc_request_snmp_communication_config.py b/tb_rest_client/models/models_ce/to_device_rpc_request_snmp_communication_config.py index b62a35ff..92cd0273 100644 --- a/tb_rest_client/models/models_ce/to_device_rpc_request_snmp_communication_config.py +++ b/tb_rest_client/models/models_ce/to_device_rpc_request_snmp_communication_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ToDeviceRpcRequestSnmpCommunicationConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/totp_two_fa_account_config.py b/tb_rest_client/models/models_ce/totp_two_fa_account_config.py index 94a186d8..aaa8e478 100644 --- a/tb_rest_client/models/models_ce/totp_two_fa_account_config.py +++ b/tb_rest_client/models/models_ce/totp_two_fa_account_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TotpTwoFaAccountConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/totp_two_fa_provider_config.py b/tb_rest_client/models/models_ce/totp_two_fa_provider_config.py index 14be3b7d..d22540c2 100644 --- a/tb_rest_client/models/models_ce/totp_two_fa_provider_config.py +++ b/tb_rest_client/models/models_ce/totp_two_fa_provider_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TotpTwoFaProviderConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/transport_payload_type_configuration.py b/tb_rest_client/models/models_ce/transport_payload_type_configuration.py index 4d9f18b3..9974579b 100644 --- a/tb_rest_client/models/models_ce/transport_payload_type_configuration.py +++ b/tb_rest_client/models/models_ce/transport_payload_type_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TransportPayloadTypeConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/ts_value.py b/tb_rest_client/models/models_ce/ts_value.py index 351b511f..428efaa7 100644 --- a/tb_rest_client/models/models_ce/ts_value.py +++ b/tb_rest_client/models/models_ce/ts_value.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TsValue(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,25 +28,51 @@ class TsValue(object): and the value is json key in definition. """ swagger_types = { + 'count': 'int', 'ts': 'int', 'value': 'str' } attribute_map = { + 'count': 'count', 'ts': 'ts', 'value': 'value' } - def __init__(self, ts=None, value=None): # noqa: E501 + def __init__(self, count=None, ts=None, value=None): # noqa: E501 """TsValue - a model defined in Swagger""" # noqa: E501 + self._count = None self._ts = None self._value = None self.discriminator = None + if count is not None: + self.count = count if ts is not None: self.ts = ts if value is not None: self.value = value + @property + def count(self): + """Gets the count of this TsValue. # noqa: E501 + + + :return: The count of this TsValue. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this TsValue. + + + :param count: The count of this TsValue. # noqa: E501 + :type: int + """ + + self._count = count + @property def ts(self): """Gets the ts of this TsValue. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/twilio_sms_provider_configuration.py b/tb_rest_client/models/models_ce/twilio_sms_provider_configuration.py index 3eac3325..27e2b604 100644 --- a/tb_rest_client/models/models_ce/twilio_sms_provider_configuration.py +++ b/tb_rest_client/models/models_ce/twilio_sms_provider_configuration.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_ce.sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 class TwilioSmsProviderConfiguration(SmsProviderConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_ce/two_fa_account_config.py b/tb_rest_client/models/models_ce/two_fa_account_config.py index 9cd0ad67..2ae85740 100644 --- a/tb_rest_client/models/models_ce/two_fa_account_config.py +++ b/tb_rest_client/models/models_ce/two_fa_account_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TwoFaAccountConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/two_fa_account_config_update_request.py b/tb_rest_client/models/models_ce/two_fa_account_config_update_request.py index c00f5a10..881f3027 100644 --- a/tb_rest_client/models/models_ce/two_fa_account_config_update_request.py +++ b/tb_rest_client/models/models_ce/two_fa_account_config_update_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TwoFaAccountConfigUpdateRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/two_fa_provider_config.py b/tb_rest_client/models/models_ce/two_fa_provider_config.py index 75ecaf53..de9e332e 100644 --- a/tb_rest_client/models/models_ce/two_fa_provider_config.py +++ b/tb_rest_client/models/models_ce/two_fa_provider_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TwoFaProviderConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/two_fa_provider_info.py b/tb_rest_client/models/models_ce/two_fa_provider_info.py index 1a260959..50d9fc50 100644 --- a/tb_rest_client/models/models_ce/two_fa_provider_info.py +++ b/tb_rest_client/models/models_ce/two_fa_provider_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TwoFaProviderInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/update_message.py b/tb_rest_client/models/models_ce/update_message.py index 59ce27d1..1e14471d 100644 --- a/tb_rest_client/models/models_ce/update_message.py +++ b/tb_rest_client/models/models_ce/update_message.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class UpdateMessage(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -29,28 +29,49 @@ class UpdateMessage(object): """ swagger_types = { 'update_available': 'bool', - 'message': 'str' + 'current_version': 'str', + 'latest_version': 'str', + 'upgrade_instructions_url': 'str', + 'current_version_release_notes_url': 'str', + 'latest_version_release_notes_url': 'str' } attribute_map = { 'update_available': 'updateAvailable', - 'message': 'message' + 'current_version': 'currentVersion', + 'latest_version': 'latestVersion', + 'upgrade_instructions_url': 'upgradeInstructionsUrl', + 'current_version_release_notes_url': 'currentVersionReleaseNotesUrl', + 'latest_version_release_notes_url': 'latestVersionReleaseNotesUrl' } - def __init__(self, update_available=None, message=None): # noqa: E501 + def __init__(self, update_available=None, current_version=None, latest_version=None, upgrade_instructions_url=None, current_version_release_notes_url=None, latest_version_release_notes_url=None): # noqa: E501 """UpdateMessage - a model defined in Swagger""" # noqa: E501 self._update_available = None - self._message = None + self._current_version = None + self._latest_version = None + self._upgrade_instructions_url = None + self._current_version_release_notes_url = None + self._latest_version_release_notes_url = None self.discriminator = None if update_available is not None: self.update_available = update_available - if message is not None: - self.message = message + if current_version is not None: + self.current_version = current_version + if latest_version is not None: + self.latest_version = latest_version + if upgrade_instructions_url is not None: + self.upgrade_instructions_url = upgrade_instructions_url + if current_version_release_notes_url is not None: + self.current_version_release_notes_url = current_version_release_notes_url + if latest_version_release_notes_url is not None: + self.latest_version_release_notes_url = latest_version_release_notes_url @property def update_available(self): """Gets the update_available of this UpdateMessage. # noqa: E501 + 'True' if new platform update is available. # noqa: E501 :return: The update_available of this UpdateMessage. # noqa: E501 :rtype: bool @@ -61,6 +82,7 @@ def update_available(self): def update_available(self, update_available): """Sets the update_available of this UpdateMessage. + 'True' if new platform update is available. # noqa: E501 :param update_available: The update_available of this UpdateMessage. # noqa: E501 :type: bool @@ -69,27 +91,119 @@ def update_available(self, update_available): self._update_available = update_available @property - def message(self): - """Gets the message of this UpdateMessage. # noqa: E501 + def current_version(self): + """Gets the current_version of this UpdateMessage. # noqa: E501 + + Current ThingsBoard version. # noqa: E501 + + :return: The current_version of this UpdateMessage. # noqa: E501 + :rtype: str + """ + return self._current_version + + @current_version.setter + def current_version(self, current_version): + """Sets the current_version of this UpdateMessage. + + Current ThingsBoard version. # noqa: E501 + + :param current_version: The current_version of this UpdateMessage. # noqa: E501 + :type: str + """ + + self._current_version = current_version + + @property + def latest_version(self): + """Gets the latest_version of this UpdateMessage. # noqa: E501 + + Latest ThingsBoard version. # noqa: E501 + + :return: The latest_version of this UpdateMessage. # noqa: E501 + :rtype: str + """ + return self._latest_version + + @latest_version.setter + def latest_version(self, latest_version): + """Sets the latest_version of this UpdateMessage. + + Latest ThingsBoard version. # noqa: E501 + + :param latest_version: The latest_version of this UpdateMessage. # noqa: E501 + :type: str + """ + + self._latest_version = latest_version + + @property + def upgrade_instructions_url(self): + """Gets the upgrade_instructions_url of this UpdateMessage. # noqa: E501 + + Upgrade instructions URL. # noqa: E501 + + :return: The upgrade_instructions_url of this UpdateMessage. # noqa: E501 + :rtype: str + """ + return self._upgrade_instructions_url + + @upgrade_instructions_url.setter + def upgrade_instructions_url(self, upgrade_instructions_url): + """Sets the upgrade_instructions_url of this UpdateMessage. + + Upgrade instructions URL. # noqa: E501 + + :param upgrade_instructions_url: The upgrade_instructions_url of this UpdateMessage. # noqa: E501 + :type: str + """ + + self._upgrade_instructions_url = upgrade_instructions_url + + @property + def current_version_release_notes_url(self): + """Gets the current_version_release_notes_url of this UpdateMessage. # noqa: E501 + + Current ThingsBoard version release notes URL. # noqa: E501 + + :return: The current_version_release_notes_url of this UpdateMessage. # noqa: E501 + :rtype: str + """ + return self._current_version_release_notes_url + + @current_version_release_notes_url.setter + def current_version_release_notes_url(self, current_version_release_notes_url): + """Sets the current_version_release_notes_url of this UpdateMessage. + + Current ThingsBoard version release notes URL. # noqa: E501 + + :param current_version_release_notes_url: The current_version_release_notes_url of this UpdateMessage. # noqa: E501 + :type: str + """ + + self._current_version_release_notes_url = current_version_release_notes_url + + @property + def latest_version_release_notes_url(self): + """Gets the latest_version_release_notes_url of this UpdateMessage. # noqa: E501 - The message about new platform update available. # noqa: E501 + Latest ThingsBoard version release notes URL. # noqa: E501 - :return: The message of this UpdateMessage. # noqa: E501 + :return: The latest_version_release_notes_url of this UpdateMessage. # noqa: E501 :rtype: str """ - return self._message + return self._latest_version_release_notes_url - @message.setter - def message(self, message): - """Sets the message of this UpdateMessage. + @latest_version_release_notes_url.setter + def latest_version_release_notes_url(self, latest_version_release_notes_url): + """Sets the latest_version_release_notes_url of this UpdateMessage. - The message about new platform update available. # noqa: E501 + Latest ThingsBoard version release notes URL. # noqa: E501 - :param message: The message of this UpdateMessage. # noqa: E501 + :param latest_version_release_notes_url: The latest_version_release_notes_url of this UpdateMessage. # noqa: E501 :type: str """ - self._message = message + self._latest_version_release_notes_url = latest_version_release_notes_url def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_ce/uri.py b/tb_rest_client/models/models_ce/uri.py deleted file mode 100644 index 6d849b2d..00000000 --- a/tb_rest_client/models/models_ce/uri.py +++ /dev/null @@ -1,526 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - For instructions how to authorize requests please visit REST API documentation page. # noqa: E501 - - OpenAPI spec version: 2.0 - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class URI(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'absolute': 'bool', - 'authority': 'str', - 'fragment': 'str', - 'host': 'str', - 'opaque': 'bool', - 'path': 'str', - 'port': 'int', - 'query': 'str', - 'raw_authority': 'str', - 'raw_fragment': 'str', - 'raw_path': 'str', - 'raw_query': 'str', - 'raw_scheme_specific_part': 'str', - 'raw_user_info': 'str', - 'scheme': 'str', - 'scheme_specific_part': 'str', - 'user_info': 'str' - } - - attribute_map = { - 'absolute': 'absolute', - 'authority': 'authority', - 'fragment': 'fragment', - 'host': 'host', - 'opaque': 'opaque', - 'path': 'path', - 'port': 'port', - 'query': 'query', - 'raw_authority': 'rawAuthority', - 'raw_fragment': 'rawFragment', - 'raw_path': 'rawPath', - 'raw_query': 'rawQuery', - 'raw_scheme_specific_part': 'rawSchemeSpecificPart', - 'raw_user_info': 'rawUserInfo', - 'scheme': 'scheme', - 'scheme_specific_part': 'schemeSpecificPart', - 'user_info': 'userInfo' - } - - def __init__(self, absolute=None, authority=None, fragment=None, host=None, opaque=None, path=None, port=None, query=None, raw_authority=None, raw_fragment=None, raw_path=None, raw_query=None, raw_scheme_specific_part=None, raw_user_info=None, scheme=None, scheme_specific_part=None, user_info=None): # noqa: E501 - """URI - a model defined in Swagger""" # noqa: E501 - self._absolute = None - self._authority = None - self._fragment = None - self._host = None - self._opaque = None - self._path = None - self._port = None - self._query = None - self._raw_authority = None - self._raw_fragment = None - self._raw_path = None - self._raw_query = None - self._raw_scheme_specific_part = None - self._raw_user_info = None - self._scheme = None - self._scheme_specific_part = None - self._user_info = None - self.discriminator = None - if absolute is not None: - self.absolute = absolute - if authority is not None: - self.authority = authority - if fragment is not None: - self.fragment = fragment - if host is not None: - self.host = host - if opaque is not None: - self.opaque = opaque - if path is not None: - self.path = path - if port is not None: - self.port = port - if query is not None: - self.query = query - if raw_authority is not None: - self.raw_authority = raw_authority - if raw_fragment is not None: - self.raw_fragment = raw_fragment - if raw_path is not None: - self.raw_path = raw_path - if raw_query is not None: - self.raw_query = raw_query - if raw_scheme_specific_part is not None: - self.raw_scheme_specific_part = raw_scheme_specific_part - if raw_user_info is not None: - self.raw_user_info = raw_user_info - if scheme is not None: - self.scheme = scheme - if scheme_specific_part is not None: - self.scheme_specific_part = scheme_specific_part - if user_info is not None: - self.user_info = user_info - - @property - def absolute(self): - """Gets the absolute of this URI. # noqa: E501 - - - :return: The absolute of this URI. # noqa: E501 - :rtype: bool - """ - return self._absolute - - @absolute.setter - def absolute(self, absolute): - """Sets the absolute of this URI. - - - :param absolute: The absolute of this URI. # noqa: E501 - :type: bool - """ - - self._absolute = absolute - - @property - def authority(self): - """Gets the authority of this URI. # noqa: E501 - - - :return: The authority of this URI. # noqa: E501 - :rtype: str - """ - return self._authority - - @authority.setter - def authority(self, authority): - """Sets the authority of this URI. - - - :param authority: The authority of this URI. # noqa: E501 - :type: str - """ - - self._authority = authority - - @property - def fragment(self): - """Gets the fragment of this URI. # noqa: E501 - - - :return: The fragment of this URI. # noqa: E501 - :rtype: str - """ - return self._fragment - - @fragment.setter - def fragment(self, fragment): - """Sets the fragment of this URI. - - - :param fragment: The fragment of this URI. # noqa: E501 - :type: str - """ - - self._fragment = fragment - - @property - def host(self): - """Gets the host of this URI. # noqa: E501 - - - :return: The host of this URI. # noqa: E501 - :rtype: str - """ - return self._host - - @host.setter - def host(self, host): - """Sets the host of this URI. - - - :param host: The host of this URI. # noqa: E501 - :type: str - """ - - self._host = host - - @property - def opaque(self): - """Gets the opaque of this URI. # noqa: E501 - - - :return: The opaque of this URI. # noqa: E501 - :rtype: bool - """ - return self._opaque - - @opaque.setter - def opaque(self, opaque): - """Sets the opaque of this URI. - - - :param opaque: The opaque of this URI. # noqa: E501 - :type: bool - """ - - self._opaque = opaque - - @property - def path(self): - """Gets the path of this URI. # noqa: E501 - - - :return: The path of this URI. # noqa: E501 - :rtype: str - """ - return self._path - - @path.setter - def path(self, path): - """Sets the path of this URI. - - - :param path: The path of this URI. # noqa: E501 - :type: str - """ - - self._path = path - - @property - def port(self): - """Gets the port of this URI. # noqa: E501 - - - :return: The port of this URI. # noqa: E501 - :rtype: int - """ - return self._port - - @port.setter - def port(self, port): - """Sets the port of this URI. - - - :param port: The port of this URI. # noqa: E501 - :type: int - """ - - self._port = port - - @property - def query(self): - """Gets the query of this URI. # noqa: E501 - - - :return: The query of this URI. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this URI. - - - :param query: The query of this URI. # noqa: E501 - :type: str - """ - - self._query = query - - @property - def raw_authority(self): - """Gets the raw_authority of this URI. # noqa: E501 - - - :return: The raw_authority of this URI. # noqa: E501 - :rtype: str - """ - return self._raw_authority - - @raw_authority.setter - def raw_authority(self, raw_authority): - """Sets the raw_authority of this URI. - - - :param raw_authority: The raw_authority of this URI. # noqa: E501 - :type: str - """ - - self._raw_authority = raw_authority - - @property - def raw_fragment(self): - """Gets the raw_fragment of this URI. # noqa: E501 - - - :return: The raw_fragment of this URI. # noqa: E501 - :rtype: str - """ - return self._raw_fragment - - @raw_fragment.setter - def raw_fragment(self, raw_fragment): - """Sets the raw_fragment of this URI. - - - :param raw_fragment: The raw_fragment of this URI. # noqa: E501 - :type: str - """ - - self._raw_fragment = raw_fragment - - @property - def raw_path(self): - """Gets the raw_path of this URI. # noqa: E501 - - - :return: The raw_path of this URI. # noqa: E501 - :rtype: str - """ - return self._raw_path - - @raw_path.setter - def raw_path(self, raw_path): - """Sets the raw_path of this URI. - - - :param raw_path: The raw_path of this URI. # noqa: E501 - :type: str - """ - - self._raw_path = raw_path - - @property - def raw_query(self): - """Gets the raw_query of this URI. # noqa: E501 - - - :return: The raw_query of this URI. # noqa: E501 - :rtype: str - """ - return self._raw_query - - @raw_query.setter - def raw_query(self, raw_query): - """Sets the raw_query of this URI. - - - :param raw_query: The raw_query of this URI. # noqa: E501 - :type: str - """ - - self._raw_query = raw_query - - @property - def raw_scheme_specific_part(self): - """Gets the raw_scheme_specific_part of this URI. # noqa: E501 - - - :return: The raw_scheme_specific_part of this URI. # noqa: E501 - :rtype: str - """ - return self._raw_scheme_specific_part - - @raw_scheme_specific_part.setter - def raw_scheme_specific_part(self, raw_scheme_specific_part): - """Sets the raw_scheme_specific_part of this URI. - - - :param raw_scheme_specific_part: The raw_scheme_specific_part of this URI. # noqa: E501 - :type: str - """ - - self._raw_scheme_specific_part = raw_scheme_specific_part - - @property - def raw_user_info(self): - """Gets the raw_user_info of this URI. # noqa: E501 - - - :return: The raw_user_info of this URI. # noqa: E501 - :rtype: str - """ - return self._raw_user_info - - @raw_user_info.setter - def raw_user_info(self, raw_user_info): - """Sets the raw_user_info of this URI. - - - :param raw_user_info: The raw_user_info of this URI. # noqa: E501 - :type: str - """ - - self._raw_user_info = raw_user_info - - @property - def scheme(self): - """Gets the scheme of this URI. # noqa: E501 - - - :return: The scheme of this URI. # noqa: E501 - :rtype: str - """ - return self._scheme - - @scheme.setter - def scheme(self, scheme): - """Sets the scheme of this URI. - - - :param scheme: The scheme of this URI. # noqa: E501 - :type: str - """ - - self._scheme = scheme - - @property - def scheme_specific_part(self): - """Gets the scheme_specific_part of this URI. # noqa: E501 - - - :return: The scheme_specific_part of this URI. # noqa: E501 - :rtype: str - """ - return self._scheme_specific_part - - @scheme_specific_part.setter - def scheme_specific_part(self, scheme_specific_part): - """Sets the scheme_specific_part of this URI. - - - :param scheme_specific_part: The scheme_specific_part of this URI. # noqa: E501 - :type: str - """ - - self._scheme_specific_part = scheme_specific_part - - @property - def user_info(self): - """Gets the user_info of this URI. # noqa: E501 - - - :return: The user_info of this URI. # noqa: E501 - :rtype: str - """ - return self._user_info - - @user_info.setter - def user_info(self, user_info): - """Sets the user_info of this URI. - - - :param user_info: The user_info of this URI. # noqa: E501 - :type: str - """ - - self._user_info = user_info - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(URI, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, URI): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_ce/url.py b/tb_rest_client/models/models_ce/url.py deleted file mode 100644 index ae7a8ac5..00000000 --- a/tb_rest_client/models/models_ce/url.py +++ /dev/null @@ -1,370 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - For instructions how to authorize requests please visit REST API documentation page. # noqa: E501 - - OpenAPI spec version: 2.0 - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class URL(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'authority': 'str', - 'content': 'object', - 'default_port': 'int', - 'file': 'str', - 'host': 'str', - 'path': 'str', - 'port': 'int', - 'protocol': 'str', - 'query': 'str', - 'ref': 'str', - 'user_info': 'str' - } - - attribute_map = { - 'authority': 'authority', - 'content': 'content', - 'default_port': 'defaultPort', - 'file': 'file', - 'host': 'host', - 'path': 'path', - 'port': 'port', - 'protocol': 'protocol', - 'query': 'query', - 'ref': 'ref', - 'user_info': 'userInfo' - } - - def __init__(self, authority=None, content=None, default_port=None, file=None, host=None, path=None, port=None, protocol=None, query=None, ref=None, user_info=None): # noqa: E501 - """URL - a model defined in Swagger""" # noqa: E501 - self._authority = None - self._content = None - self._default_port = None - self._file = None - self._host = None - self._path = None - self._port = None - self._protocol = None - self._query = None - self._ref = None - self._user_info = None - self.discriminator = None - if authority is not None: - self.authority = authority - if content is not None: - self.content = content - if default_port is not None: - self.default_port = default_port - if file is not None: - self.file = file - if host is not None: - self.host = host - if path is not None: - self.path = path - if port is not None: - self.port = port - if protocol is not None: - self.protocol = protocol - if query is not None: - self.query = query - if ref is not None: - self.ref = ref - if user_info is not None: - self.user_info = user_info - - @property - def authority(self): - """Gets the authority of this URL. # noqa: E501 - - - :return: The authority of this URL. # noqa: E501 - :rtype: str - """ - return self._authority - - @authority.setter - def authority(self, authority): - """Sets the authority of this URL. - - - :param authority: The authority of this URL. # noqa: E501 - :type: str - """ - - self._authority = authority - - @property - def content(self): - """Gets the content of this URL. # noqa: E501 - - - :return: The content of this URL. # noqa: E501 - :rtype: object - """ - return self._content - - @content.setter - def content(self, content): - """Sets the content of this URL. - - - :param content: The content of this URL. # noqa: E501 - :type: object - """ - - self._content = content - - @property - def default_port(self): - """Gets the default_port of this URL. # noqa: E501 - - - :return: The default_port of this URL. # noqa: E501 - :rtype: int - """ - return self._default_port - - @default_port.setter - def default_port(self, default_port): - """Sets the default_port of this URL. - - - :param default_port: The default_port of this URL. # noqa: E501 - :type: int - """ - - self._default_port = default_port - - @property - def file(self): - """Gets the file of this URL. # noqa: E501 - - - :return: The file of this URL. # noqa: E501 - :rtype: str - """ - return self._file - - @file.setter - def file(self, file): - """Sets the file of this URL. - - - :param file: The file of this URL. # noqa: E501 - :type: str - """ - - self._file = file - - @property - def host(self): - """Gets the host of this URL. # noqa: E501 - - - :return: The host of this URL. # noqa: E501 - :rtype: str - """ - return self._host - - @host.setter - def host(self, host): - """Sets the host of this URL. - - - :param host: The host of this URL. # noqa: E501 - :type: str - """ - - self._host = host - - @property - def path(self): - """Gets the path of this URL. # noqa: E501 - - - :return: The path of this URL. # noqa: E501 - :rtype: str - """ - return self._path - - @path.setter - def path(self, path): - """Sets the path of this URL. - - - :param path: The path of this URL. # noqa: E501 - :type: str - """ - - self._path = path - - @property - def port(self): - """Gets the port of this URL. # noqa: E501 - - - :return: The port of this URL. # noqa: E501 - :rtype: int - """ - return self._port - - @port.setter - def port(self, port): - """Sets the port of this URL. - - - :param port: The port of this URL. # noqa: E501 - :type: int - """ - - self._port = port - - @property - def protocol(self): - """Gets the protocol of this URL. # noqa: E501 - - - :return: The protocol of this URL. # noqa: E501 - :rtype: str - """ - return self._protocol - - @protocol.setter - def protocol(self, protocol): - """Sets the protocol of this URL. - - - :param protocol: The protocol of this URL. # noqa: E501 - :type: str - """ - - self._protocol = protocol - - @property - def query(self): - """Gets the query of this URL. # noqa: E501 - - - :return: The query of this URL. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this URL. - - - :param query: The query of this URL. # noqa: E501 - :type: str - """ - - self._query = query - - @property - def ref(self): - """Gets the ref of this URL. # noqa: E501 - - - :return: The ref of this URL. # noqa: E501 - :rtype: str - """ - return self._ref - - @ref.setter - def ref(self, ref): - """Sets the ref of this URL. - - - :param ref: The ref of this URL. # noqa: E501 - :type: str - """ - - self._ref = ref - - @property - def user_info(self): - """Gets the user_info of this URL. # noqa: E501 - - - :return: The user_info of this URL. # noqa: E501 - :rtype: str - """ - return self._user_info - - @user_info.setter - def user_info(self, user_info): - """Sets the user_info of this URL. - - - :param user_info: The user_info of this URL. # noqa: E501 - :type: str - """ - - self._user_info = user_info - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(URL, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, URL): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_ce/usage_info.py b/tb_rest_client/models/models_ce/usage_info.py new file mode 100644 index 00000000..a1218d04 --- /dev/null +++ b/tb_rest_client/models/models_ce/usage_info.py @@ -0,0 +1,604 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UsageInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'alarms': 'int', + 'assets': 'int', + 'customers': 'int', + 'dashboards': 'int', + 'devices': 'int', + 'emails': 'int', + 'js_executions': 'int', + 'max_alarms': 'int', + 'max_assets': 'int', + 'max_customers': 'int', + 'max_dashboards': 'int', + 'max_devices': 'int', + 'max_emails': 'int', + 'max_js_executions': 'int', + 'max_sms': 'int', + 'max_transport_messages': 'int', + 'max_users': 'int', + 'sms': 'int', + 'transport_messages': 'int', + 'users': 'int' + } + + attribute_map = { + 'alarms': 'alarms', + 'assets': 'assets', + 'customers': 'customers', + 'dashboards': 'dashboards', + 'devices': 'devices', + 'emails': 'emails', + 'js_executions': 'jsExecutions', + 'max_alarms': 'maxAlarms', + 'max_assets': 'maxAssets', + 'max_customers': 'maxCustomers', + 'max_dashboards': 'maxDashboards', + 'max_devices': 'maxDevices', + 'max_emails': 'maxEmails', + 'max_js_executions': 'maxJsExecutions', + 'max_sms': 'maxSms', + 'max_transport_messages': 'maxTransportMessages', + 'max_users': 'maxUsers', + 'sms': 'sms', + 'transport_messages': 'transportMessages', + 'users': 'users' + } + + def __init__(self, alarms=None, assets=None, customers=None, dashboards=None, devices=None, emails=None, js_executions=None, max_alarms=None, max_assets=None, max_customers=None, max_dashboards=None, max_devices=None, max_emails=None, max_js_executions=None, max_sms=None, max_transport_messages=None, max_users=None, sms=None, transport_messages=None, users=None): # noqa: E501 + """UsageInfo - a model defined in Swagger""" # noqa: E501 + self._alarms = None + self._assets = None + self._customers = None + self._dashboards = None + self._devices = None + self._emails = None + self._js_executions = None + self._max_alarms = None + self._max_assets = None + self._max_customers = None + self._max_dashboards = None + self._max_devices = None + self._max_emails = None + self._max_js_executions = None + self._max_sms = None + self._max_transport_messages = None + self._max_users = None + self._sms = None + self._transport_messages = None + self._users = None + self.discriminator = None + if alarms is not None: + self.alarms = alarms + if assets is not None: + self.assets = assets + if customers is not None: + self.customers = customers + if dashboards is not None: + self.dashboards = dashboards + if devices is not None: + self.devices = devices + if emails is not None: + self.emails = emails + if js_executions is not None: + self.js_executions = js_executions + if max_alarms is not None: + self.max_alarms = max_alarms + if max_assets is not None: + self.max_assets = max_assets + if max_customers is not None: + self.max_customers = max_customers + if max_dashboards is not None: + self.max_dashboards = max_dashboards + if max_devices is not None: + self.max_devices = max_devices + if max_emails is not None: + self.max_emails = max_emails + if max_js_executions is not None: + self.max_js_executions = max_js_executions + if max_sms is not None: + self.max_sms = max_sms + if max_transport_messages is not None: + self.max_transport_messages = max_transport_messages + if max_users is not None: + self.max_users = max_users + if sms is not None: + self.sms = sms + if transport_messages is not None: + self.transport_messages = transport_messages + if users is not None: + self.users = users + + @property + def alarms(self): + """Gets the alarms of this UsageInfo. # noqa: E501 + + + :return: The alarms of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._alarms + + @alarms.setter + def alarms(self, alarms): + """Sets the alarms of this UsageInfo. + + + :param alarms: The alarms of this UsageInfo. # noqa: E501 + :type: int + """ + + self._alarms = alarms + + @property + def assets(self): + """Gets the assets of this UsageInfo. # noqa: E501 + + + :return: The assets of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._assets + + @assets.setter + def assets(self, assets): + """Sets the assets of this UsageInfo. + + + :param assets: The assets of this UsageInfo. # noqa: E501 + :type: int + """ + + self._assets = assets + + @property + def customers(self): + """Gets the customers of this UsageInfo. # noqa: E501 + + + :return: The customers of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._customers + + @customers.setter + def customers(self, customers): + """Sets the customers of this UsageInfo. + + + :param customers: The customers of this UsageInfo. # noqa: E501 + :type: int + """ + + self._customers = customers + + @property + def dashboards(self): + """Gets the dashboards of this UsageInfo. # noqa: E501 + + + :return: The dashboards of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._dashboards + + @dashboards.setter + def dashboards(self, dashboards): + """Sets the dashboards of this UsageInfo. + + + :param dashboards: The dashboards of this UsageInfo. # noqa: E501 + :type: int + """ + + self._dashboards = dashboards + + @property + def devices(self): + """Gets the devices of this UsageInfo. # noqa: E501 + + + :return: The devices of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._devices + + @devices.setter + def devices(self, devices): + """Sets the devices of this UsageInfo. + + + :param devices: The devices of this UsageInfo. # noqa: E501 + :type: int + """ + + self._devices = devices + + @property + def emails(self): + """Gets the emails of this UsageInfo. # noqa: E501 + + + :return: The emails of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this UsageInfo. + + + :param emails: The emails of this UsageInfo. # noqa: E501 + :type: int + """ + + self._emails = emails + + @property + def js_executions(self): + """Gets the js_executions of this UsageInfo. # noqa: E501 + + + :return: The js_executions of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._js_executions + + @js_executions.setter + def js_executions(self, js_executions): + """Sets the js_executions of this UsageInfo. + + + :param js_executions: The js_executions of this UsageInfo. # noqa: E501 + :type: int + """ + + self._js_executions = js_executions + + @property + def max_alarms(self): + """Gets the max_alarms of this UsageInfo. # noqa: E501 + + + :return: The max_alarms of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_alarms + + @max_alarms.setter + def max_alarms(self, max_alarms): + """Sets the max_alarms of this UsageInfo. + + + :param max_alarms: The max_alarms of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_alarms = max_alarms + + @property + def max_assets(self): + """Gets the max_assets of this UsageInfo. # noqa: E501 + + + :return: The max_assets of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_assets + + @max_assets.setter + def max_assets(self, max_assets): + """Sets the max_assets of this UsageInfo. + + + :param max_assets: The max_assets of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_assets = max_assets + + @property + def max_customers(self): + """Gets the max_customers of this UsageInfo. # noqa: E501 + + + :return: The max_customers of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_customers + + @max_customers.setter + def max_customers(self, max_customers): + """Sets the max_customers of this UsageInfo. + + + :param max_customers: The max_customers of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_customers = max_customers + + @property + def max_dashboards(self): + """Gets the max_dashboards of this UsageInfo. # noqa: E501 + + + :return: The max_dashboards of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_dashboards + + @max_dashboards.setter + def max_dashboards(self, max_dashboards): + """Sets the max_dashboards of this UsageInfo. + + + :param max_dashboards: The max_dashboards of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_dashboards = max_dashboards + + @property + def max_devices(self): + """Gets the max_devices of this UsageInfo. # noqa: E501 + + + :return: The max_devices of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_devices + + @max_devices.setter + def max_devices(self, max_devices): + """Sets the max_devices of this UsageInfo. + + + :param max_devices: The max_devices of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_devices = max_devices + + @property + def max_emails(self): + """Gets the max_emails of this UsageInfo. # noqa: E501 + + + :return: The max_emails of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_emails + + @max_emails.setter + def max_emails(self, max_emails): + """Sets the max_emails of this UsageInfo. + + + :param max_emails: The max_emails of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_emails = max_emails + + @property + def max_js_executions(self): + """Gets the max_js_executions of this UsageInfo. # noqa: E501 + + + :return: The max_js_executions of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_js_executions + + @max_js_executions.setter + def max_js_executions(self, max_js_executions): + """Sets the max_js_executions of this UsageInfo. + + + :param max_js_executions: The max_js_executions of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_js_executions = max_js_executions + + @property + def max_sms(self): + """Gets the max_sms of this UsageInfo. # noqa: E501 + + + :return: The max_sms of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_sms + + @max_sms.setter + def max_sms(self, max_sms): + """Sets the max_sms of this UsageInfo. + + + :param max_sms: The max_sms of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_sms = max_sms + + @property + def max_transport_messages(self): + """Gets the max_transport_messages of this UsageInfo. # noqa: E501 + + + :return: The max_transport_messages of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_transport_messages + + @max_transport_messages.setter + def max_transport_messages(self, max_transport_messages): + """Sets the max_transport_messages of this UsageInfo. + + + :param max_transport_messages: The max_transport_messages of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_transport_messages = max_transport_messages + + @property + def max_users(self): + """Gets the max_users of this UsageInfo. # noqa: E501 + + + :return: The max_users of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_users + + @max_users.setter + def max_users(self, max_users): + """Sets the max_users of this UsageInfo. + + + :param max_users: The max_users of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_users = max_users + + @property + def sms(self): + """Gets the sms of this UsageInfo. # noqa: E501 + + + :return: The sms of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._sms + + @sms.setter + def sms(self, sms): + """Sets the sms of this UsageInfo. + + + :param sms: The sms of this UsageInfo. # noqa: E501 + :type: int + """ + + self._sms = sms + + @property + def transport_messages(self): + """Gets the transport_messages of this UsageInfo. # noqa: E501 + + + :return: The transport_messages of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._transport_messages + + @transport_messages.setter + def transport_messages(self, transport_messages): + """Sets the transport_messages of this UsageInfo. + + + :param transport_messages: The transport_messages of this UsageInfo. # noqa: E501 + :type: int + """ + + self._transport_messages = transport_messages + + @property + def users(self): + """Gets the users of this UsageInfo. # noqa: E501 + + + :return: The users of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._users + + @users.setter + def users(self, users): + """Sets the users of this UsageInfo. + + + :param users: The users of this UsageInfo. # noqa: E501 + :type: int + """ + + self._users = users + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UsageInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UsageInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/user.py b/tb_rest_client/models/models_ce/user.py index ccd7ea17..f8c05960 100644 --- a/tb_rest_client/models/models_ce/user.py +++ b/tb_rest_client/models/models_ce/user.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class User(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -37,6 +37,7 @@ class User(object): 'authority': 'str', 'first_name': 'str', 'last_name': 'str', + 'phone': 'str', 'additional_info': 'JsonNode' } @@ -50,20 +51,22 @@ class User(object): 'authority': 'authority', 'first_name': 'firstName', 'last_name': 'lastName', + 'phone': 'phone', 'additional_info': 'additionalInfo' } - def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, email=None, name=None, authority=None, first_name=None, last_name=None, additional_info=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, email=None, name=None, authority=None, first_name=None, last_name=None, phone=None, additional_info=None): # noqa: E501 """User - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None self._tenant_id = None self._customer_id = None self._email = None - self._name = "" + self._name = None self._authority = None - self._first_name = "" - self._last_name = "" + self._first_name = None + self._last_name = None + self._phone = None self._additional_info = None self.discriminator = None if id is not None: @@ -78,10 +81,9 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, if name is not None: self.name = name self.authority = authority - if first_name is not None: - self.first_name = first_name - if last_name is not None: - self.last_name = last_name + self.first_name = first_name + self.last_name = last_name + self.phone = phone if additional_info is not None: self.additional_info = additional_info @@ -191,8 +193,6 @@ def email(self, email): :param email: The email of this User. # noqa: E501 :type: str """ - if email is None: - raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 self._email = email @@ -270,8 +270,8 @@ def first_name(self, first_name): :param first_name: The first_name of this User. # noqa: E501 :type: str """ - if first_name is None: - self._first_name = "" + # if first_name is None: + # raise ValueError("Invalid value for `first_name`, must not be `None`") # noqa: E501 self._first_name = first_name @@ -295,11 +295,36 @@ def last_name(self, last_name): :param last_name: The last_name of this User. # noqa: E501 :type: str """ - if last_name is None: - self._last_name = "" + # if last_name is None: + # raise ValueError("Invalid value for `last_name`, must not be `None`") # noqa: E501 self._last_name = last_name + @property + def phone(self): + """Gets the phone of this User. # noqa: E501 + + Phone number of the user # noqa: E501 + + :return: The phone of this User. # noqa: E501 + :rtype: str + """ + return self._phone + + @phone.setter + def phone(self, phone): + """Sets the phone of this User. + + Phone number of the user # noqa: E501 + + :param phone: The phone of this User. # noqa: E501 + :type: str + """ + # if phone is None: + # raise ValueError("Invalid value for `phone`, must not be `None`") # noqa: E501 + + self._phone = phone + @property def additional_info(self): """Gets the additional_info of this User. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/user_dashboards_info.py b/tb_rest_client/models/models_ce/user_dashboards_info.py new file mode 100644 index 00000000..40c0853b --- /dev/null +++ b/tb_rest_client/models/models_ce/user_dashboards_info.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserDashboardsInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'last': 'list[LastVisitedDashboardInfo]', + 'starred': 'list[StarredDashboardInfo]' + } + + attribute_map = { + 'last': 'last', + 'starred': 'starred' + } + + def __init__(self, last=None, starred=None): # noqa: E501 + """UserDashboardsInfo - a model defined in Swagger""" # noqa: E501 + self._last = None + self._starred = None + self.discriminator = None + if last is not None: + self.last = last + if starred is not None: + self.starred = starred + + @property + def last(self): + """Gets the last of this UserDashboardsInfo. # noqa: E501 + + List of last visited dashboards. # noqa: E501 + + :return: The last of this UserDashboardsInfo. # noqa: E501 + :rtype: list[LastVisitedDashboardInfo] + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this UserDashboardsInfo. + + List of last visited dashboards. # noqa: E501 + + :param last: The last of this UserDashboardsInfo. # noqa: E501 + :type: list[LastVisitedDashboardInfo] + """ + + self._last = last + + @property + def starred(self): + """Gets the starred of this UserDashboardsInfo. # noqa: E501 + + List of starred dashboards. # noqa: E501 + + :return: The starred of this UserDashboardsInfo. # noqa: E501 + :rtype: list[StarredDashboardInfo] + """ + return self._starred + + @starred.setter + def starred(self, starred): + """Sets the starred of this UserDashboardsInfo. + + List of starred dashboards. # noqa: E501 + + :param starred: The starred of this UserDashboardsInfo. # noqa: E501 + :type: list[StarredDashboardInfo] + """ + + self._starred = starred + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserDashboardsInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserDashboardsInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/user_email_info.py b/tb_rest_client/models/models_ce/user_email_info.py new file mode 100644 index 00000000..6e1a06ca --- /dev/null +++ b/tb_rest_client/models/models_ce/user_email_info.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserEmailInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'UserId', + 'email': 'str', + 'first_name': 'str', + 'last_name': 'str' + } + + attribute_map = { + 'id': 'id', + 'email': 'email', + 'first_name': 'firstName', + 'last_name': 'lastName' + } + + def __init__(self, id=None, email=None, first_name=None, last_name=None): # noqa: E501 + """UserEmailInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._email = None + self._first_name = None + self._last_name = None + self.discriminator = None + if id is not None: + self.id = id + if email is not None: + self.email = email + if first_name is not None: + self.first_name = first_name + if last_name is not None: + self.last_name = last_name + + @property + def id(self): + """Gets the id of this UserEmailInfo. # noqa: E501 + + + :return: The id of this UserEmailInfo. # noqa: E501 + :rtype: UserId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserEmailInfo. + + + :param id: The id of this UserEmailInfo. # noqa: E501 + :type: UserId + """ + + self._id = id + + @property + def email(self): + """Gets the email of this UserEmailInfo. # noqa: E501 + + User email # noqa: E501 + + :return: The email of this UserEmailInfo. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this UserEmailInfo. + + User email # noqa: E501 + + :param email: The email of this UserEmailInfo. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def first_name(self): + """Gets the first_name of this UserEmailInfo. # noqa: E501 + + User first name # noqa: E501 + + :return: The first_name of this UserEmailInfo. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this UserEmailInfo. + + User first name # noqa: E501 + + :param first_name: The first_name of this UserEmailInfo. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this UserEmailInfo. # noqa: E501 + + User last name # noqa: E501 + + :return: The last_name of this UserEmailInfo. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this UserEmailInfo. + + User last name # noqa: E501 + + :param last_name: The last_name of this UserEmailInfo. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserEmailInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserEmailInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/user_id.py b/tb_rest_client/models/models_ce/user_id.py index e25d4138..b30da5ff 100644 --- a/tb_rest_client/models/models_ce/user_id.py +++ b/tb_rest_client/models/models_ce/user_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class UserId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/user_list_filter.py b/tb_rest_client/models/models_ce/user_list_filter.py new file mode 100644 index 00000000..c404e607 --- /dev/null +++ b/tb_rest_client/models/models_ce/user_list_filter.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserListFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'users_ids': 'list[str]' + } + + attribute_map = { + 'users_ids': 'usersIds' + } + + def __init__(self, users_ids=None): # noqa: E501 + """UserListFilter - a model defined in Swagger""" # noqa: E501 + self._users_ids = None + self.discriminator = None + if users_ids is not None: + self.users_ids = users_ids + + @property + def users_ids(self): + """Gets the users_ids of this UserListFilter. # noqa: E501 + + + :return: The users_ids of this UserListFilter. # noqa: E501 + :rtype: list[str] + """ + return self._users_ids + + @users_ids.setter + def users_ids(self, users_ids): + """Sets the users_ids of this UserListFilter. + + + :param users_ids: The users_ids of this UserListFilter. # noqa: E501 + :type: list[str] + """ + + self._users_ids = users_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserListFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserListFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/user_password_policy.py b/tb_rest_client/models/models_ce/user_password_policy.py index 97e836c3..9966a5af 100644 --- a/tb_rest_client/models/models_ce/user_password_policy.py +++ b/tb_rest_client/models/models_ce/user_password_policy.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class UserPasswordPolicy(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/users_filter.py b/tb_rest_client/models/models_ce/users_filter.py new file mode 100644 index 00000000..45180ede --- /dev/null +++ b/tb_rest_client/models/models_ce/users_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UsersFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """UsersFilter - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UsersFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UsersFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/version_create_config.py b/tb_rest_client/models/models_ce/version_create_config.py index d6bf97c0..acecf231 100644 --- a/tb_rest_client/models/models_ce/version_create_config.py +++ b/tb_rest_client/models/models_ce/version_create_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionCreateConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/version_create_request.py b/tb_rest_client/models/models_ce/version_create_request.py index 72e721c7..f130b99d 100644 --- a/tb_rest_client/models/models_ce/version_create_request.py +++ b/tb_rest_client/models/models_ce/version_create_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionCreateRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/version_creation_result.py b/tb_rest_client/models/models_ce/version_creation_result.py index 8d9914fc..6f240248 100644 --- a/tb_rest_client/models/models_ce/version_creation_result.py +++ b/tb_rest_client/models/models_ce/version_creation_result.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionCreationResult(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/version_load_config.py b/tb_rest_client/models/models_ce/version_load_config.py index 80c6a5e0..72024ac1 100644 --- a/tb_rest_client/models/models_ce/version_load_config.py +++ b/tb_rest_client/models/models_ce/version_load_config.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionLoadConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/version_load_request.py b/tb_rest_client/models/models_ce/version_load_request.py index a693585e..31b6a9db 100644 --- a/tb_rest_client/models/models_ce/version_load_request.py +++ b/tb_rest_client/models/models_ce/version_load_request.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionLoadRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/version_load_result.py b/tb_rest_client/models/models_ce/version_load_result.py index 37795ac8..9663308e 100644 --- a/tb_rest_client/models/models_ce/version_load_result.py +++ b/tb_rest_client/models/models_ce/version_load_result.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionLoadResult(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/versioned_entity_info.py b/tb_rest_client/models/models_ce/versioned_entity_info.py index 19d40ec4..a422622a 100644 --- a/tb_rest_client/models/models_ce/versioned_entity_info.py +++ b/tb_rest_client/models/models_ce/versioned_entity_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionedEntityInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/web_delivery_method_notification_template.py b/tb_rest_client/models/models_ce/web_delivery_method_notification_template.py new file mode 100644 index 00000000..cfad5e2b --- /dev/null +++ b/tb_rest_client/models/models_ce/web_delivery_method_notification_template.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class WebDeliveryMethodNotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'JsonNode', + 'body': 'str', + 'enabled': 'bool', + 'subject': 'str' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'body': 'body', + 'enabled': 'enabled', + 'subject': 'subject' + } + + def __init__(self, additional_config=None, body=None, enabled=None, subject=None): # noqa: E501 + """WebDeliveryMethodNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._body = None + self._enabled = None + self._subject = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if body is not None: + self.body = body + if enabled is not None: + self.enabled = enabled + if subject is not None: + self.subject = subject + + @property + def additional_config(self): + """Gets the additional_config of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The additional_config of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this WebDeliveryMethodNotificationTemplate. + + + :param additional_config: The additional_config of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :type: JsonNode + """ + + self._additional_config = additional_config + + @property + def body(self): + """Gets the body of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The body of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this WebDeliveryMethodNotificationTemplate. + + + :param body: The body of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def enabled(self): + """Gets the enabled of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The enabled of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this WebDeliveryMethodNotificationTemplate. + + + :param enabled: The enabled of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def subject(self): + """Gets the subject of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The subject of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this WebDeliveryMethodNotificationTemplate. + + + :param subject: The subject of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._subject = subject + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(WebDeliveryMethodNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebDeliveryMethodNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/widget_type.py b/tb_rest_client/models/models_ce/widget_type.py index c5bb19ea..1b41faf9 100644 --- a/tb_rest_client/models/models_ce/widget_type.py +++ b/tb_rest_client/models/models_ce/widget_type.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetType(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/widget_type_details.py b/tb_rest_client/models/models_ce/widget_type_details.py index b26bf897..14c92d3b 100644 --- a/tb_rest_client/models/models_ce/widget_type_details.py +++ b/tb_rest_client/models/models_ce/widget_type_details.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetTypeDetails(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/widget_type_id.py b/tb_rest_client/models/models_ce/widget_type_id.py index 61f9bc23..2d511cbd 100644 --- a/tb_rest_client/models/models_ce/widget_type_id.py +++ b/tb_rest_client/models/models_ce/widget_type_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetTypeId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/widget_type_info.py b/tb_rest_client/models/models_ce/widget_type_info.py index 8bcbf99a..aa3f4a34 100644 --- a/tb_rest_client/models/models_ce/widget_type_info.py +++ b/tb_rest_client/models/models_ce/widget_type_info.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetTypeInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/widgets_bundle.py b/tb_rest_client/models/models_ce/widgets_bundle.py index 3e009b14..7b386740 100644 --- a/tb_rest_client/models/models_ce/widgets_bundle.py +++ b/tb_rest_client/models/models_ce/widgets_bundle.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetsBundle(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,9 +28,9 @@ class WidgetsBundle(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'WidgetsBundleId', 'id': 'WidgetsBundleId', 'created_time': 'int', + 'name': 'str', 'tenant_id': 'TenantId', 'alias': 'str', 'title': 'str', @@ -39,9 +39,9 @@ class WidgetsBundle(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', + 'name': 'name', 'tenant_id': 'tenantId', 'alias': 'alias', 'title': 'title', @@ -49,23 +49,23 @@ class WidgetsBundle(object): 'description': 'description' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, alias=None, title=None, image=None, description=None): # noqa: E501 + def __init__(self, id=None, created_time=None, name=None, tenant_id=None, alias=None, title=None, image=None, description=None): # noqa: E501 """WidgetsBundle - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None + self._name = None self._tenant_id = None self._alias = None self._title = None self._image = None self._description = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: self.created_time = created_time + if name is not None: + self.name = name if tenant_id is not None: self.tenant_id = tenant_id if alias is not None: @@ -77,27 +77,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if description is not None: self.description = description - @property - def external_id(self): - """Gets the external_id of this WidgetsBundle. # noqa: E501 - - - :return: The external_id of this WidgetsBundle. # noqa: E501 - :rtype: WidgetsBundleId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this WidgetsBundle. - - - :param external_id: The external_id of this WidgetsBundle. # noqa: E501 - :type: WidgetsBundleId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this WidgetsBundle. # noqa: E501 @@ -142,6 +121,29 @@ def created_time(self, created_time): self._created_time = created_time + @property + def name(self): + """Gets the name of this WidgetsBundle. # noqa: E501 + + Same as title of the Widget Bundle. Read-only field. Update the 'title' to change the 'name' of the Widget Bundle. # noqa: E501 + + :return: The name of this WidgetsBundle. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WidgetsBundle. + + Same as title of the Widget Bundle. Read-only field. Update the 'title' to change the 'name' of the Widget Bundle. # noqa: E501 + + :param name: The name of this WidgetsBundle. # noqa: E501 + :type: str + """ + + self._name = name + @property def tenant_id(self): """Gets the tenant_id of this WidgetsBundle. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/widgets_bundle_export_data.py b/tb_rest_client/models/models_ce/widgets_bundle_export_data.py index f7423f41..1de92e3c 100644 --- a/tb_rest_client/models/models_ce/widgets_bundle_export_data.py +++ b/tb_rest_client/models/models_ce/widgets_bundle_export_data.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 +from tb_rest_client.models.models_ce.entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 class WidgetsBundleExportData(EntityExportDataobject): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -128,7 +128,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this WidgetsBundleExportData. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_VIEW", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "RPC", "RULE_CHAIN", "RULE_NODE", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/widgets_bundle_id.py b/tb_rest_client/models/models_ce/widgets_bundle_id.py index 284b637c..9c694117 100644 --- a/tb_rest_client/models/models_ce/widgets_bundle_id.py +++ b/tb_rest_client/models/models_ce/widgets_bundle_id.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetsBundleId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_ce/x509_certificate_chain_provision_configuration.py b/tb_rest_client/models/models_ce/x509_certificate_chain_provision_configuration.py new file mode 100644 index 00000000..3ab16795 --- /dev/null +++ b/tb_rest_client/models/models_ce/x509_certificate_chain_provision_configuration.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0 + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_ce.device_profile_provision_configuration import DeviceProfileProvisionConfiguration # noqa: F401,E501 + +class X509CertificateChainProvisionConfiguration(DeviceProfileProvisionConfiguration): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'allow_create_new_devices_by_x509_certificate': 'bool', + 'certificate_reg_ex_pattern': 'str', + 'provision_device_secret': 'str' + } + if hasattr(DeviceProfileProvisionConfiguration, "swagger_types"): + swagger_types.update(DeviceProfileProvisionConfiguration.swagger_types) + + attribute_map = { + 'allow_create_new_devices_by_x509_certificate': 'allowCreateNewDevicesByX509Certificate', + 'certificate_reg_ex_pattern': 'certificateRegExPattern', + 'provision_device_secret': 'provisionDeviceSecret' + } + if hasattr(DeviceProfileProvisionConfiguration, "attribute_map"): + attribute_map.update(DeviceProfileProvisionConfiguration.attribute_map) + + def __init__(self, allow_create_new_devices_by_x509_certificate=None, certificate_reg_ex_pattern=None, provision_device_secret=None, *args, **kwargs): # noqa: E501 + """X509CertificateChainProvisionConfiguration - a model defined in Swagger""" # noqa: E501 + self._allow_create_new_devices_by_x509_certificate = None + self._certificate_reg_ex_pattern = None + self._provision_device_secret = None + self.discriminator = None + if allow_create_new_devices_by_x509_certificate is not None: + self.allow_create_new_devices_by_x509_certificate = allow_create_new_devices_by_x509_certificate + if certificate_reg_ex_pattern is not None: + self.certificate_reg_ex_pattern = certificate_reg_ex_pattern + if provision_device_secret is not None: + self.provision_device_secret = provision_device_secret + DeviceProfileProvisionConfiguration.__init__(self, *args, **kwargs) + + @property + def allow_create_new_devices_by_x509_certificate(self): + """Gets the allow_create_new_devices_by_x509_certificate of this X509CertificateChainProvisionConfiguration. # noqa: E501 + + + :return: The allow_create_new_devices_by_x509_certificate of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :rtype: bool + """ + return self._allow_create_new_devices_by_x509_certificate + + @allow_create_new_devices_by_x509_certificate.setter + def allow_create_new_devices_by_x509_certificate(self, allow_create_new_devices_by_x509_certificate): + """Sets the allow_create_new_devices_by_x509_certificate of this X509CertificateChainProvisionConfiguration. + + + :param allow_create_new_devices_by_x509_certificate: The allow_create_new_devices_by_x509_certificate of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :type: bool + """ + + self._allow_create_new_devices_by_x509_certificate = allow_create_new_devices_by_x509_certificate + + @property + def certificate_reg_ex_pattern(self): + """Gets the certificate_reg_ex_pattern of this X509CertificateChainProvisionConfiguration. # noqa: E501 + + + :return: The certificate_reg_ex_pattern of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :rtype: str + """ + return self._certificate_reg_ex_pattern + + @certificate_reg_ex_pattern.setter + def certificate_reg_ex_pattern(self, certificate_reg_ex_pattern): + """Sets the certificate_reg_ex_pattern of this X509CertificateChainProvisionConfiguration. + + + :param certificate_reg_ex_pattern: The certificate_reg_ex_pattern of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :type: str + """ + + self._certificate_reg_ex_pattern = certificate_reg_ex_pattern + + @property + def provision_device_secret(self): + """Gets the provision_device_secret of this X509CertificateChainProvisionConfiguration. # noqa: E501 + + + :return: The provision_device_secret of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :rtype: str + """ + return self._provision_device_secret + + @provision_device_secret.setter + def provision_device_secret(self, provision_device_secret): + """Sets the provision_device_secret of this X509CertificateChainProvisionConfiguration. + + + :param provision_device_secret: The provision_device_secret of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :type: str + """ + + self._provision_device_secret = provision_device_secret + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(X509CertificateChainProvisionConfiguration, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, X509CertificateChainProvisionConfiguration): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_ce/x509_lw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_ce/x509_lw_m2_m_bootstrap_server_credential.py index e29f8f62..ccd4867c 100644 --- a/tb_rest_client/models/models_ce/x509_lw_m2_m_bootstrap_server_credential.py +++ b/tb_rest_client/models/models_ce/x509_lw_m2_m_bootstrap_server_credential.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0-SNAPSHOT + OpenAPI spec version: 3.5.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class X509LwM2MBootstrapServerCredential(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/__init__.py b/tb_rest_client/models/models_pe/__init__.py index 3a83892a..79cc6ab4 100644 --- a/tb_rest_client/models/models_pe/__init__.py +++ b/tb_rest_client/models/models_pe/__init__.py @@ -330,3 +330,127 @@ from .two_fa_account_config_update_request import TwoFaAccountConfigUpdateRequest from .two_fa_provider_info import TwoFaProviderInfo from .entity_load_error import EntityLoadError +from .array_node import ArrayNode +from .asset_profile_info import AssetProfileInfo +from .device_profile_info import DeviceProfileInfo +from .integration_info import IntegrationInfo +from .page_data_integration_info import PageDataIntegrationInfo +from .raw_data_event_filter import RawDataEventFilter +from .rule_node_debug_event_filter import RuleNodeDebugEventFilter +from .scheduler_event_filter import SchedulerEventFilter +from .affected_tenant_administrators_filter import AffectedTenantAdministratorsFilter +from .affected_user_filter import AffectedUserFilter +from .alarm_assignee import AlarmAssignee +from .alarm_assignment_notification_rule_trigger_config import AlarmAssignmentNotificationRuleTriggerConfig +from .alarm_comment import AlarmComment +from .alarm_comment_id import AlarmCommentId +from .alarm_comment_info import AlarmCommentInfo +from .alarm_comment_notification_rule_trigger_config import AlarmCommentNotificationRuleTriggerConfig +from .alarm_count_query import AlarmCountQuery +from .alarm_comment_notification_rule_trigger_config import AlarmCommentNotificationRuleTriggerConfig +from .all_users_filter import AllUsersFilter +from .api_usage_limit_notification_rule_trigger_config import ApiUsageLimitNotificationRuleTriggerConfig +from .asset_info import AssetInfo +from .asset_profile import AssetProfile +from .asset_profile_id import AssetProfileId +from .clear_rule import ClearRule +from .comparison_ts_value import ComparisonTsValue +from .customer_info import CustomerInfo +from .customer_users_filter import CustomerUsersFilter +from .delivery_method_notification_template import DeliveryMethodNotificationTemplate +from .device_activity_notification_rule_trigger_config import DeviceActivityNotificationRuleTriggerConfig +from .device_credentials import DeviceCredentials +from .device_info import DeviceInfo +from .device_profile import DeviceProfile +from .edge_info import EdgeInfo +from .edge_install_instructions import EdgeInstallInstructions +from .email_delivery_method_notification_template import EmailDeliveryMethodNotificationTemplate +from .entities_limit_notification_rule_trigger_config import EntitiesLimitNotificationRuleTriggerConfig +from .entity_action_notification_rule_trigger_config import EntityActionNotificationRuleTriggerConfig +from .entity_relation import EntityRelation +from .entity_view_info import EntityViewInfo +from .escalated_notification_rule_recipients_config import EscalatedNotificationRuleRecipientsConfig +from .event_info import EventInfo +from .features_info import FeaturesInfo +from .home_dashboard_info import HomeDashboardInfo +from .integration_lifecycle_event_notification_rule_trigger_config import IntegrationLifecycleEventNotificationRuleTriggerConfig +from .jwt_settings import JWTSettings +from .jwt_pair import JWTPair +from .last_visited_dashboard_info import LastVisitedDashboardInfo +from .license_usage_info import LicenseUsageInfo +from .new_platform_version_notification_rule_trigger_config import NewPlatformVersionNotificationRuleTriggerConfig +from .notification import Notification +from .notification_delivery_method_config import NotificationDeliveryMethodConfig +from .notification_id import NotificationId +from .notification_info import NotificationInfo +from .notification_request import NotificationRequest +from .notification_request_config import NotificationRequestConfig +from .notification_request_id import NotificationRequestId +from .notification_request_preview import NotificationRequestPreview +from .notification_request_info import NotificationRequestInfo +from .notification_request_stats import NotificationRequestStats +from .notification_rule import NotificationRule +from .notification_rule_config import NotificationRuleConfig +from .notification_rule_id import NotificationRuleId +from .notification_rule_info import NotificationRuleInfo +from .notification_rule_recipients_config import NotificationRuleRecipientsConfig +from .notification_rule_trigger_config import NotificationRuleTriggerConfig +from .notification_settings import NotificationSettings +from .notification_template import NotificationTemplate +from .notification_target import NotificationTarget +from .notification_target_config import NotificationTargetConfig +from .notification_target_id import NotificationTargetId +from .notification_template_config import NotificationTemplateConfig +from .notification_template_id import NotificationTemplateId +from .originator_entity_owner_users_filter import OriginatorEntityOwnerUsersFilter +from .page_data_alarm_comment_info import PageDataAlarmCommentInfo +from .page_data_alarm_info import PageDataAlarmInfo +from .page_data_asset import PageDataAsset +from .page_data_asset_info import PageDataAssetInfo +from .page_data_asset_profile import PageDataAssetProfile +from .page_data_asset_profile_info import PageDataAssetProfileInfo +from .page_data_customer import PageDataCustomer +from .page_data_customer_info import PageDataCustomerInfo +from .page_data_dashboard_info import PageDataDashboardInfo +from .page_data_device import PageDataDevice +from .page_data_device_info import PageDataDeviceInfo +from .page_data_device_profile import PageDataDeviceProfile +from .page_data_device_profile_info import PageDataDeviceProfileInfo +from .page_data_edge_info import PageDataEdgeInfo +from .page_data_entity_view import PageDataEntityView +from .page_data_entity_view_info import PageDataEntityViewInfo +from .page_data_event_info import PageDataEventInfo +from .page_data_notification import PageDataNotification +from .page_data_notification_request_info import PageDataNotificationRequestInfo +from .page_data_notification_rule_info import PageDataNotificationRuleInfo +from .page_data_notification_target import PageDataNotificationTarget +from .page_data_notification_template import PageDataNotificationTemplate +from .page_data_user import PageDataUser +from .page_data_user_email_info import PageDataUserEmailInfo +from .page_data_user_info import PageDataUserInfo +from .platform_users_notification_target_config import PlatformUsersNotificationTargetConfig +from .psklw_m2_m_bootstrap_server_credential import PSKLwM2MBootstrapServerCredential +from .repository_settings import RepositorySettings +from .rpklw_m2_m_bootstrap_server_credential import RPKLwM2MBootstrapServerCredential +from .rule_chain_debug_event_filter import RuleChainDebugEventFilter +from .rule_engine_component_lifecycle_event_notification_rule_trigger_config import RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig +from .slack_conversation import SlackConversation +from .slack_delivery_method_notification_template import SlackDeliveryMethodNotificationTemplate +from .slack_notification_delivery_method_config import SlackNotificationDeliveryMethodConfig +from .slack_notification_target_config import SlackNotificationTargetConfig +from .sms_delivery_method_notification_template import SmsDeliveryMethodNotificationTemplate +from .starred_dashboard_info import StarredDashboardInfo +from .system_administrators_filter import SystemAdministratorsFilter +from .system_info import SystemInfo +from .system_info_data import SystemInfoData +from .tenant_administrators_filter import TenantAdministratorsFilter +from .usage_info import UsageInfo +from .user_dashboards_info import UserDashboardsInfo +from .user_email_info import UserEmailInfo +from .user_group_list_filter import UserGroupListFilter +from .user_info import UserInfo +from .user_list_filter import UserListFilter +from .user_role_filter import UserRoleFilter +from .users_filter import UsersFilter +from .web_delivery_method_notification_template import WebDeliveryMethodNotificationTemplate +from .x509_certificate_chain_provision_configuration import X509CertificateChainProvisionConfiguration diff --git a/tb_rest_client/models/models_pe/account_two_fa_settings.py b/tb_rest_client/models/models_pe/account_two_fa_settings.py index 5584c7e5..0dc30a6d 100644 --- a/tb_rest_client/models/models_pe/account_two_fa_settings.py +++ b/tb_rest_client/models/models_pe/account_two_fa_settings.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AccountTwoFaSettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/activate_user_request.py b/tb_rest_client/models/models_pe/activate_user_request.py index 3e9a897c..04a4830c 100644 --- a/tb_rest_client/models/models_pe/activate_user_request.py +++ b/tb_rest_client/models/models_pe/activate_user_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ActivateUserRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/admin_settings.py b/tb_rest_client/models/models_pe/admin_settings.py index 698a64f3..b1ef78c7 100644 --- a/tb_rest_client/models/models_pe/admin_settings.py +++ b/tb_rest_client/models/models_pe/admin_settings.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AdminSettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/admin_settings_id.py b/tb_rest_client/models/models_pe/admin_settings_id.py index 86f202fe..01c45d75 100644 --- a/tb_rest_client/models/models_pe/admin_settings_id.py +++ b/tb_rest_client/models/models_pe/admin_settings_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AdminSettingsId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,13 +28,11 @@ class AdminSettingsId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_pe/affected_tenant_administrators_filter.py b/tb_rest_client/models/models_pe/affected_tenant_administrators_filter.py new file mode 100644 index 00000000..fe7238e6 --- /dev/null +++ b/tb_rest_client/models/models_pe/affected_tenant_administrators_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AffectedTenantAdministratorsFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """AffectedTenantAdministratorsFilter - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AffectedTenantAdministratorsFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AffectedTenantAdministratorsFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/affected_user_filter.py b/tb_rest_client/models/models_pe/affected_user_filter.py new file mode 100644 index 00000000..4c794856 --- /dev/null +++ b/tb_rest_client/models/models_pe/affected_user_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AffectedUserFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """AffectedUserFilter - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AffectedUserFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AffectedUserFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/alarm.py b/tb_rest_client/models/models_pe/alarm.py index 99848c94..1c2eb13d 100644 --- a/tb_rest_client/models/models_pe/alarm.py +++ b/tb_rest_client/models/models_pe/alarm.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Alarm(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -36,17 +36,21 @@ class Alarm(object): 'type': 'str', 'originator': 'EntityId', 'severity': 'str', - 'status': 'str', + 'acknowledged': 'bool', + 'cleared': 'bool', + 'assignee_id': 'UserId', 'start_ts': 'int', 'end_ts': 'int', 'ack_ts': 'int', 'clear_ts': 'int', + 'assign_ts': 'int', 'details': 'JsonNode', - 'propagate': 'bool', - 'propagate_to_owner': 'bool', 'propagate_to_owner_hierarchy': 'bool', + 'propagate': 'bool', 'propagate_to_tenant': 'bool', - 'propagate_relation_types': 'list[str]' + 'propagate_relation_types': 'list[str]', + 'propagate_to_owner': 'bool', + 'status': 'str' } attribute_map = { @@ -58,20 +62,24 @@ class Alarm(object): 'type': 'type', 'originator': 'originator', 'severity': 'severity', - 'status': 'status', + 'acknowledged': 'acknowledged', + 'cleared': 'cleared', + 'assignee_id': 'assigneeId', 'start_ts': 'startTs', 'end_ts': 'endTs', 'ack_ts': 'ackTs', 'clear_ts': 'clearTs', + 'assign_ts': 'assignTs', 'details': 'details', - 'propagate': 'propagate', - 'propagate_to_owner': 'propagateToOwner', 'propagate_to_owner_hierarchy': 'propagateToOwnerHierarchy', + 'propagate': 'propagate', 'propagate_to_tenant': 'propagateToTenant', - 'propagate_relation_types': 'propagateRelationTypes' + 'propagate_relation_types': 'propagateRelationTypes', + 'propagate_to_owner': 'propagateToOwner', + 'status': 'status' } - def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, status=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, details=None, propagate=None, propagate_to_owner=None, propagate_to_owner_hierarchy=None, propagate_to_tenant=None, propagate_relation_types=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, acknowledged=None, cleared=None, assignee_id=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, assign_ts=None, details=None, propagate_to_owner_hierarchy=None, propagate=None, propagate_to_tenant=None, propagate_relation_types=None, propagate_to_owner=None, status=None): # noqa: E501 """Alarm - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None @@ -81,17 +89,21 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self._type = None self._originator = None self._severity = None - self._status = None + self._acknowledged = None + self._cleared = None + self._assignee_id = None self._start_ts = None self._end_ts = None self._ack_ts = None self._clear_ts = None + self._assign_ts = None self._details = None - self._propagate = None - self._propagate_to_owner = None self._propagate_to_owner_hierarchy = None + self._propagate = None self._propagate_to_tenant = None self._propagate_relation_types = None + self._propagate_to_owner = None + self._status = None self.discriminator = None if id is not None: self.id = id @@ -105,7 +117,10 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.type = type self.originator = originator self.severity = severity - self.status = status + self.acknowledged = acknowledged + self.cleared = cleared + if assignee_id is not None: + self.assignee_id = assignee_id if start_ts is not None: self.start_ts = start_ts if end_ts is not None: @@ -114,18 +129,21 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.ack_ts = ack_ts if clear_ts is not None: self.clear_ts = clear_ts + if assign_ts is not None: + self.assign_ts = assign_ts if details is not None: self.details = details - if propagate is not None: - self.propagate = propagate - if propagate_to_owner is not None: - self.propagate_to_owner = propagate_to_owner if propagate_to_owner_hierarchy is not None: self.propagate_to_owner_hierarchy = propagate_to_owner_hierarchy + if propagate is not None: + self.propagate = propagate if propagate_to_tenant is not None: self.propagate_to_tenant = propagate_to_tenant if propagate_relation_types is not None: self.propagate_relation_types = propagate_relation_types + if propagate_to_owner is not None: + self.propagate_to_owner = propagate_to_owner + self.status = status @property def id(self): @@ -318,35 +336,75 @@ def severity(self, severity): self._severity = severity @property - def status(self): - """Gets the status of this Alarm. # noqa: E501 + def acknowledged(self): + """Gets the acknowledged of this Alarm. # noqa: E501 - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :return: The status of this Alarm. # noqa: E501 - :rtype: str + :return: The acknowledged of this Alarm. # noqa: E501 + :rtype: bool """ - return self._status + return self._acknowledged - @status.setter - def status(self, status): - """Sets the status of this Alarm. + @acknowledged.setter + def acknowledged(self, acknowledged): + """Sets the acknowledged of this Alarm. - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :param status: The status of this Alarm. # noqa: E501 - :type: str + :param acknowledged: The acknowledged of this Alarm. # noqa: E501 + :type: bool """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) + if acknowledged is None: + raise ValueError("Invalid value for `acknowledged`, must not be `None`") # noqa: E501 - self._status = status + self._acknowledged = acknowledged + + @property + def cleared(self): + """Gets the cleared of this Alarm. # noqa: E501 + + Cleared # noqa: E501 + + :return: The cleared of this Alarm. # noqa: E501 + :rtype: bool + """ + return self._cleared + + @cleared.setter + def cleared(self, cleared): + """Sets the cleared of this Alarm. + + Cleared # noqa: E501 + + :param cleared: The cleared of this Alarm. # noqa: E501 + :type: bool + """ + if cleared is None: + raise ValueError("Invalid value for `cleared`, must not be `None`") # noqa: E501 + + self._cleared = cleared + + @property + def assignee_id(self): + """Gets the assignee_id of this Alarm. # noqa: E501 + + + :return: The assignee_id of this Alarm. # noqa: E501 + :rtype: UserId + """ + return self._assignee_id + + @assignee_id.setter + def assignee_id(self, assignee_id): + """Sets the assignee_id of this Alarm. + + + :param assignee_id: The assignee_id of this Alarm. # noqa: E501 + :type: UserId + """ + + self._assignee_id = assignee_id @property def start_ts(self): @@ -440,6 +498,29 @@ def clear_ts(self, clear_ts): self._clear_ts = clear_ts + @property + def assign_ts(self): + """Gets the assign_ts of this Alarm. # noqa: E501 + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :return: The assign_ts of this Alarm. # noqa: E501 + :rtype: int + """ + return self._assign_ts + + @assign_ts.setter + def assign_ts(self, assign_ts): + """Sets the assign_ts of this Alarm. + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :param assign_ts: The assign_ts of this Alarm. # noqa: E501 + :type: int + """ + + self._assign_ts = assign_ts + @property def details(self): """Gets the details of this Alarm. # noqa: E501 @@ -462,73 +543,50 @@ def details(self, details): self._details = details @property - def propagate(self): - """Gets the propagate of this Alarm. # noqa: E501 - - Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - - :return: The propagate of this Alarm. # noqa: E501 - :rtype: bool - """ - return self._propagate - - @propagate.setter - def propagate(self, propagate): - """Sets the propagate of this Alarm. - - Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - - :param propagate: The propagate of this Alarm. # noqa: E501 - :type: bool - """ - - self._propagate = propagate - - @property - def propagate_to_owner(self): - """Gets the propagate_to_owner of this Alarm. # noqa: E501 + def propagate_to_owner_hierarchy(self): + """Gets the propagate_to_owner_hierarchy of this Alarm. # noqa: E501 - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 - :return: The propagate_to_owner of this Alarm. # noqa: E501 + :return: The propagate_to_owner_hierarchy of this Alarm. # noqa: E501 :rtype: bool """ - return self._propagate_to_owner + return self._propagate_to_owner_hierarchy - @propagate_to_owner.setter - def propagate_to_owner(self, propagate_to_owner): - """Sets the propagate_to_owner of this Alarm. + @propagate_to_owner_hierarchy.setter + def propagate_to_owner_hierarchy(self, propagate_to_owner_hierarchy): + """Sets the propagate_to_owner_hierarchy of this Alarm. - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 - :param propagate_to_owner: The propagate_to_owner of this Alarm. # noqa: E501 + :param propagate_to_owner_hierarchy: The propagate_to_owner_hierarchy of this Alarm. # noqa: E501 :type: bool """ - self._propagate_to_owner = propagate_to_owner + self._propagate_to_owner_hierarchy = propagate_to_owner_hierarchy @property - def propagate_to_owner_hierarchy(self): - """Gets the propagate_to_owner_hierarchy of this Alarm. # noqa: E501 + def propagate(self): + """Gets the propagate of this Alarm. # noqa: E501 - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 + Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - :return: The propagate_to_owner_hierarchy of this Alarm. # noqa: E501 + :return: The propagate of this Alarm. # noqa: E501 :rtype: bool """ - return self._propagate_to_owner_hierarchy + return self._propagate - @propagate_to_owner_hierarchy.setter - def propagate_to_owner_hierarchy(self, propagate_to_owner_hierarchy): - """Sets the propagate_to_owner_hierarchy of this Alarm. + @propagate.setter + def propagate(self, propagate): + """Sets the propagate of this Alarm. - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 + Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - :param propagate_to_owner_hierarchy: The propagate_to_owner_hierarchy of this Alarm. # noqa: E501 + :param propagate: The propagate of this Alarm. # noqa: E501 :type: bool """ - self._propagate_to_owner_hierarchy = propagate_to_owner_hierarchy + self._propagate = propagate @property def propagate_to_tenant(self): @@ -576,6 +634,60 @@ def propagate_relation_types(self, propagate_relation_types): self._propagate_relation_types = propagate_relation_types + @property + def propagate_to_owner(self): + """Gets the propagate_to_owner of this Alarm. # noqa: E501 + + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + + :return: The propagate_to_owner of this Alarm. # noqa: E501 + :rtype: bool + """ + return self._propagate_to_owner + + @propagate_to_owner.setter + def propagate_to_owner(self, propagate_to_owner): + """Sets the propagate_to_owner of this Alarm. + + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + + :param propagate_to_owner: The propagate_to_owner of this Alarm. # noqa: E501 + :type: bool + """ + + self._propagate_to_owner = propagate_to_owner + + @property + def status(self): + """Gets the status of this Alarm. # noqa: E501 + + status of the Alarm # noqa: E501 + + :return: The status of this Alarm. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Alarm. + + status of the Alarm # noqa: E501 + + :param status: The status of this Alarm. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_pe/alarm_assignee.py b/tb_rest_client/models/models_pe/alarm_assignee.py new file mode 100644 index 00000000..0e1e7fc0 --- /dev/null +++ b/tb_rest_client/models/models_pe/alarm_assignee.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmAssignee(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'first_name': 'str', + 'id': 'UserId', + 'last_name': 'str' + } + + attribute_map = { + 'email': 'email', + 'first_name': 'firstName', + 'id': 'id', + 'last_name': 'lastName' + } + + def __init__(self, email=None, first_name=None, id=None, last_name=None): # noqa: E501 + """AlarmAssignee - a model defined in Swagger""" # noqa: E501 + self._email = None + self._first_name = None + self._id = None + self._last_name = None + self.discriminator = None + if email is not None: + self.email = email + if first_name is not None: + self.first_name = first_name + if id is not None: + self.id = id + if last_name is not None: + self.last_name = last_name + + @property + def email(self): + """Gets the email of this AlarmAssignee. # noqa: E501 + + + :return: The email of this AlarmAssignee. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this AlarmAssignee. + + + :param email: The email of this AlarmAssignee. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def first_name(self): + """Gets the first_name of this AlarmAssignee. # noqa: E501 + + + :return: The first_name of this AlarmAssignee. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this AlarmAssignee. + + + :param first_name: The first_name of this AlarmAssignee. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def id(self): + """Gets the id of this AlarmAssignee. # noqa: E501 + + + :return: The id of this AlarmAssignee. # noqa: E501 + :rtype: UserId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AlarmAssignee. + + + :param id: The id of this AlarmAssignee. # noqa: E501 + :type: UserId + """ + + self._id = id + + @property + def last_name(self): + """Gets the last_name of this AlarmAssignee. # noqa: E501 + + + :return: The last_name of this AlarmAssignee. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this AlarmAssignee. + + + :param last_name: The last_name of this AlarmAssignee. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmAssignee, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmAssignee): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/alarm_assignment_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/alarm_assignment_notification_rule_trigger_config.py new file mode 100644 index 00000000..84f46112 --- /dev/null +++ b/tb_rest_client/models/models_pe/alarm_assignment_notification_rule_trigger_config.py @@ -0,0 +1,241 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmAssignmentNotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'alarm_severities': 'list[str]', + 'alarm_statuses': 'list[str]', + 'alarm_types': 'list[str]', + 'notify_on': 'list[str]', + 'trigger_type': 'str' + } + + attribute_map = { + 'alarm_severities': 'alarmSeverities', + 'alarm_statuses': 'alarmStatuses', + 'alarm_types': 'alarmTypes', + 'notify_on': 'notifyOn', + 'trigger_type': 'triggerType' + } + + def __init__(self, alarm_severities=None, alarm_statuses=None, alarm_types=None, notify_on=None, trigger_type=None): # noqa: E501 + """AlarmAssignmentNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._alarm_severities = None + self._alarm_statuses = None + self._alarm_types = None + self._notify_on = None + self._trigger_type = None + self.discriminator = None + if alarm_severities is not None: + self.alarm_severities = alarm_severities + if alarm_statuses is not None: + self.alarm_statuses = alarm_statuses + if alarm_types is not None: + self.alarm_types = alarm_types + if notify_on is not None: + self.notify_on = notify_on + if trigger_type is not None: + self.trigger_type = trigger_type + + @property + def alarm_severities(self): + """Gets the alarm_severities of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_severities of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_severities + + @alarm_severities.setter + def alarm_severities(self, alarm_severities): + """Sets the alarm_severities of this AlarmAssignmentNotificationRuleTriggerConfig. + + + :param alarm_severities: The alarm_severities of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["CRITICAL", "INDETERMINATE", "MAJOR", "MINOR", "WARNING"] # noqa: E501 + if not set(alarm_severities).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_severities` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_severities) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_severities = alarm_severities + + @property + def alarm_statuses(self): + """Gets the alarm_statuses of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_statuses of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_statuses + + @alarm_statuses.setter + def alarm_statuses(self, alarm_statuses): + """Sets the alarm_statuses of this AlarmAssignmentNotificationRuleTriggerConfig. + + + :param alarm_statuses: The alarm_statuses of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACK", "ACTIVE", "ANY", "CLEARED", "UNACK"] # noqa: E501 + if not set(alarm_statuses).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_statuses` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_statuses) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_statuses = alarm_statuses + + @property + def alarm_types(self): + """Gets the alarm_types of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_types of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_types + + @alarm_types.setter + def alarm_types(self, alarm_types): + """Sets the alarm_types of this AlarmAssignmentNotificationRuleTriggerConfig. + + + :param alarm_types: The alarm_types of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._alarm_types = alarm_types + + @property + def notify_on(self): + """Gets the notify_on of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._notify_on + + @notify_on.setter + def notify_on(self, notify_on): + """Sets the notify_on of this AlarmAssignmentNotificationRuleTriggerConfig. + + + :param notify_on: The notify_on of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ASSIGNED", "UNASSIGNED"] # noqa: E501 + if not set(notify_on).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `notify_on` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(notify_on) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._notify_on = notify_on + + @property + def trigger_type(self): + """Gets the trigger_type of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this AlarmAssignmentNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this AlarmAssignmentNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmAssignmentNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmAssignmentNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/alarm_comment.py b/tb_rest_client/models/models_pe/alarm_comment.py new file mode 100644 index 00000000..e47572dd --- /dev/null +++ b/tb_rest_client/models/models_pe/alarm_comment.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmComment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'AlarmCommentId', + 'created_time': 'int', + 'alarm_id': 'EntityId', + 'user_id': 'UserId', + 'name': 'str', + 'type': 'str', + 'comment': 'JsonNode' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'alarm_id': 'alarmId', + 'user_id': 'userId', + 'name': 'name', + 'type': 'type', + 'comment': 'comment' + } + + def __init__(self, id=None, created_time=None, alarm_id=None, user_id=None, name=None, type=None, comment=None): # noqa: E501 + """AlarmComment - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._alarm_id = None + self._user_id = None + self._name = None + self._type = None + self._comment = None + self.discriminator = None + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if alarm_id is not None: + self.alarm_id = alarm_id + if user_id is not None: + self.user_id = user_id + self.name = name + if type is not None: + self.type = type + if comment is not None: + self.comment = comment + + @property + def id(self): + """Gets the id of this AlarmComment. # noqa: E501 + + + :return: The id of this AlarmComment. # noqa: E501 + :rtype: AlarmCommentId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AlarmComment. + + + :param id: The id of this AlarmComment. # noqa: E501 + :type: AlarmCommentId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this AlarmComment. # noqa: E501 + + Timestamp of the alarm comment creation, in milliseconds # noqa: E501 + + :return: The created_time of this AlarmComment. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this AlarmComment. + + Timestamp of the alarm comment creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this AlarmComment. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def alarm_id(self): + """Gets the alarm_id of this AlarmComment. # noqa: E501 + + + :return: The alarm_id of this AlarmComment. # noqa: E501 + :rtype: EntityId + """ + return self._alarm_id + + @alarm_id.setter + def alarm_id(self, alarm_id): + """Sets the alarm_id of this AlarmComment. + + + :param alarm_id: The alarm_id of this AlarmComment. # noqa: E501 + :type: EntityId + """ + + self._alarm_id = alarm_id + + @property + def user_id(self): + """Gets the user_id of this AlarmComment. # noqa: E501 + + + :return: The user_id of this AlarmComment. # noqa: E501 + :rtype: UserId + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AlarmComment. + + + :param user_id: The user_id of this AlarmComment. # noqa: E501 + :type: UserId + """ + + self._user_id = user_id + + @property + def name(self): + """Gets the name of this AlarmComment. # noqa: E501 + + representing comment text # noqa: E501 + + :return: The name of this AlarmComment. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AlarmComment. + + representing comment text # noqa: E501 + + :param name: The name of this AlarmComment. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def type(self): + """Gets the type of this AlarmComment. # noqa: E501 + + Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user. # noqa: E501 + + :return: The type of this AlarmComment. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AlarmComment. + + Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user. # noqa: E501 + + :param type: The type of this AlarmComment. # noqa: E501 + :type: str + """ + allowed_values = ["OTHER", "SYSTEM"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def comment(self): + """Gets the comment of this AlarmComment. # noqa: E501 + + + :return: The comment of this AlarmComment. # noqa: E501 + :rtype: JsonNode + """ + return self._comment + + @comment.setter + def comment(self, comment): + """Sets the comment of this AlarmComment. + + + :param comment: The comment of this AlarmComment. # noqa: E501 + :type: JsonNode + """ + + self._comment = comment + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmComment, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmComment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/alarm_comment_id.py b/tb_rest_client/models/models_pe/alarm_comment_id.py new file mode 100644 index 00000000..3fc2755b --- /dev/null +++ b/tb_rest_client/models/models_pe/alarm_comment_id.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmCommentId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, id=None): # noqa: E501 + """AlarmCommentId - a model defined in Swagger""" # noqa: E501 + self._id = None + self.discriminator = None + self.id = id + + @property + def id(self): + """Gets the id of this AlarmCommentId. # noqa: E501 + + string # noqa: E501 + + :return: The id of this AlarmCommentId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AlarmCommentId. + + string # noqa: E501 + + :param id: The id of this AlarmCommentId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmCommentId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmCommentId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/alarm_comment_info.py b/tb_rest_client/models/models_pe/alarm_comment_info.py new file mode 100644 index 00000000..4233d3ce --- /dev/null +++ b/tb_rest_client/models/models_pe/alarm_comment_info.py @@ -0,0 +1,363 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmCommentInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'AlarmCommentId', + 'created_time': 'int', + 'alarm_id': 'EntityId', + 'user_id': 'UserId', + 'name': 'str', + 'type': 'str', + 'comment': 'JsonNode', + 'email': 'str', + 'first_name': 'str', + 'last_name': 'str' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'alarm_id': 'alarmId', + 'user_id': 'userId', + 'name': 'name', + 'type': 'type', + 'comment': 'comment', + 'email': 'email', + 'first_name': 'firstName', + 'last_name': 'lastName' + } + + def __init__(self, id=None, created_time=None, alarm_id=None, user_id=None, name=None, type=None, comment=None, email=None, first_name=None, last_name=None): # noqa: E501 + """AlarmCommentInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._alarm_id = None + self._user_id = None + self._name = None + self._type = None + self._comment = None + self._email = None + self._first_name = None + self._last_name = None + self.discriminator = None + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if alarm_id is not None: + self.alarm_id = alarm_id + if user_id is not None: + self.user_id = user_id + self.name = name + if type is not None: + self.type = type + if comment is not None: + self.comment = comment + if email is not None: + self.email = email + if first_name is not None: + self.first_name = first_name + if last_name is not None: + self.last_name = last_name + + @property + def id(self): + """Gets the id of this AlarmCommentInfo. # noqa: E501 + + + :return: The id of this AlarmCommentInfo. # noqa: E501 + :rtype: AlarmCommentId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AlarmCommentInfo. + + + :param id: The id of this AlarmCommentInfo. # noqa: E501 + :type: AlarmCommentId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this AlarmCommentInfo. # noqa: E501 + + Timestamp of the alarm comment creation, in milliseconds # noqa: E501 + + :return: The created_time of this AlarmCommentInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this AlarmCommentInfo. + + Timestamp of the alarm comment creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this AlarmCommentInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def alarm_id(self): + """Gets the alarm_id of this AlarmCommentInfo. # noqa: E501 + + + :return: The alarm_id of this AlarmCommentInfo. # noqa: E501 + :rtype: EntityId + """ + return self._alarm_id + + @alarm_id.setter + def alarm_id(self, alarm_id): + """Sets the alarm_id of this AlarmCommentInfo. + + + :param alarm_id: The alarm_id of this AlarmCommentInfo. # noqa: E501 + :type: EntityId + """ + + self._alarm_id = alarm_id + + @property + def user_id(self): + """Gets the user_id of this AlarmCommentInfo. # noqa: E501 + + + :return: The user_id of this AlarmCommentInfo. # noqa: E501 + :rtype: UserId + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AlarmCommentInfo. + + + :param user_id: The user_id of this AlarmCommentInfo. # noqa: E501 + :type: UserId + """ + + self._user_id = user_id + + @property + def name(self): + """Gets the name of this AlarmCommentInfo. # noqa: E501 + + representing comment text # noqa: E501 + + :return: The name of this AlarmCommentInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AlarmCommentInfo. + + representing comment text # noqa: E501 + + :param name: The name of this AlarmCommentInfo. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def type(self): + """Gets the type of this AlarmCommentInfo. # noqa: E501 + + Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user. # noqa: E501 + + :return: The type of this AlarmCommentInfo. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AlarmCommentInfo. + + Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user. # noqa: E501 + + :param type: The type of this AlarmCommentInfo. # noqa: E501 + :type: str + """ + allowed_values = ["OTHER", "SYSTEM"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def comment(self): + """Gets the comment of this AlarmCommentInfo. # noqa: E501 + + + :return: The comment of this AlarmCommentInfo. # noqa: E501 + :rtype: JsonNode + """ + return self._comment + + @comment.setter + def comment(self, comment): + """Sets the comment of this AlarmCommentInfo. + + + :param comment: The comment of this AlarmCommentInfo. # noqa: E501 + :type: JsonNode + """ + + self._comment = comment + + @property + def email(self): + """Gets the email of this AlarmCommentInfo. # noqa: E501 + + User email address # noqa: E501 + + :return: The email of this AlarmCommentInfo. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this AlarmCommentInfo. + + User email address # noqa: E501 + + :param email: The email of this AlarmCommentInfo. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def first_name(self): + """Gets the first_name of this AlarmCommentInfo. # noqa: E501 + + User first name # noqa: E501 + + :return: The first_name of this AlarmCommentInfo. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this AlarmCommentInfo. + + User first name # noqa: E501 + + :param first_name: The first_name of this AlarmCommentInfo. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this AlarmCommentInfo. # noqa: E501 + + User last name # noqa: E501 + + :return: The last_name of this AlarmCommentInfo. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this AlarmCommentInfo. + + User last name # noqa: E501 + + :param last_name: The last_name of this AlarmCommentInfo. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmCommentInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmCommentInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/alarm_comment_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/alarm_comment_notification_rule_trigger_config.py new file mode 100644 index 00000000..3d501597 --- /dev/null +++ b/tb_rest_client/models/models_pe/alarm_comment_notification_rule_trigger_config.py @@ -0,0 +1,260 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmCommentNotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'alarm_severities': 'list[str]', + 'alarm_statuses': 'list[str]', + 'alarm_types': 'list[str]', + 'notify_on_comment_update': 'bool', + 'only_user_comments': 'bool', + 'trigger_type': 'str' + } + + attribute_map = { + 'alarm_severities': 'alarmSeverities', + 'alarm_statuses': 'alarmStatuses', + 'alarm_types': 'alarmTypes', + 'notify_on_comment_update': 'notifyOnCommentUpdate', + 'only_user_comments': 'onlyUserComments', + 'trigger_type': 'triggerType' + } + + def __init__(self, alarm_severities=None, alarm_statuses=None, alarm_types=None, notify_on_comment_update=None, only_user_comments=None, trigger_type=None): # noqa: E501 + """AlarmCommentNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._alarm_severities = None + self._alarm_statuses = None + self._alarm_types = None + self._notify_on_comment_update = None + self._only_user_comments = None + self._trigger_type = None + self.discriminator = None + if alarm_severities is not None: + self.alarm_severities = alarm_severities + if alarm_statuses is not None: + self.alarm_statuses = alarm_statuses + if alarm_types is not None: + self.alarm_types = alarm_types + if notify_on_comment_update is not None: + self.notify_on_comment_update = notify_on_comment_update + if only_user_comments is not None: + self.only_user_comments = only_user_comments + if trigger_type is not None: + self.trigger_type = trigger_type + + @property + def alarm_severities(self): + """Gets the alarm_severities of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_severities of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_severities + + @alarm_severities.setter + def alarm_severities(self, alarm_severities): + """Sets the alarm_severities of this AlarmCommentNotificationRuleTriggerConfig. + + + :param alarm_severities: The alarm_severities of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["CRITICAL", "INDETERMINATE", "MAJOR", "MINOR", "WARNING"] # noqa: E501 + if not set(alarm_severities).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_severities` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_severities) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_severities = alarm_severities + + @property + def alarm_statuses(self): + """Gets the alarm_statuses of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_statuses of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_statuses + + @alarm_statuses.setter + def alarm_statuses(self, alarm_statuses): + """Sets the alarm_statuses of this AlarmCommentNotificationRuleTriggerConfig. + + + :param alarm_statuses: The alarm_statuses of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACK", "ACTIVE", "ANY", "CLEARED", "UNACK"] # noqa: E501 + if not set(alarm_statuses).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_statuses` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_statuses) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_statuses = alarm_statuses + + @property + def alarm_types(self): + """Gets the alarm_types of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_types of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_types + + @alarm_types.setter + def alarm_types(self, alarm_types): + """Sets the alarm_types of this AlarmCommentNotificationRuleTriggerConfig. + + + :param alarm_types: The alarm_types of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._alarm_types = alarm_types + + @property + def notify_on_comment_update(self): + """Gets the notify_on_comment_update of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on_comment_update of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._notify_on_comment_update + + @notify_on_comment_update.setter + def notify_on_comment_update(self, notify_on_comment_update): + """Sets the notify_on_comment_update of this AlarmCommentNotificationRuleTriggerConfig. + + + :param notify_on_comment_update: The notify_on_comment_update of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._notify_on_comment_update = notify_on_comment_update + + @property + def only_user_comments(self): + """Gets the only_user_comments of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The only_user_comments of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._only_user_comments + + @only_user_comments.setter + def only_user_comments(self, only_user_comments): + """Sets the only_user_comments of this AlarmCommentNotificationRuleTriggerConfig. + + + :param only_user_comments: The only_user_comments of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._only_user_comments = only_user_comments + + @property + def trigger_type(self): + """Gets the trigger_type of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this AlarmCommentNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this AlarmCommentNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmCommentNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmCommentNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/alarm_condition.py b/tb_rest_client/models/models_pe/alarm_condition.py index b6ceacb7..c1457515 100644 --- a/tb_rest_client/models/models_pe/alarm_condition.py +++ b/tb_rest_client/models/models_pe/alarm_condition.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmCondition(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/alarm_condition_filter.py b/tb_rest_client/models/models_pe/alarm_condition_filter.py index be18722d..a08db013 100644 --- a/tb_rest_client/models/models_pe/alarm_condition_filter.py +++ b/tb_rest_client/models/models_pe/alarm_condition_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmConditionFilter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/alarm_condition_filter_key.py b/tb_rest_client/models/models_pe/alarm_condition_filter_key.py index a975be0d..3ae5272b 100644 --- a/tb_rest_client/models/models_pe/alarm_condition_filter_key.py +++ b/tb_rest_client/models/models_pe/alarm_condition_filter_key.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmConditionFilterKey(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/alarm_condition_spec.py b/tb_rest_client/models/models_pe/alarm_condition_spec.py index bcbfe91d..8670d035 100644 --- a/tb_rest_client/models/models_pe/alarm_condition_spec.py +++ b/tb_rest_client/models/models_pe/alarm_condition_spec.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmConditionSpec(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/alarm_count_query.py b/tb_rest_client/models/models_pe/alarm_count_query.py new file mode 100644 index 00000000..f9adf446 --- /dev/null +++ b/tb_rest_client/models/models_pe/alarm_count_query.py @@ -0,0 +1,358 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AlarmCountQuery(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assignee_id': 'UserId', + 'end_ts': 'int', + 'entity_filter': 'EntityFilter', + 'key_filters': 'list[KeyFilter]', + 'search_propagated_alarms': 'bool', + 'severity_list': 'list[str]', + 'start_ts': 'int', + 'status_list': 'list[str]', + 'time_window': 'int', + 'type_list': 'list[str]' + } + + attribute_map = { + 'assignee_id': 'assigneeId', + 'end_ts': 'endTs', + 'entity_filter': 'entityFilter', + 'key_filters': 'keyFilters', + 'search_propagated_alarms': 'searchPropagatedAlarms', + 'severity_list': 'severityList', + 'start_ts': 'startTs', + 'status_list': 'statusList', + 'time_window': 'timeWindow', + 'type_list': 'typeList' + } + + def __init__(self, assignee_id=None, end_ts=None, entity_filter=None, key_filters=None, search_propagated_alarms=None, severity_list=None, start_ts=None, status_list=None, time_window=None, type_list=None): # noqa: E501 + """AlarmCountQuery - a model defined in Swagger""" # noqa: E501 + self._assignee_id = None + self._end_ts = None + self._entity_filter = None + self._key_filters = None + self._search_propagated_alarms = None + self._severity_list = None + self._start_ts = None + self._status_list = None + self._time_window = None + self._type_list = None + self.discriminator = None + if assignee_id is not None: + self.assignee_id = assignee_id + if end_ts is not None: + self.end_ts = end_ts + if entity_filter is not None: + self.entity_filter = entity_filter + if key_filters is not None: + self.key_filters = key_filters + if search_propagated_alarms is not None: + self.search_propagated_alarms = search_propagated_alarms + if severity_list is not None: + self.severity_list = severity_list + if start_ts is not None: + self.start_ts = start_ts + if status_list is not None: + self.status_list = status_list + if time_window is not None: + self.time_window = time_window + if type_list is not None: + self.type_list = type_list + + @property + def assignee_id(self): + """Gets the assignee_id of this AlarmCountQuery. # noqa: E501 + + + :return: The assignee_id of this AlarmCountQuery. # noqa: E501 + :rtype: UserId + """ + return self._assignee_id + + @assignee_id.setter + def assignee_id(self, assignee_id): + """Sets the assignee_id of this AlarmCountQuery. + + + :param assignee_id: The assignee_id of this AlarmCountQuery. # noqa: E501 + :type: UserId + """ + + self._assignee_id = assignee_id + + @property + def end_ts(self): + """Gets the end_ts of this AlarmCountQuery. # noqa: E501 + + + :return: The end_ts of this AlarmCountQuery. # noqa: E501 + :rtype: int + """ + return self._end_ts + + @end_ts.setter + def end_ts(self, end_ts): + """Sets the end_ts of this AlarmCountQuery. + + + :param end_ts: The end_ts of this AlarmCountQuery. # noqa: E501 + :type: int + """ + + self._end_ts = end_ts + + @property + def entity_filter(self): + """Gets the entity_filter of this AlarmCountQuery. # noqa: E501 + + + :return: The entity_filter of this AlarmCountQuery. # noqa: E501 + :rtype: EntityFilter + """ + return self._entity_filter + + @entity_filter.setter + def entity_filter(self, entity_filter): + """Sets the entity_filter of this AlarmCountQuery. + + + :param entity_filter: The entity_filter of this AlarmCountQuery. # noqa: E501 + :type: EntityFilter + """ + + self._entity_filter = entity_filter + + @property + def key_filters(self): + """Gets the key_filters of this AlarmCountQuery. # noqa: E501 + + + :return: The key_filters of this AlarmCountQuery. # noqa: E501 + :rtype: list[KeyFilter] + """ + return self._key_filters + + @key_filters.setter + def key_filters(self, key_filters): + """Sets the key_filters of this AlarmCountQuery. + + + :param key_filters: The key_filters of this AlarmCountQuery. # noqa: E501 + :type: list[KeyFilter] + """ + + self._key_filters = key_filters + + @property + def search_propagated_alarms(self): + """Gets the search_propagated_alarms of this AlarmCountQuery. # noqa: E501 + + + :return: The search_propagated_alarms of this AlarmCountQuery. # noqa: E501 + :rtype: bool + """ + return self._search_propagated_alarms + + @search_propagated_alarms.setter + def search_propagated_alarms(self, search_propagated_alarms): + """Sets the search_propagated_alarms of this AlarmCountQuery. + + + :param search_propagated_alarms: The search_propagated_alarms of this AlarmCountQuery. # noqa: E501 + :type: bool + """ + + self._search_propagated_alarms = search_propagated_alarms + + @property + def severity_list(self): + """Gets the severity_list of this AlarmCountQuery. # noqa: E501 + + + :return: The severity_list of this AlarmCountQuery. # noqa: E501 + :rtype: list[str] + """ + return self._severity_list + + @severity_list.setter + def severity_list(self, severity_list): + """Sets the severity_list of this AlarmCountQuery. + + + :param severity_list: The severity_list of this AlarmCountQuery. # noqa: E501 + :type: list[str] + """ + allowed_values = ["CRITICAL", "INDETERMINATE", "MAJOR", "MINOR", "WARNING"] # noqa: E501 + if not set(severity_list).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `severity_list` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(severity_list) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._severity_list = severity_list + + @property + def start_ts(self): + """Gets the start_ts of this AlarmCountQuery. # noqa: E501 + + + :return: The start_ts of this AlarmCountQuery. # noqa: E501 + :rtype: int + """ + return self._start_ts + + @start_ts.setter + def start_ts(self, start_ts): + """Sets the start_ts of this AlarmCountQuery. + + + :param start_ts: The start_ts of this AlarmCountQuery. # noqa: E501 + :type: int + """ + + self._start_ts = start_ts + + @property + def status_list(self): + """Gets the status_list of this AlarmCountQuery. # noqa: E501 + + + :return: The status_list of this AlarmCountQuery. # noqa: E501 + :rtype: list[str] + """ + return self._status_list + + @status_list.setter + def status_list(self, status_list): + """Sets the status_list of this AlarmCountQuery. + + + :param status_list: The status_list of this AlarmCountQuery. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACK", "ACTIVE", "ANY", "CLEARED", "UNACK"] # noqa: E501 + if not set(status_list).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `status_list` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(status_list) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._status_list = status_list + + @property + def time_window(self): + """Gets the time_window of this AlarmCountQuery. # noqa: E501 + + + :return: The time_window of this AlarmCountQuery. # noqa: E501 + :rtype: int + """ + return self._time_window + + @time_window.setter + def time_window(self, time_window): + """Sets the time_window of this AlarmCountQuery. + + + :param time_window: The time_window of this AlarmCountQuery. # noqa: E501 + :type: int + """ + + self._time_window = time_window + + @property + def type_list(self): + """Gets the type_list of this AlarmCountQuery. # noqa: E501 + + + :return: The type_list of this AlarmCountQuery. # noqa: E501 + :rtype: list[str] + """ + return self._type_list + + @type_list.setter + def type_list(self, type_list): + """Sets the type_list of this AlarmCountQuery. + + + :param type_list: The type_list of this AlarmCountQuery. # noqa: E501 + :type: list[str] + """ + + self._type_list = type_list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmCountQuery, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmCountQuery): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/alarm_data.py b/tb_rest_client/models/models_pe/alarm_data.py index 079ca5b9..b27cf192 100644 --- a/tb_rest_client/models/models_pe/alarm_data.py +++ b/tb_rest_client/models/models_pe/alarm_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -38,18 +38,24 @@ class AlarmData(object): 'type': 'str', 'originator': 'EntityId', 'severity': 'str', - 'status': 'str', + 'acknowledged': 'bool', + 'cleared': 'bool', + 'assignee_id': 'UserId', 'start_ts': 'int', 'end_ts': 'int', 'ack_ts': 'int', 'clear_ts': 'int', + 'assign_ts': 'int', 'details': 'JsonNode', - 'propagate': 'bool', - 'propagate_to_owner': 'bool', 'propagate_to_owner_hierarchy': 'bool', + 'propagate': 'bool', 'propagate_to_tenant': 'bool', 'propagate_relation_types': 'list[str]', - 'originator_name': 'str' + 'propagate_to_owner': 'bool', + 'originator_name': 'str', + 'originator_label': 'str', + 'assignee': 'AlarmAssignee', + 'status': 'str' } attribute_map = { @@ -63,21 +69,27 @@ class AlarmData(object): 'type': 'type', 'originator': 'originator', 'severity': 'severity', - 'status': 'status', + 'acknowledged': 'acknowledged', + 'cleared': 'cleared', + 'assignee_id': 'assigneeId', 'start_ts': 'startTs', 'end_ts': 'endTs', 'ack_ts': 'ackTs', 'clear_ts': 'clearTs', + 'assign_ts': 'assignTs', 'details': 'details', - 'propagate': 'propagate', - 'propagate_to_owner': 'propagateToOwner', 'propagate_to_owner_hierarchy': 'propagateToOwnerHierarchy', + 'propagate': 'propagate', 'propagate_to_tenant': 'propagateToTenant', 'propagate_relation_types': 'propagateRelationTypes', - 'originator_name': 'originatorName' + 'propagate_to_owner': 'propagateToOwner', + 'originator_name': 'originatorName', + 'originator_label': 'originatorLabel', + 'assignee': 'assignee', + 'status': 'status' } - def __init__(self, entity_id=None, latest=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, status=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, details=None, propagate=None, propagate_to_owner=None, propagate_to_owner_hierarchy=None, propagate_to_tenant=None, propagate_relation_types=None, originator_name=None): # noqa: E501 + def __init__(self, entity_id=None, latest=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, acknowledged=None, cleared=None, assignee_id=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, assign_ts=None, details=None, propagate_to_owner_hierarchy=None, propagate=None, propagate_to_tenant=None, propagate_relation_types=None, propagate_to_owner=None, originator_name=None, originator_label=None, assignee=None, status=None): # noqa: E501 """AlarmData - a model defined in Swagger""" # noqa: E501 self._entity_id = None self._latest = None @@ -89,18 +101,24 @@ def __init__(self, entity_id=None, latest=None, id=None, created_time=None, tena self._type = None self._originator = None self._severity = None - self._status = None + self._acknowledged = None + self._cleared = None + self._assignee_id = None self._start_ts = None self._end_ts = None self._ack_ts = None self._clear_ts = None + self._assign_ts = None self._details = None - self._propagate = None - self._propagate_to_owner = None self._propagate_to_owner_hierarchy = None + self._propagate = None self._propagate_to_tenant = None self._propagate_relation_types = None + self._propagate_to_owner = None self._originator_name = None + self._originator_label = None + self._assignee = None + self._status = None self.discriminator = None if entity_id is not None: self.entity_id = entity_id @@ -118,7 +136,10 @@ def __init__(self, entity_id=None, latest=None, id=None, created_time=None, tena self.type = type self.originator = originator self.severity = severity - self.status = status + self.acknowledged = acknowledged + self.cleared = cleared + if assignee_id is not None: + self.assignee_id = assignee_id if start_ts is not None: self.start_ts = start_ts if end_ts is not None: @@ -127,20 +148,27 @@ def __init__(self, entity_id=None, latest=None, id=None, created_time=None, tena self.ack_ts = ack_ts if clear_ts is not None: self.clear_ts = clear_ts + if assign_ts is not None: + self.assign_ts = assign_ts if details is not None: self.details = details - if propagate is not None: - self.propagate = propagate - if propagate_to_owner is not None: - self.propagate_to_owner = propagate_to_owner if propagate_to_owner_hierarchy is not None: self.propagate_to_owner_hierarchy = propagate_to_owner_hierarchy + if propagate is not None: + self.propagate = propagate if propagate_to_tenant is not None: self.propagate_to_tenant = propagate_to_tenant if propagate_relation_types is not None: self.propagate_relation_types = propagate_relation_types + if propagate_to_owner is not None: + self.propagate_to_owner = propagate_to_owner if originator_name is not None: self.originator_name = originator_name + if originator_label is not None: + self.originator_label = originator_label + if assignee is not None: + self.assignee = assignee + self.status = status @property def entity_id(self): @@ -375,35 +403,75 @@ def severity(self, severity): self._severity = severity @property - def status(self): - """Gets the status of this AlarmData. # noqa: E501 + def acknowledged(self): + """Gets the acknowledged of this AlarmData. # noqa: E501 - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :return: The status of this AlarmData. # noqa: E501 - :rtype: str + :return: The acknowledged of this AlarmData. # noqa: E501 + :rtype: bool """ - return self._status + return self._acknowledged - @status.setter - def status(self, status): - """Sets the status of this AlarmData. + @acknowledged.setter + def acknowledged(self, acknowledged): + """Sets the acknowledged of this AlarmData. - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :param status: The status of this AlarmData. # noqa: E501 - :type: str + :param acknowledged: The acknowledged of this AlarmData. # noqa: E501 + :type: bool """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) + if acknowledged is None: + raise ValueError("Invalid value for `acknowledged`, must not be `None`") # noqa: E501 - self._status = status + self._acknowledged = acknowledged + + @property + def cleared(self): + """Gets the cleared of this AlarmData. # noqa: E501 + + Cleared # noqa: E501 + + :return: The cleared of this AlarmData. # noqa: E501 + :rtype: bool + """ + return self._cleared + + @cleared.setter + def cleared(self, cleared): + """Sets the cleared of this AlarmData. + + Cleared # noqa: E501 + + :param cleared: The cleared of this AlarmData. # noqa: E501 + :type: bool + """ + if cleared is None: + raise ValueError("Invalid value for `cleared`, must not be `None`") # noqa: E501 + + self._cleared = cleared + + @property + def assignee_id(self): + """Gets the assignee_id of this AlarmData. # noqa: E501 + + + :return: The assignee_id of this AlarmData. # noqa: E501 + :rtype: UserId + """ + return self._assignee_id + + @assignee_id.setter + def assignee_id(self, assignee_id): + """Sets the assignee_id of this AlarmData. + + + :param assignee_id: The assignee_id of this AlarmData. # noqa: E501 + :type: UserId + """ + + self._assignee_id = assignee_id @property def start_ts(self): @@ -497,6 +565,29 @@ def clear_ts(self, clear_ts): self._clear_ts = clear_ts + @property + def assign_ts(self): + """Gets the assign_ts of this AlarmData. # noqa: E501 + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :return: The assign_ts of this AlarmData. # noqa: E501 + :rtype: int + """ + return self._assign_ts + + @assign_ts.setter + def assign_ts(self, assign_ts): + """Sets the assign_ts of this AlarmData. + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :param assign_ts: The assign_ts of this AlarmData. # noqa: E501 + :type: int + """ + + self._assign_ts = assign_ts + @property def details(self): """Gets the details of this AlarmData. # noqa: E501 @@ -519,73 +610,50 @@ def details(self, details): self._details = details @property - def propagate(self): - """Gets the propagate of this AlarmData. # noqa: E501 - - Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - - :return: The propagate of this AlarmData. # noqa: E501 - :rtype: bool - """ - return self._propagate - - @propagate.setter - def propagate(self, propagate): - """Sets the propagate of this AlarmData. - - Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - - :param propagate: The propagate of this AlarmData. # noqa: E501 - :type: bool - """ - - self._propagate = propagate - - @property - def propagate_to_owner(self): - """Gets the propagate_to_owner of this AlarmData. # noqa: E501 + def propagate_to_owner_hierarchy(self): + """Gets the propagate_to_owner_hierarchy of this AlarmData. # noqa: E501 - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 - :return: The propagate_to_owner of this AlarmData. # noqa: E501 + :return: The propagate_to_owner_hierarchy of this AlarmData. # noqa: E501 :rtype: bool """ - return self._propagate_to_owner + return self._propagate_to_owner_hierarchy - @propagate_to_owner.setter - def propagate_to_owner(self, propagate_to_owner): - """Sets the propagate_to_owner of this AlarmData. + @propagate_to_owner_hierarchy.setter + def propagate_to_owner_hierarchy(self, propagate_to_owner_hierarchy): + """Sets the propagate_to_owner_hierarchy of this AlarmData. - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 - :param propagate_to_owner: The propagate_to_owner of this AlarmData. # noqa: E501 + :param propagate_to_owner_hierarchy: The propagate_to_owner_hierarchy of this AlarmData. # noqa: E501 :type: bool """ - self._propagate_to_owner = propagate_to_owner + self._propagate_to_owner_hierarchy = propagate_to_owner_hierarchy @property - def propagate_to_owner_hierarchy(self): - """Gets the propagate_to_owner_hierarchy of this AlarmData. # noqa: E501 + def propagate(self): + """Gets the propagate of this AlarmData. # noqa: E501 - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 + Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - :return: The propagate_to_owner_hierarchy of this AlarmData. # noqa: E501 + :return: The propagate of this AlarmData. # noqa: E501 :rtype: bool """ - return self._propagate_to_owner_hierarchy + return self._propagate - @propagate_to_owner_hierarchy.setter - def propagate_to_owner_hierarchy(self, propagate_to_owner_hierarchy): - """Sets the propagate_to_owner_hierarchy of this AlarmData. + @propagate.setter + def propagate(self, propagate): + """Sets the propagate of this AlarmData. - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 + Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - :param propagate_to_owner_hierarchy: The propagate_to_owner_hierarchy of this AlarmData. # noqa: E501 + :param propagate: The propagate of this AlarmData. # noqa: E501 :type: bool """ - self._propagate_to_owner_hierarchy = propagate_to_owner_hierarchy + self._propagate = propagate @property def propagate_to_tenant(self): @@ -633,6 +701,29 @@ def propagate_relation_types(self, propagate_relation_types): self._propagate_relation_types = propagate_relation_types + @property + def propagate_to_owner(self): + """Gets the propagate_to_owner of this AlarmData. # noqa: E501 + + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + + :return: The propagate_to_owner of this AlarmData. # noqa: E501 + :rtype: bool + """ + return self._propagate_to_owner + + @propagate_to_owner.setter + def propagate_to_owner(self, propagate_to_owner): + """Sets the propagate_to_owner of this AlarmData. + + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + + :param propagate_to_owner: The propagate_to_owner of this AlarmData. # noqa: E501 + :type: bool + """ + + self._propagate_to_owner = propagate_to_owner + @property def originator_name(self): """Gets the originator_name of this AlarmData. # noqa: E501 @@ -656,6 +747,81 @@ def originator_name(self, originator_name): self._originator_name = originator_name + @property + def originator_label(self): + """Gets the originator_label of this AlarmData. # noqa: E501 + + Alarm originator label # noqa: E501 + + :return: The originator_label of this AlarmData. # noqa: E501 + :rtype: str + """ + return self._originator_label + + @originator_label.setter + def originator_label(self, originator_label): + """Sets the originator_label of this AlarmData. + + Alarm originator label # noqa: E501 + + :param originator_label: The originator_label of this AlarmData. # noqa: E501 + :type: str + """ + + self._originator_label = originator_label + + @property + def assignee(self): + """Gets the assignee of this AlarmData. # noqa: E501 + + + :return: The assignee of this AlarmData. # noqa: E501 + :rtype: AlarmAssignee + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this AlarmData. + + + :param assignee: The assignee of this AlarmData. # noqa: E501 + :type: AlarmAssignee + """ + + self._assignee = assignee + + @property + def status(self): + """Gets the status of this AlarmData. # noqa: E501 + + status of the Alarm # noqa: E501 + + :return: The status of this AlarmData. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this AlarmData. + + status of the Alarm # noqa: E501 + + :param status: The status of this AlarmData. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_pe/alarm_data_page_link.py b/tb_rest_client/models/models_pe/alarm_data_page_link.py index 190dae69..6b48cb2b 100644 --- a/tb_rest_client/models/models_pe/alarm_data_page_link.py +++ b/tb_rest_client/models/models_pe/alarm_data_page_link.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmDataPageLink(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,6 +28,7 @@ class AlarmDataPageLink(object): and the value is json key in definition. """ swagger_types = { + 'assignee_id': 'UserId', 'dynamic': 'bool', 'end_ts': 'int', 'page': 'int', @@ -43,6 +44,7 @@ class AlarmDataPageLink(object): } attribute_map = { + 'assignee_id': 'assigneeId', 'dynamic': 'dynamic', 'end_ts': 'endTs', 'page': 'page', @@ -57,8 +59,9 @@ class AlarmDataPageLink(object): 'type_list': 'typeList' } - def __init__(self, dynamic=None, end_ts=None, page=None, page_size=None, search_propagated_alarms=None, severity_list=None, sort_order=None, start_ts=None, status_list=None, text_search=None, time_window=None, type_list=None): # noqa: E501 + def __init__(self, assignee_id=None, dynamic=None, end_ts=None, page=None, page_size=None, search_propagated_alarms=None, severity_list=None, sort_order=None, start_ts=None, status_list=None, text_search=None, time_window=None, type_list=None): # noqa: E501 """AlarmDataPageLink - a model defined in Swagger""" # noqa: E501 + self._assignee_id = None self._dynamic = None self._end_ts = None self._page = None @@ -72,6 +75,8 @@ def __init__(self, dynamic=None, end_ts=None, page=None, page_size=None, search_ self._time_window = None self._type_list = None self.discriminator = None + if assignee_id is not None: + self.assignee_id = assignee_id if dynamic is not None: self.dynamic = dynamic if end_ts is not None: @@ -97,6 +102,27 @@ def __init__(self, dynamic=None, end_ts=None, page=None, page_size=None, search_ if type_list is not None: self.type_list = type_list + @property + def assignee_id(self): + """Gets the assignee_id of this AlarmDataPageLink. # noqa: E501 + + + :return: The assignee_id of this AlarmDataPageLink. # noqa: E501 + :rtype: UserId + """ + return self._assignee_id + + @assignee_id.setter + def assignee_id(self, assignee_id): + """Sets the assignee_id of this AlarmDataPageLink. + + + :param assignee_id: The assignee_id of this AlarmDataPageLink. # noqa: E501 + :type: UserId + """ + + self._assignee_id = assignee_id + @property def dynamic(self): """Gets the dynamic of this AlarmDataPageLink. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/alarm_data_query.py b/tb_rest_client/models/models_pe/alarm_data_query.py index 6031971c..0e0ee510 100644 --- a/tb_rest_client/models/models_pe/alarm_data_query.py +++ b/tb_rest_client/models/models_pe/alarm_data_query.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmDataQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/alarm_id.py b/tb_rest_client/models/models_pe/alarm_id.py index fa764d87..fa3e3512 100644 --- a/tb_rest_client/models/models_pe/alarm_id.py +++ b/tb_rest_client/models/models_pe/alarm_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/alarm_info.py b/tb_rest_client/models/models_pe/alarm_info.py index 7c513665..c460c04c 100644 --- a/tb_rest_client/models/models_pe/alarm_info.py +++ b/tb_rest_client/models/models_pe/alarm_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -36,18 +36,24 @@ class AlarmInfo(object): 'type': 'str', 'originator': 'EntityId', 'severity': 'str', - 'status': 'str', + 'acknowledged': 'bool', + 'cleared': 'bool', + 'assignee_id': 'UserId', 'start_ts': 'int', 'end_ts': 'int', 'ack_ts': 'int', 'clear_ts': 'int', + 'assign_ts': 'int', 'details': 'JsonNode', - 'propagate': 'bool', - 'propagate_to_owner': 'bool', 'propagate_to_owner_hierarchy': 'bool', + 'propagate': 'bool', 'propagate_to_tenant': 'bool', 'propagate_relation_types': 'list[str]', - 'originator_name': 'str' + 'propagate_to_owner': 'bool', + 'originator_name': 'str', + 'originator_label': 'str', + 'assignee': 'AlarmAssignee', + 'status': 'str' } attribute_map = { @@ -59,21 +65,27 @@ class AlarmInfo(object): 'type': 'type', 'originator': 'originator', 'severity': 'severity', - 'status': 'status', + 'acknowledged': 'acknowledged', + 'cleared': 'cleared', + 'assignee_id': 'assigneeId', 'start_ts': 'startTs', 'end_ts': 'endTs', 'ack_ts': 'ackTs', 'clear_ts': 'clearTs', + 'assign_ts': 'assignTs', 'details': 'details', - 'propagate': 'propagate', - 'propagate_to_owner': 'propagateToOwner', 'propagate_to_owner_hierarchy': 'propagateToOwnerHierarchy', + 'propagate': 'propagate', 'propagate_to_tenant': 'propagateToTenant', 'propagate_relation_types': 'propagateRelationTypes', - 'originator_name': 'originatorName' + 'propagate_to_owner': 'propagateToOwner', + 'originator_name': 'originatorName', + 'originator_label': 'originatorLabel', + 'assignee': 'assignee', + 'status': 'status' } - def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, status=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, details=None, propagate=None, propagate_to_owner=None, propagate_to_owner_hierarchy=None, propagate_to_tenant=None, propagate_relation_types=None, originator_name=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, originator=None, severity=None, acknowledged=None, cleared=None, assignee_id=None, start_ts=None, end_ts=None, ack_ts=None, clear_ts=None, assign_ts=None, details=None, propagate_to_owner_hierarchy=None, propagate=None, propagate_to_tenant=None, propagate_relation_types=None, propagate_to_owner=None, originator_name=None, originator_label=None, assignee=None, status=None): # noqa: E501 """AlarmInfo - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None @@ -83,18 +95,24 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self._type = None self._originator = None self._severity = None - self._status = None + self._acknowledged = None + self._cleared = None + self._assignee_id = None self._start_ts = None self._end_ts = None self._ack_ts = None self._clear_ts = None + self._assign_ts = None self._details = None - self._propagate = None - self._propagate_to_owner = None self._propagate_to_owner_hierarchy = None + self._propagate = None self._propagate_to_tenant = None self._propagate_relation_types = None + self._propagate_to_owner = None self._originator_name = None + self._originator_label = None + self._assignee = None + self._status = None self.discriminator = None if id is not None: self.id = id @@ -108,7 +126,10 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.type = type self.originator = originator self.severity = severity - self.status = status + self.acknowledged = acknowledged + self.cleared = cleared + if assignee_id is not None: + self.assignee_id = assignee_id if start_ts is not None: self.start_ts = start_ts if end_ts is not None: @@ -117,20 +138,27 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.ack_ts = ack_ts if clear_ts is not None: self.clear_ts = clear_ts + if assign_ts is not None: + self.assign_ts = assign_ts if details is not None: self.details = details - if propagate is not None: - self.propagate = propagate - if propagate_to_owner is not None: - self.propagate_to_owner = propagate_to_owner if propagate_to_owner_hierarchy is not None: self.propagate_to_owner_hierarchy = propagate_to_owner_hierarchy + if propagate is not None: + self.propagate = propagate if propagate_to_tenant is not None: self.propagate_to_tenant = propagate_to_tenant if propagate_relation_types is not None: self.propagate_relation_types = propagate_relation_types + if propagate_to_owner is not None: + self.propagate_to_owner = propagate_to_owner if originator_name is not None: self.originator_name = originator_name + if originator_label is not None: + self.originator_label = originator_label + if assignee is not None: + self.assignee = assignee + self.status = status @property def id(self): @@ -323,35 +351,75 @@ def severity(self, severity): self._severity = severity @property - def status(self): - """Gets the status of this AlarmInfo. # noqa: E501 + def acknowledged(self): + """Gets the acknowledged of this AlarmInfo. # noqa: E501 - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :return: The status of this AlarmInfo. # noqa: E501 - :rtype: str + :return: The acknowledged of this AlarmInfo. # noqa: E501 + :rtype: bool """ - return self._status + return self._acknowledged - @status.setter - def status(self, status): - """Sets the status of this AlarmInfo. + @acknowledged.setter + def acknowledged(self, acknowledged): + """Sets the acknowledged of this AlarmInfo. - Alarm status # noqa: E501 + Acknowledged # noqa: E501 - :param status: The status of this AlarmInfo. # noqa: E501 - :type: str + :param acknowledged: The acknowledged of this AlarmInfo. # noqa: E501 + :type: bool """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) + if acknowledged is None: + raise ValueError("Invalid value for `acknowledged`, must not be `None`") # noqa: E501 - self._status = status + self._acknowledged = acknowledged + + @property + def cleared(self): + """Gets the cleared of this AlarmInfo. # noqa: E501 + + Cleared # noqa: E501 + + :return: The cleared of this AlarmInfo. # noqa: E501 + :rtype: bool + """ + return self._cleared + + @cleared.setter + def cleared(self, cleared): + """Sets the cleared of this AlarmInfo. + + Cleared # noqa: E501 + + :param cleared: The cleared of this AlarmInfo. # noqa: E501 + :type: bool + """ + if cleared is None: + raise ValueError("Invalid value for `cleared`, must not be `None`") # noqa: E501 + + self._cleared = cleared + + @property + def assignee_id(self): + """Gets the assignee_id of this AlarmInfo. # noqa: E501 + + + :return: The assignee_id of this AlarmInfo. # noqa: E501 + :rtype: UserId + """ + return self._assignee_id + + @assignee_id.setter + def assignee_id(self, assignee_id): + """Sets the assignee_id of this AlarmInfo. + + + :param assignee_id: The assignee_id of this AlarmInfo. # noqa: E501 + :type: UserId + """ + + self._assignee_id = assignee_id @property def start_ts(self): @@ -445,6 +513,29 @@ def clear_ts(self, clear_ts): self._clear_ts = clear_ts + @property + def assign_ts(self): + """Gets the assign_ts of this AlarmInfo. # noqa: E501 + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :return: The assign_ts of this AlarmInfo. # noqa: E501 + :rtype: int + """ + return self._assign_ts + + @assign_ts.setter + def assign_ts(self, assign_ts): + """Sets the assign_ts of this AlarmInfo. + + Timestamp of the alarm assignment, in milliseconds # noqa: E501 + + :param assign_ts: The assign_ts of this AlarmInfo. # noqa: E501 + :type: int + """ + + self._assign_ts = assign_ts + @property def details(self): """Gets the details of this AlarmInfo. # noqa: E501 @@ -467,73 +558,50 @@ def details(self, details): self._details = details @property - def propagate(self): - """Gets the propagate of this AlarmInfo. # noqa: E501 - - Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - - :return: The propagate of this AlarmInfo. # noqa: E501 - :rtype: bool - """ - return self._propagate - - @propagate.setter - def propagate(self, propagate): - """Sets the propagate of this AlarmInfo. - - Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - - :param propagate: The propagate of this AlarmInfo. # noqa: E501 - :type: bool - """ - - self._propagate = propagate - - @property - def propagate_to_owner(self): - """Gets the propagate_to_owner of this AlarmInfo. # noqa: E501 + def propagate_to_owner_hierarchy(self): + """Gets the propagate_to_owner_hierarchy of this AlarmInfo. # noqa: E501 - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 - :return: The propagate_to_owner of this AlarmInfo. # noqa: E501 + :return: The propagate_to_owner_hierarchy of this AlarmInfo. # noqa: E501 :rtype: bool """ - return self._propagate_to_owner + return self._propagate_to_owner_hierarchy - @propagate_to_owner.setter - def propagate_to_owner(self, propagate_to_owner): - """Sets the propagate_to_owner of this AlarmInfo. + @propagate_to_owner_hierarchy.setter + def propagate_to_owner_hierarchy(self, propagate_to_owner_hierarchy): + """Sets the propagate_to_owner_hierarchy of this AlarmInfo. - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 - :param propagate_to_owner: The propagate_to_owner of this AlarmInfo. # noqa: E501 + :param propagate_to_owner_hierarchy: The propagate_to_owner_hierarchy of this AlarmInfo. # noqa: E501 :type: bool """ - self._propagate_to_owner = propagate_to_owner + self._propagate_to_owner_hierarchy = propagate_to_owner_hierarchy @property - def propagate_to_owner_hierarchy(self): - """Gets the propagate_to_owner_hierarchy of this AlarmInfo. # noqa: E501 + def propagate(self): + """Gets the propagate of this AlarmInfo. # noqa: E501 - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 + Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - :return: The propagate_to_owner_hierarchy of this AlarmInfo. # noqa: E501 + :return: The propagate of this AlarmInfo. # noqa: E501 :rtype: bool """ - return self._propagate_to_owner_hierarchy + return self._propagate - @propagate_to_owner_hierarchy.setter - def propagate_to_owner_hierarchy(self, propagate_to_owner_hierarchy): - """Sets the propagate_to_owner_hierarchy of this AlarmInfo. + @propagate.setter + def propagate(self, propagate): + """Sets the propagate of this AlarmInfo. - Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy # noqa: E501 + Propagation flag to specify if alarm should be propagated to parent entities of alarm originator # noqa: E501 - :param propagate_to_owner_hierarchy: The propagate_to_owner_hierarchy of this AlarmInfo. # noqa: E501 + :param propagate: The propagate of this AlarmInfo. # noqa: E501 :type: bool """ - self._propagate_to_owner_hierarchy = propagate_to_owner_hierarchy + self._propagate = propagate @property def propagate_to_tenant(self): @@ -581,6 +649,29 @@ def propagate_relation_types(self, propagate_relation_types): self._propagate_relation_types = propagate_relation_types + @property + def propagate_to_owner(self): + """Gets the propagate_to_owner of this AlarmInfo. # noqa: E501 + + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + + :return: The propagate_to_owner of this AlarmInfo. # noqa: E501 + :rtype: bool + """ + return self._propagate_to_owner + + @propagate_to_owner.setter + def propagate_to_owner(self, propagate_to_owner): + """Sets the propagate_to_owner of this AlarmInfo. + + Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator # noqa: E501 + + :param propagate_to_owner: The propagate_to_owner of this AlarmInfo. # noqa: E501 + :type: bool + """ + + self._propagate_to_owner = propagate_to_owner + @property def originator_name(self): """Gets the originator_name of this AlarmInfo. # noqa: E501 @@ -604,6 +695,81 @@ def originator_name(self, originator_name): self._originator_name = originator_name + @property + def originator_label(self): + """Gets the originator_label of this AlarmInfo. # noqa: E501 + + Alarm originator label # noqa: E501 + + :return: The originator_label of this AlarmInfo. # noqa: E501 + :rtype: str + """ + return self._originator_label + + @originator_label.setter + def originator_label(self, originator_label): + """Sets the originator_label of this AlarmInfo. + + Alarm originator label # noqa: E501 + + :param originator_label: The originator_label of this AlarmInfo. # noqa: E501 + :type: str + """ + + self._originator_label = originator_label + + @property + def assignee(self): + """Gets the assignee of this AlarmInfo. # noqa: E501 + + + :return: The assignee of this AlarmInfo. # noqa: E501 + :rtype: AlarmAssignee + """ + return self._assignee + + @assignee.setter + def assignee(self, assignee): + """Sets the assignee of this AlarmInfo. + + + :param assignee: The assignee of this AlarmInfo. # noqa: E501 + :type: AlarmAssignee + """ + + self._assignee = assignee + + @property + def status(self): + """Gets the status of this AlarmInfo. # noqa: E501 + + status of the Alarm # noqa: E501 + + :return: The status of this AlarmInfo. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this AlarmInfo. + + status of the Alarm # noqa: E501 + + :param status: The status of this AlarmInfo. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["ACTIVE_ACK", "ACTIVE_UNACK", "CLEARED_ACK", "CLEARED_UNACK"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_pe/alarm_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/alarm_notification_rule_trigger_config.py new file mode 100644 index 00000000..ad6e080f --- /dev/null +++ b/tb_rest_client/models/models_pe/alarm_notification_rule_trigger_config.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 + +class AlarmNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'alarm_severities': 'list[str]', + 'alarm_types': 'list[str]', + 'clear_rule': 'ClearRule', + 'notify_on': 'list[str]', + 'trigger_type': 'str' + } + if hasattr(NotificationRuleTriggerConfig, "swagger_types"): + swagger_types.update(NotificationRuleTriggerConfig.swagger_types) + + attribute_map = { + 'alarm_severities': 'alarmSeverities', + 'alarm_types': 'alarmTypes', + 'clear_rule': 'clearRule', + 'notify_on': 'notifyOn', + 'trigger_type': 'triggerType' + } + if hasattr(NotificationRuleTriggerConfig, "attribute_map"): + attribute_map.update(NotificationRuleTriggerConfig.attribute_map) + + def __init__(self, alarm_severities=None, alarm_types=None, clear_rule=None, notify_on=None, trigger_type=None, *args, **kwargs): # noqa: E501 + """AlarmNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._alarm_severities = None + self._alarm_types = None + self._clear_rule = None + self._notify_on = None + self._trigger_type = None + self.discriminator = None + if alarm_severities is not None: + self.alarm_severities = alarm_severities + if alarm_types is not None: + self.alarm_types = alarm_types + if clear_rule is not None: + self.clear_rule = clear_rule + if notify_on is not None: + self.notify_on = notify_on + if trigger_type is not None: + self.trigger_type = trigger_type + NotificationRuleTriggerConfig.__init__(self, *args, **kwargs) + + @property + def alarm_severities(self): + """Gets the alarm_severities of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_severities of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_severities + + @alarm_severities.setter + def alarm_severities(self, alarm_severities): + """Sets the alarm_severities of this AlarmNotificationRuleTriggerConfig. + + + :param alarm_severities: The alarm_severities of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["CRITICAL", "INDETERMINATE", "MAJOR", "MINOR", "WARNING"] # noqa: E501 + if not set(alarm_severities).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_severities` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_severities) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_severities = alarm_severities + + @property + def alarm_types(self): + """Gets the alarm_types of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The alarm_types of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_types + + @alarm_types.setter + def alarm_types(self, alarm_types): + """Sets the alarm_types of this AlarmNotificationRuleTriggerConfig. + + + :param alarm_types: The alarm_types of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._alarm_types = alarm_types + + @property + def clear_rule(self): + """Gets the clear_rule of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The clear_rule of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :rtype: ClearRule + """ + return self._clear_rule + + @clear_rule.setter + def clear_rule(self, clear_rule): + """Sets the clear_rule of this AlarmNotificationRuleTriggerConfig. + + + :param clear_rule: The clear_rule of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :type: ClearRule + """ + + self._clear_rule = clear_rule + + @property + def notify_on(self): + """Gets the notify_on of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._notify_on + + @notify_on.setter + def notify_on(self, notify_on): + """Sets the notify_on of this AlarmNotificationRuleTriggerConfig. + + + :param notify_on: The notify_on of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACKNOWLEDGED", "CLEARED", "CREATED", "SEVERITY_CHANGED"] # noqa: E501 + if not set(notify_on).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `notify_on` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(notify_on) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._notify_on = notify_on + + @property + def trigger_type(self): + """Gets the trigger_type of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this AlarmNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this AlarmNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AlarmNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AlarmNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/alarm_rule.py b/tb_rest_client/models/models_pe/alarm_rule.py index 7cb4adf7..a3a1d0d3 100644 --- a/tb_rest_client/models/models_pe/alarm_rule.py +++ b/tb_rest_client/models/models_pe/alarm_rule.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmRule(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/alarm_schedule.py b/tb_rest_client/models/models_pe/alarm_schedule.py index 33f915fc..b1eef123 100644 --- a/tb_rest_client/models/models_pe/alarm_schedule.py +++ b/tb_rest_client/models/models_pe/alarm_schedule.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AlarmSchedule(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/all_users_filter.py b/tb_rest_client/models/models_pe/all_users_filter.py new file mode 100644 index 00000000..369c7771 --- /dev/null +++ b/tb_rest_client/models/models_pe/all_users_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AllUsersFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """AllUsersFilter - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AllUsersFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AllUsersFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/allow_create_new_devices_device_profile_provision_configuration.py b/tb_rest_client/models/models_pe/allow_create_new_devices_device_profile_provision_configuration.py index f1f0549e..3536e095 100644 --- a/tb_rest_client/models/models_pe/allow_create_new_devices_device_profile_provision_configuration.py +++ b/tb_rest_client/models/models_pe/allow_create_new_devices_device_profile_provision_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AllowCreateNewDevicesDeviceProfileProvisionConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/allowed_permissions_info.py b/tb_rest_client/models/models_pe/allowed_permissions_info.py index 0f7a70fa..d6e84c68 100644 --- a/tb_rest_client/models/models_pe/allowed_permissions_info.py +++ b/tb_rest_client/models/models_pe/allowed_permissions_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AllowedPermissionsInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -134,7 +134,7 @@ def allowed_resources(self, allowed_resources): :param allowed_resources: The allowed_resources of this AllowedPermissionsInfo. # noqa: E501 :type: list[str] """ - allowed_values = ["BILLING", "ADMIN_SETTINGS", "ALARM", "ALL", "API_USAGE_STATE", "ASSET", "ASSET_GROUP", "AUDIT_LOG", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "CUSTOMER_GROUP", "DASHBOARD", "DASHBOARD_GROUP", "DEVICE", "DEVICE_GROUP", "DEVICE_PROFILE", "EDGE", "EDGE_GROUP", "ENTITY_VIEW", "ENTITY_VIEW_GROUP", "GROUP_PERMISSION", "INTEGRATION", "OAUTH2_CONFIGURATION_INFO", "OAUTH2_CONFIGURATION_TEMPLATE", "OTA_PACKAGE", "PROFILE", "QUEUE", "ROLE", "RULE_CHAIN", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "USER_GROUP", "VERSION_CONTROL", "WHITE_LABELING", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ADMIN_SETTINGS", "ALARM", "ALL", "API_USAGE_STATE", "ASSET", "ASSET_GROUP", "ASSET_PROFILE", "AUDIT_LOG", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "CUSTOMER_GROUP", "DASHBOARD", "DASHBOARD_GROUP", "DEVICE", "DEVICE_GROUP", "DEVICE_PROFILE", "EDGE", "EDGE_GROUP", "ENTITY_VIEW", "ENTITY_VIEW_GROUP", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "OAUTH2_CONFIGURATION_INFO", "OAUTH2_CONFIGURATION_TEMPLATE", "OTA_PACKAGE", "PROFILE", "QUEUE", "ROLE", "RULE_CHAIN", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "USER_GROUP", "VERSION_CONTROL", "WHITE_LABELING", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if not set(allowed_resources).issubset(set(allowed_values)): raise ValueError( "Invalid values for `allowed_resources` [{0}], must be a subset of [{1}]" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/any_time_schedule.py b/tb_rest_client/models/models_pe/any_time_schedule.py index 0f645751..ef642a8c 100644 --- a/tb_rest_client/models/models_pe/any_time_schedule.py +++ b/tb_rest_client/models/models_pe/any_time_schedule.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AnyTimeSchedule(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/api_usage_limit_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/api_usage_limit_notification_rule_trigger_config.py new file mode 100644 index 00000000..77d99f12 --- /dev/null +++ b/tb_rest_client/models/models_pe/api_usage_limit_notification_rule_trigger_config.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 + +class ApiUsageLimitNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_features': 'list[str]', + 'notify_on': 'list[str]', + 'trigger_type': 'str' + } + if hasattr(NotificationRuleTriggerConfig, "swagger_types"): + swagger_types.update(NotificationRuleTriggerConfig.swagger_types) + + attribute_map = { + 'api_features': 'apiFeatures', + 'notify_on': 'notifyOn', + 'trigger_type': 'triggerType' + } + if hasattr(NotificationRuleTriggerConfig, "attribute_map"): + attribute_map.update(NotificationRuleTriggerConfig.attribute_map) + + def __init__(self, api_features=None, notify_on=None, trigger_type=None, *args, **kwargs): # noqa: E501 + """ApiUsageLimitNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._api_features = None + self._notify_on = None + self._trigger_type = None + self.discriminator = None + if api_features is not None: + self.api_features = api_features + if notify_on is not None: + self.notify_on = notify_on + if trigger_type is not None: + self.trigger_type = trigger_type + NotificationRuleTriggerConfig.__init__(self, *args, **kwargs) + + @property + def api_features(self): + """Gets the api_features of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The api_features of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._api_features + + @api_features.setter + def api_features(self, api_features): + """Sets the api_features of this ApiUsageLimitNotificationRuleTriggerConfig. + + + :param api_features: The api_features of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ALARM", "DB", "EMAIL", "JS", "RE", "SMS", "TRANSPORT"] # noqa: E501 + if not set(api_features).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `api_features` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(api_features) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._api_features = api_features + + @property + def notify_on(self): + """Gets the notify_on of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._notify_on + + @notify_on.setter + def notify_on(self, notify_on): + """Sets the notify_on of this ApiUsageLimitNotificationRuleTriggerConfig. + + + :param notify_on: The notify_on of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["DISABLED", "ENABLED", "WARNING"] # noqa: E501 + if not set(notify_on).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `notify_on` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(notify_on) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._notify_on = notify_on + + @property + def trigger_type(self): + """Gets the trigger_type of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this ApiUsageLimitNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this ApiUsageLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ApiUsageLimitNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiUsageLimitNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/api_usage_state_filter.py b/tb_rest_client/models/models_pe/api_usage_state_filter.py index 411c299b..4ace0c92 100644 --- a/tb_rest_client/models/models_pe/api_usage_state_filter.py +++ b/tb_rest_client/models/models_pe/api_usage_state_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class ApiUsageStateFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/array_node.py b/tb_rest_client/models/models_pe/array_node.py new file mode 100644 index 00000000..d2b6f425 --- /dev/null +++ b/tb_rest_client/models/models_pe/array_node.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ArrayNode(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """ArrayNode - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ArrayNode, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ArrayNode): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/asset.py b/tb_rest_client/models/models_pe/asset.py index 58cf5751..107f1ba2 100644 --- a/tb_rest_client/models/models_pe/asset.py +++ b/tb_rest_client/models/models_pe/asset.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,10 +15,9 @@ import six - class Asset(object): """NOTE: This class is auto generated by the swagger code generator program. - from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -29,7 +28,6 @@ class Asset(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'AssetId', 'id': 'AssetId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -37,12 +35,12 @@ class Asset(object): 'name': 'str', 'type': 'str', 'label': 'str', + 'asset_profile_id': 'AssetProfileId', 'additional_info': 'JsonNode', 'owner_id': 'EntityId' } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -50,14 +48,13 @@ class Asset(object): 'name': 'name', 'type': 'type', 'label': 'label', + 'asset_profile_id': 'assetProfileId', 'additional_info': 'additionalInfo', 'owner_id': 'ownerId' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, - type=None, label=None, additional_info=None, owner_id=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, label=None, asset_profile_id=None, additional_info=None, owner_id=None): # noqa: E501 """Asset - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -65,11 +62,10 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._name = None self._type = None self._label = None + self._asset_profile_id = None self._additional_info = None self._owner_id = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -80,34 +76,13 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self.customer_id = customer_id self.name = name self.type = type - if label is not None: - self.label = label + self.label = label + self.asset_profile_id = asset_profile_id if additional_info is not None: self.additional_info = additional_info if owner_id is not None: self.owner_id = owner_id - @property - def external_id(self): - """Gets the external_id of this Asset. # noqa: E501 - - - :return: The external_id of this Asset. # noqa: E501 - :rtype: AssetId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Asset. - - - :param external_id: The external_id of this Asset. # noqa: E501 - :type: AssetId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this Asset. # noqa: E501 @@ -239,8 +214,6 @@ def type(self, type): :param type: The type of this Asset. # noqa: E501 :type: str """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @@ -264,11 +237,32 @@ def label(self, label): :param label: The label of this Asset. # noqa: E501 :type: str """ - if label is None: - self._label = None self._label = label + @property + def asset_profile_id(self): + """Gets the asset_profile_id of this Asset. # noqa: E501 + + + :return: The asset_profile_id of this Asset. # noqa: E501 + :rtype: AssetProfileId + """ + return self._asset_profile_id + + @asset_profile_id.setter + def asset_profile_id(self, asset_profile_id): + """Sets the asset_profile_id of this Asset. + + + :param asset_profile_id: The asset_profile_id of this Asset. # noqa: E501 + :type: AssetProfileId + """ + if asset_profile_id is None: + raise ValueError("Invalid value for `asset_profile_id`, must not be `None`") # noqa: E501 + + self._asset_profile_id = asset_profile_id + @property def additional_info(self): """Gets the additional_info of this Asset. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/asset_id.py b/tb_rest_client/models/models_pe/asset_id.py index 7bd5e43f..a950754a 100644 --- a/tb_rest_client/models/models_pe/asset_id.py +++ b/tb_rest_client/models/models_pe/asset_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AssetId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/asset_info.py b/tb_rest_client/models/models_pe/asset_info.py new file mode 100644 index 00000000..bc0db355 --- /dev/null +++ b/tb_rest_client/models/models_pe/asset_info.py @@ -0,0 +1,410 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AssetInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'AssetId', + 'created_time': 'int', + 'tenant_id': 'TenantId', + 'customer_id': 'CustomerId', + 'name': 'str', + 'type': 'str', + 'label': 'str', + 'asset_profile_id': 'AssetProfileId', + 'additional_info': 'JsonNode', + 'owner_id': 'EntityId', + 'owner_name': 'str', + 'groups': 'list[EntityInfo]' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'tenant_id': 'tenantId', + 'customer_id': 'customerId', + 'name': 'name', + 'type': 'type', + 'label': 'label', + 'asset_profile_id': 'assetProfileId', + 'additional_info': 'additionalInfo', + 'owner_id': 'ownerId', + 'owner_name': 'ownerName', + 'groups': 'groups' + } + + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, label=None, asset_profile_id=None, additional_info=None, owner_id=None, owner_name=None, groups=None): # noqa: E501 + """AssetInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._tenant_id = None + self._customer_id = None + self._name = None + self._type = None + self._label = None + self._asset_profile_id = None + self._additional_info = None + self._owner_id = None + self._owner_name = None + self._groups = None + self.discriminator = None + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if tenant_id is not None: + self.tenant_id = tenant_id + if customer_id is not None: + self.customer_id = customer_id + self.name = name + self.type = type + self.label = label + self.asset_profile_id = asset_profile_id + if additional_info is not None: + self.additional_info = additional_info + if owner_id is not None: + self.owner_id = owner_id + if owner_name is not None: + self.owner_name = owner_name + if groups is not None: + self.groups = groups + + @property + def id(self): + """Gets the id of this AssetInfo. # noqa: E501 + + + :return: The id of this AssetInfo. # noqa: E501 + :rtype: AssetId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssetInfo. + + + :param id: The id of this AssetInfo. # noqa: E501 + :type: AssetId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this AssetInfo. # noqa: E501 + + Timestamp of the asset creation, in milliseconds # noqa: E501 + + :return: The created_time of this AssetInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this AssetInfo. + + Timestamp of the asset creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this AssetInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def tenant_id(self): + """Gets the tenant_id of this AssetInfo. # noqa: E501 + + + :return: The tenant_id of this AssetInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this AssetInfo. + + + :param tenant_id: The tenant_id of this AssetInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def customer_id(self): + """Gets the customer_id of this AssetInfo. # noqa: E501 + + + :return: The customer_id of this AssetInfo. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this AssetInfo. + + + :param customer_id: The customer_id of this AssetInfo. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def name(self): + """Gets the name of this AssetInfo. # noqa: E501 + + Unique Asset Name in scope of Tenant # noqa: E501 + + :return: The name of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AssetInfo. + + Unique Asset Name in scope of Tenant # noqa: E501 + + :param name: The name of this AssetInfo. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def type(self): + """Gets the type of this AssetInfo. # noqa: E501 + + Asset type # noqa: E501 + + :return: The type of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AssetInfo. + + Asset type # noqa: E501 + + :param type: The type of this AssetInfo. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + @property + def label(self): + """Gets the label of this AssetInfo. # noqa: E501 + + Label that may be used in widgets # noqa: E501 + + :return: The label of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this AssetInfo. + + Label that may be used in widgets # noqa: E501 + + :param label: The label of this AssetInfo. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def asset_profile_id(self): + """Gets the asset_profile_id of this AssetInfo. # noqa: E501 + + + :return: The asset_profile_id of this AssetInfo. # noqa: E501 + :rtype: AssetProfileId + """ + return self._asset_profile_id + + @asset_profile_id.setter + def asset_profile_id(self, asset_profile_id): + """Sets the asset_profile_id of this AssetInfo. + + + :param asset_profile_id: The asset_profile_id of this AssetInfo. # noqa: E501 + :type: AssetProfileId + """ + if asset_profile_id is None: + raise ValueError("Invalid value for `asset_profile_id`, must not be `None`") # noqa: E501 + + self._asset_profile_id = asset_profile_id + + @property + def additional_info(self): + """Gets the additional_info of this AssetInfo. # noqa: E501 + + + :return: The additional_info of this AssetInfo. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this AssetInfo. + + + :param additional_info: The additional_info of this AssetInfo. # noqa: E501 + :type: JsonNode + """ + + self._additional_info = additional_info + + @property + def owner_id(self): + """Gets the owner_id of this AssetInfo. # noqa: E501 + + + :return: The owner_id of this AssetInfo. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this AssetInfo. + + + :param owner_id: The owner_id of this AssetInfo. # noqa: E501 + :type: EntityId + """ + + self._owner_id = owner_id + + @property + def owner_name(self): + """Gets the owner_name of this AssetInfo. # noqa: E501 + + Owner name # noqa: E501 + + :return: The owner_name of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._owner_name + + @owner_name.setter + def owner_name(self, owner_name): + """Sets the owner_name of this AssetInfo. + + Owner name # noqa: E501 + + :param owner_name: The owner_name of this AssetInfo. # noqa: E501 + :type: str + """ + + self._owner_name = owner_name + + @property + def groups(self): + """Gets the groups of this AssetInfo. # noqa: E501 + + Groups # noqa: E501 + + :return: The groups of this AssetInfo. # noqa: E501 + :rtype: list[EntityInfo] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this AssetInfo. + + Groups # noqa: E501 + + :param groups: The groups of this AssetInfo. # noqa: E501 + :type: list[EntityInfo] + """ + + self._groups = groups + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AssetInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/asset_profile.py b/tb_rest_client/models/models_pe/asset_profile.py new file mode 100644 index 00000000..e57ceceb --- /dev/null +++ b/tb_rest_client/models/models_pe/asset_profile.py @@ -0,0 +1,382 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AssetProfile(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'AssetProfileId', + 'created_time': 'int', + 'tenant_id': 'TenantId', + 'name': 'str', + 'default': 'bool', + 'default_dashboard_id': 'DashboardId', + 'default_rule_chain_id': 'RuleChainId', + 'default_queue_name': 'str', + 'description': 'str', + 'image': 'str', + 'default_edge_rule_chain_id': 'RuleChainId' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'tenant_id': 'tenantId', + 'name': 'name', + 'default': 'default', + 'default_dashboard_id': 'defaultDashboardId', + 'default_rule_chain_id': 'defaultRuleChainId', + 'default_queue_name': 'defaultQueueName', + 'description': 'description', + 'image': 'image', + 'default_edge_rule_chain_id': 'defaultEdgeRuleChainId' + } + + def __init__(self, id=None, created_time=None, tenant_id=None, name=None, default=None, default_dashboard_id=None, default_rule_chain_id=None, default_queue_name=None, description=None, image=None, default_edge_rule_chain_id=None): # noqa: E501 + """AssetProfile - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._tenant_id = None + self._name = None + self._default = None + self._default_dashboard_id = None + self._default_rule_chain_id = None + self._default_queue_name = None + self._description = None + self._image = None + self._default_edge_rule_chain_id = None + self.discriminator = None + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if tenant_id is not None: + self.tenant_id = tenant_id + if name is not None: + self.name = name + if default is not None: + self.default = default + if default_dashboard_id is not None: + self.default_dashboard_id = default_dashboard_id + if default_rule_chain_id is not None: + self.default_rule_chain_id = default_rule_chain_id + if default_queue_name is not None: + self.default_queue_name = default_queue_name + if description is not None: + self.description = description + if image is not None: + self.image = image + if default_edge_rule_chain_id is not None: + self.default_edge_rule_chain_id = default_edge_rule_chain_id + + @property + def id(self): + """Gets the id of this AssetProfile. # noqa: E501 + + + :return: The id of this AssetProfile. # noqa: E501 + :rtype: AssetProfileId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssetProfile. + + + :param id: The id of this AssetProfile. # noqa: E501 + :type: AssetProfileId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this AssetProfile. # noqa: E501 + + Timestamp of the profile creation, in milliseconds # noqa: E501 + + :return: The created_time of this AssetProfile. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this AssetProfile. + + Timestamp of the profile creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this AssetProfile. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def tenant_id(self): + """Gets the tenant_id of this AssetProfile. # noqa: E501 + + + :return: The tenant_id of this AssetProfile. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this AssetProfile. + + + :param tenant_id: The tenant_id of this AssetProfile. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def name(self): + """Gets the name of this AssetProfile. # noqa: E501 + + Unique Asset Profile Name in scope of Tenant. # noqa: E501 + + :return: The name of this AssetProfile. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AssetProfile. + + Unique Asset Profile Name in scope of Tenant. # noqa: E501 + + :param name: The name of this AssetProfile. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def default(self): + """Gets the default of this AssetProfile. # noqa: E501 + + Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation. # noqa: E501 + + :return: The default of this AssetProfile. # noqa: E501 + :rtype: bool + """ + return self._default + + @default.setter + def default(self, default): + """Sets the default of this AssetProfile. + + Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation. # noqa: E501 + + :param default: The default of this AssetProfile. # noqa: E501 + :type: bool + """ + + self._default = default + + @property + def default_dashboard_id(self): + """Gets the default_dashboard_id of this AssetProfile. # noqa: E501 + + + :return: The default_dashboard_id of this AssetProfile. # noqa: E501 + :rtype: DashboardId + """ + return self._default_dashboard_id + + @default_dashboard_id.setter + def default_dashboard_id(self, default_dashboard_id): + """Sets the default_dashboard_id of this AssetProfile. + + + :param default_dashboard_id: The default_dashboard_id of this AssetProfile. # noqa: E501 + :type: DashboardId + """ + + self._default_dashboard_id = default_dashboard_id + + @property + def default_rule_chain_id(self): + """Gets the default_rule_chain_id of this AssetProfile. # noqa: E501 + + + :return: The default_rule_chain_id of this AssetProfile. # noqa: E501 + :rtype: RuleChainId + """ + return self._default_rule_chain_id + + @default_rule_chain_id.setter + def default_rule_chain_id(self, default_rule_chain_id): + """Sets the default_rule_chain_id of this AssetProfile. + + + :param default_rule_chain_id: The default_rule_chain_id of this AssetProfile. # noqa: E501 + :type: RuleChainId + """ + + self._default_rule_chain_id = default_rule_chain_id + + @property + def default_queue_name(self): + """Gets the default_queue_name of this AssetProfile. # noqa: E501 + + Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages. # noqa: E501 + + :return: The default_queue_name of this AssetProfile. # noqa: E501 + :rtype: str + """ + return self._default_queue_name + + @default_queue_name.setter + def default_queue_name(self, default_queue_name): + """Sets the default_queue_name of this AssetProfile. + + Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages. # noqa: E501 + + :param default_queue_name: The default_queue_name of this AssetProfile. # noqa: E501 + :type: str + """ + + self._default_queue_name = default_queue_name + + @property + def description(self): + """Gets the description of this AssetProfile. # noqa: E501 + + Asset Profile description. # noqa: E501 + + :return: The description of this AssetProfile. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this AssetProfile. + + Asset Profile description. # noqa: E501 + + :param description: The description of this AssetProfile. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def image(self): + """Gets the image of this AssetProfile. # noqa: E501 + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 + + :return: The image of this AssetProfile. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this AssetProfile. + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 + + :param image: The image of this AssetProfile. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def default_edge_rule_chain_id(self): + """Gets the default_edge_rule_chain_id of this AssetProfile. # noqa: E501 + + + :return: The default_edge_rule_chain_id of this AssetProfile. # noqa: E501 + :rtype: RuleChainId + """ + return self._default_edge_rule_chain_id + + @default_edge_rule_chain_id.setter + def default_edge_rule_chain_id(self, default_edge_rule_chain_id): + """Sets the default_edge_rule_chain_id of this AssetProfile. + + + :param default_edge_rule_chain_id: The default_edge_rule_chain_id of this AssetProfile. # noqa: E501 + :type: RuleChainId + """ + + self._default_edge_rule_chain_id = default_edge_rule_chain_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AssetProfile, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetProfile): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/asset_profile_id.py b/tb_rest_client/models/models_pe/asset_profile_id.py new file mode 100644 index 00000000..dd5f7b14 --- /dev/null +++ b/tb_rest_client/models/models_pe/asset_profile_id.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AssetProfileId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """AssetProfileId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this AssetProfileId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this AssetProfileId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssetProfileId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this AssetProfileId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this AssetProfileId. # noqa: E501 + + string # noqa: E501 + + :return: The entity_type of this AssetProfileId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this AssetProfileId. + + string # noqa: E501 + + :param entity_type: The entity_type of this AssetProfileId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ASSET_PROFILE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AssetProfileId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetProfileId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/asset_profile_info.py b/tb_rest_client/models/models_pe/asset_profile_info.py new file mode 100644 index 00000000..6ac30b4e --- /dev/null +++ b/tb_rest_client/models/models_pe/asset_profile_info.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class AssetProfileInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'EntityId', + 'name': 'str', + 'image': 'str', + 'default_dashboard_id': 'DashboardId', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'image': 'image', + 'default_dashboard_id': 'defaultDashboardId', + 'tenant_id': 'tenantId' + } + + def __init__(self, id=None, name=None, image=None, default_dashboard_id=None, tenant_id=None): # noqa: E501 + """AssetProfileInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._image = None + self._default_dashboard_id = None + self._tenant_id = None + self.discriminator = None + if id is not None: + self.id = id + if name is not None: + self.name = name + if image is not None: + self.image = image + if default_dashboard_id is not None: + self.default_dashboard_id = default_dashboard_id + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def id(self): + """Gets the id of this AssetProfileInfo. # noqa: E501 + + + :return: The id of this AssetProfileInfo. # noqa: E501 + :rtype: EntityId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssetProfileInfo. + + + :param id: The id of this AssetProfileInfo. # noqa: E501 + :type: EntityId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this AssetProfileInfo. # noqa: E501 + + Entity Name # noqa: E501 + + :return: The name of this AssetProfileInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AssetProfileInfo. + + Entity Name # noqa: E501 + + :param name: The name of this AssetProfileInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def image(self): + """Gets the image of this AssetProfileInfo. # noqa: E501 + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 + + :return: The image of this AssetProfileInfo. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this AssetProfileInfo. + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 + + :param image: The image of this AssetProfileInfo. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def default_dashboard_id(self): + """Gets the default_dashboard_id of this AssetProfileInfo. # noqa: E501 + + + :return: The default_dashboard_id of this AssetProfileInfo. # noqa: E501 + :rtype: DashboardId + """ + return self._default_dashboard_id + + @default_dashboard_id.setter + def default_dashboard_id(self, default_dashboard_id): + """Sets the default_dashboard_id of this AssetProfileInfo. + + + :param default_dashboard_id: The default_dashboard_id of this AssetProfileInfo. # noqa: E501 + :type: DashboardId + """ + + self._default_dashboard_id = default_dashboard_id + + @property + def tenant_id(self): + """Gets the tenant_id of this AssetProfileInfo. # noqa: E501 + + + :return: The tenant_id of this AssetProfileInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this AssetProfileInfo. + + + :param tenant_id: The tenant_id of this AssetProfileInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AssetProfileInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AssetProfileInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/asset_search_query.py b/tb_rest_client/models/models_pe/asset_search_query.py index 2074c36e..e8c93f37 100644 --- a/tb_rest_client/models/models_pe/asset_search_query.py +++ b/tb_rest_client/models/models_pe/asset_search_query.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AssetSearchQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/asset_search_query_filter.py b/tb_rest_client/models/models_pe/asset_search_query_filter.py index ec32907d..adcaaad1 100644 --- a/tb_rest_client/models/models_pe/asset_search_query_filter.py +++ b/tb_rest_client/models/models_pe/asset_search_query_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class AssetSearchQueryFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/asset_type_filter.py b/tb_rest_client/models/models_pe/asset_type_filter.py index d133ceb2..862320c3 100644 --- a/tb_rest_client/models/models_pe/asset_type_filter.py +++ b/tb_rest_client/models/models_pe/asset_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class AssetTypeFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -30,27 +30,27 @@ class AssetTypeFilter(EntityFilter): """ swagger_types = { 'asset_name_filter': 'str', - 'asset_type': 'str' + 'asset_types': 'list[str]' } if hasattr(EntityFilter, "swagger_types"): swagger_types.update(EntityFilter.swagger_types) attribute_map = { 'asset_name_filter': 'assetNameFilter', - 'asset_type': 'assetType' + 'asset_types': 'assetTypes' } if hasattr(EntityFilter, "attribute_map"): attribute_map.update(EntityFilter.attribute_map) - def __init__(self, asset_name_filter=None, asset_type=None, *args, **kwargs): # noqa: E501 + def __init__(self, asset_name_filter=None, asset_types=None, *args, **kwargs): # noqa: E501 """AssetTypeFilter - a model defined in Swagger""" # noqa: E501 self._asset_name_filter = None - self._asset_type = None + self._asset_types = None self.discriminator = None if asset_name_filter is not None: self.asset_name_filter = asset_name_filter - if asset_type is not None: - self.asset_type = asset_type + if asset_types is not None: + self.asset_types = asset_types EntityFilter.__init__(self, *args, **kwargs) @property @@ -75,25 +75,25 @@ def asset_name_filter(self, asset_name_filter): self._asset_name_filter = asset_name_filter @property - def asset_type(self): - """Gets the asset_type of this AssetTypeFilter. # noqa: E501 + def asset_types(self): + """Gets the asset_types of this AssetTypeFilter. # noqa: E501 - :return: The asset_type of this AssetTypeFilter. # noqa: E501 - :rtype: str + :return: The asset_types of this AssetTypeFilter. # noqa: E501 + :rtype: list[str] """ - return self._asset_type + return self._asset_types - @asset_type.setter - def asset_type(self, asset_type): - """Sets the asset_type of this AssetTypeFilter. + @asset_types.setter + def asset_types(self, asset_types): + """Sets the asset_types of this AssetTypeFilter. - :param asset_type: The asset_type of this AssetTypeFilter. # noqa: E501 - :type: str + :param asset_types: The asset_types of this AssetTypeFilter. # noqa: E501 + :type: list[str] """ - self._asset_type = asset_type + self._asset_types = asset_types def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_pe/atomic_integer.py b/tb_rest_client/models/models_pe/atomic_integer.py index 8b555bed..e74efb7f 100644 --- a/tb_rest_client/models/models_pe/atomic_integer.py +++ b/tb_rest_client/models/models_pe/atomic_integer.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AtomicInteger(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/attribute_export_data.py b/tb_rest_client/models/models_pe/attribute_export_data.py index 6e1fab5d..f3ba46bb 100644 --- a/tb_rest_client/models/models_pe/attribute_export_data.py +++ b/tb_rest_client/models/models_pe/attribute_export_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AttributeExportData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/attributes_entity_view.py b/tb_rest_client/models/models_pe/attributes_entity_view.py index 563312b8..4d15ad7c 100644 --- a/tb_rest_client/models/models_pe/attributes_entity_view.py +++ b/tb_rest_client/models/models_pe/attributes_entity_view.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AttributesEntityView(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/audit_log.py b/tb_rest_client/models/models_pe/audit_log.py index 24490570..3187c5ad 100644 --- a/tb_rest_client/models/models_pe/audit_log.py +++ b/tb_rest_client/models/models_pe/audit_log.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AuditLog(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -291,7 +291,7 @@ def action_type(self, action_type): :param action_type: The action_type of this AuditLog. # noqa: E501 :type: str """ - allowed_values = ["ACTIVATED", "ADDED", "ADDED_TO_ENTITY_GROUP", "ALARM_ACK", "ALARM_CLEAR", "ALARM_DELETE", "ASSIGNED_FROM_TENANT", "ASSIGNED_TO_CUSTOMER", "ASSIGNED_TO_EDGE", "ASSIGNED_TO_TENANT", "ATTRIBUTES_DELETED", "ATTRIBUTES_READ", "ATTRIBUTES_UPDATED", "CHANGE_OWNER", "CREDENTIALS_READ", "CREDENTIALS_UPDATED", "DELETED", "LOCKOUT", "LOGIN", "LOGOUT", "MADE_PRIVATE", "MADE_PUBLIC", "PROVISION_FAILURE", "PROVISION_SUCCESS", "RELATIONS_DELETED", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "REMOVED_FROM_ENTITY_GROUP", "REST_API_RULE_ENGINE_CALL", "RPC_CALL", "SUSPENDED", "TIMESERIES_DELETED", "TIMESERIES_UPDATED", "UNASSIGNED_FROM_CUSTOMER", "UNASSIGNED_FROM_EDGE", "UPDATED"] # noqa: E501 + allowed_values = ["ACTIVATED", "ADDED", "ADDED_COMMENT", "ADDED_TO_ENTITY_GROUP", "ALARM_ACK", "ALARM_ASSIGNED", "ALARM_CLEAR", "ALARM_DELETE", "ALARM_UNASSIGNED", "ASSIGNED_FROM_TENANT", "ASSIGNED_TO_CUSTOMER", "ASSIGNED_TO_EDGE", "ASSIGNED_TO_TENANT", "ATTRIBUTES_DELETED", "ATTRIBUTES_READ", "ATTRIBUTES_UPDATED", "CHANGE_OWNER", "CREDENTIALS_READ", "CREDENTIALS_UPDATED", "DELETED", "DELETED_COMMENT", "LOCKOUT", "LOGIN", "LOGOUT", "MADE_PRIVATE", "MADE_PUBLIC", "PROVISION_FAILURE", "PROVISION_SUCCESS", "RELATIONS_DELETED", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "REMOVED_FROM_ENTITY_GROUP", "REST_API_RULE_ENGINE_CALL", "RPC_CALL", "SUSPENDED", "TIMESERIES_DELETED", "TIMESERIES_UPDATED", "UNASSIGNED_FROM_CUSTOMER", "UNASSIGNED_FROM_EDGE", "UPDATED", "UPDATED_COMMENT"] # noqa: E501 if action_type not in allowed_values: raise ValueError( "Invalid value for `action_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/audit_log_id.py b/tb_rest_client/models/models_pe/audit_log_id.py index 92e87feb..7a28cdda 100644 --- a/tb_rest_client/models/models_pe/audit_log_id.py +++ b/tb_rest_client/models/models_pe/audit_log_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AuditLogId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,13 +28,11 @@ class AuditLogId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_pe/auto_version_create_config.py b/tb_rest_client/models/models_pe/auto_version_create_config.py index d05232be..463b5e60 100644 --- a/tb_rest_client/models/models_pe/auto_version_create_config.py +++ b/tb_rest_client/models/models_pe/auto_version_create_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class AutoVersionCreateConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/aws_sns_sms_provider_configuration.py b/tb_rest_client/models/models_pe/aws_sns_sms_provider_configuration.py index a3322cb6..436c283d 100644 --- a/tb_rest_client/models/models_pe/aws_sns_sms_provider_configuration.py +++ b/tb_rest_client/models/models_pe/aws_sns_sms_provider_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 class AwsSnsSmsProviderConfiguration(SmsProviderConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/backup_code_two_fa_account_config.py b/tb_rest_client/models/models_pe/backup_code_two_fa_account_config.py index 1332a383..1dc3d5e5 100644 --- a/tb_rest_client/models/models_pe/backup_code_two_fa_account_config.py +++ b/tb_rest_client/models/models_pe/backup_code_two_fa_account_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BackupCodeTwoFaAccountConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/backup_code_two_fa_provider_config.py b/tb_rest_client/models/models_pe/backup_code_two_fa_provider_config.py index 3fe3bde6..73542f8f 100644 --- a/tb_rest_client/models/models_pe/backup_code_two_fa_provider_config.py +++ b/tb_rest_client/models/models_pe/backup_code_two_fa_provider_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BackupCodeTwoFaProviderConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/blob_entity_id.py b/tb_rest_client/models/models_pe/blob_entity_id.py index 74669d5e..506d548f 100644 --- a/tb_rest_client/models/models_pe/blob_entity_id.py +++ b/tb_rest_client/models/models_pe/blob_entity_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BlobEntityId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -32,8 +32,7 @@ class BlobEntityId(object): } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_pe/blob_entity_info.py b/tb_rest_client/models/models_pe/blob_entity_info.py index 69398818..a8ebe57a 100644 --- a/tb_rest_client/models/models_pe/blob_entity_info.py +++ b/tb_rest_client/models/models_pe/blob_entity_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BlobEntityInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/blob_entity_with_customer_info.py b/tb_rest_client/models/models_pe/blob_entity_with_customer_info.py index 33bf37a4..c6334c47 100644 --- a/tb_rest_client/models/models_pe/blob_entity_with_customer_info.py +++ b/tb_rest_client/models/models_pe/blob_entity_with_customer_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BlobEntityWithCustomerInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/boolean_filter_predicate.py b/tb_rest_client/models/models_pe/boolean_filter_predicate.py index 186b34c5..87a093f6 100644 --- a/tb_rest_client/models/models_pe/boolean_filter_predicate.py +++ b/tb_rest_client/models/models_pe/boolean_filter_predicate.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 +from tb_rest_client.models.models_pe.key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 class BooleanFilterPredicate(KeyFilterPredicate): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/branch_info.py b/tb_rest_client/models/models_pe/branch_info.py index 712b8965..c0577e1c 100644 --- a/tb_rest_client/models/models_pe/branch_info.py +++ b/tb_rest_client/models/models_pe/branch_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BranchInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/bulk_import_request.py b/tb_rest_client/models/models_pe/bulk_import_request.py index 0c295907..f3680027 100644 --- a/tb_rest_client/models/models_pe/bulk_import_request.py +++ b/tb_rest_client/models/models_pe/bulk_import_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BulkImportRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/bulk_import_result_asset.py b/tb_rest_client/models/models_pe/bulk_import_result_asset.py index 21a623cb..8a7d55f7 100644 --- a/tb_rest_client/models/models_pe/bulk_import_result_asset.py +++ b/tb_rest_client/models/models_pe/bulk_import_result_asset.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BulkImportResultAsset(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/bulk_import_result_device.py b/tb_rest_client/models/models_pe/bulk_import_result_device.py index 3bf3b726..410f451a 100644 --- a/tb_rest_client/models/models_pe/bulk_import_result_device.py +++ b/tb_rest_client/models/models_pe/bulk_import_result_device.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BulkImportResultDevice(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/bulk_import_result_edge.py b/tb_rest_client/models/models_pe/bulk_import_result_edge.py index 87202603..569cf788 100644 --- a/tb_rest_client/models/models_pe/bulk_import_result_edge.py +++ b/tb_rest_client/models/models_pe/bulk_import_result_edge.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class BulkImportResultEdge(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/byte_buffer.py b/tb_rest_client/models/models_pe/byte_buffer.py index ce22fa19..2482f1fd 100644 --- a/tb_rest_client/models/models_pe/byte_buffer.py +++ b/tb_rest_client/models/models_pe/byte_buffer.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ByteBuffer(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/change_password_request.py b/tb_rest_client/models/models_pe/change_password_request.py index 98ee441e..2d9af879 100644 --- a/tb_rest_client/models/models_pe/change_password_request.py +++ b/tb_rest_client/models/models_pe/change_password_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ChangePasswordRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/check_pre_provisioned_devices_device_profile_provision_configuration.py b/tb_rest_client/models/models_pe/check_pre_provisioned_devices_device_profile_provision_configuration.py index 05739093..7322fb7a 100644 --- a/tb_rest_client/models/models_pe/check_pre_provisioned_devices_device_profile_provision_configuration.py +++ b/tb_rest_client/models/models_pe/check_pre_provisioned_devices_device_profile_provision_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/claim_request.py b/tb_rest_client/models/models_pe/claim_request.py index 7c494c47..0f282fc0 100644 --- a/tb_rest_client/models/models_pe/claim_request.py +++ b/tb_rest_client/models/models_pe/claim_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ClaimRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/clear_rule.py b/tb_rest_client/models/models_pe/clear_rule.py new file mode 100644 index 00000000..1d8f157b --- /dev/null +++ b/tb_rest_client/models/models_pe/clear_rule.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ClearRule(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'alarm_statuses': 'list[str]' + } + + attribute_map = { + 'alarm_statuses': 'alarmStatuses' + } + + def __init__(self, alarm_statuses=None): # noqa: E501 + """ClearRule - a model defined in Swagger""" # noqa: E501 + self._alarm_statuses = None + self.discriminator = None + if alarm_statuses is not None: + self.alarm_statuses = alarm_statuses + + @property + def alarm_statuses(self): + """Gets the alarm_statuses of this ClearRule. # noqa: E501 + + + :return: The alarm_statuses of this ClearRule. # noqa: E501 + :rtype: list[str] + """ + return self._alarm_statuses + + @alarm_statuses.setter + def alarm_statuses(self, alarm_statuses): + """Sets the alarm_statuses of this ClearRule. + + + :param alarm_statuses: The alarm_statuses of this ClearRule. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACK", "ACTIVE", "ANY", "CLEARED", "UNACK"] # noqa: E501 + if not set(alarm_statuses).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `alarm_statuses` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(alarm_statuses) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._alarm_statuses = alarm_statuses + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ClearRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ClearRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/client_attributes_querying_snmp_communication_config.py b/tb_rest_client/models/models_pe/client_attributes_querying_snmp_communication_config.py index 3d9d9077..d4a94cee 100644 --- a/tb_rest_client/models/models_pe/client_attributes_querying_snmp_communication_config.py +++ b/tb_rest_client/models/models_pe/client_attributes_querying_snmp_communication_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ClientAttributesQueryingSnmpCommunicationConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/coap_device_profile_transport_configuration.py b/tb_rest_client/models/models_pe/coap_device_profile_transport_configuration.py index 6416c1e9..828ee73c 100644 --- a/tb_rest_client/models/models_pe/coap_device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_pe/coap_device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 class CoapDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/coap_device_transport_configuration.py b/tb_rest_client/models/models_pe/coap_device_transport_configuration.py index 91b866a9..14b751e7 100644 --- a/tb_rest_client/models/models_pe/coap_device_transport_configuration.py +++ b/tb_rest_client/models/models_pe/coap_device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 class CoapDeviceTransportConfiguration(DeviceTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/coap_device_type_configuration.py b/tb_rest_client/models/models_pe/coap_device_type_configuration.py index 8fac2f40..b39be6db 100644 --- a/tb_rest_client/models/models_pe/coap_device_type_configuration.py +++ b/tb_rest_client/models/models_pe/coap_device_type_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CoapDeviceTypeConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/column_mapping.py b/tb_rest_client/models/models_pe/column_mapping.py index 8be1b3eb..da0f1bd7 100644 --- a/tb_rest_client/models/models_pe/column_mapping.py +++ b/tb_rest_client/models/models_pe/column_mapping.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ColumnMapping(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/comparison_ts_value.py b/tb_rest_client/models/models_pe/comparison_ts_value.py new file mode 100644 index 00000000..45e6be0a --- /dev/null +++ b/tb_rest_client/models/models_pe/comparison_ts_value.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ComparisonTsValue(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'current': 'TsValue', + 'previous': 'TsValue' + } + + attribute_map = { + 'current': 'current', + 'previous': 'previous' + } + + def __init__(self, current=None, previous=None): # noqa: E501 + """ComparisonTsValue - a model defined in Swagger""" # noqa: E501 + self._current = None + self._previous = None + self.discriminator = None + if current is not None: + self.current = current + if previous is not None: + self.previous = previous + + @property + def current(self): + """Gets the current of this ComparisonTsValue. # noqa: E501 + + + :return: The current of this ComparisonTsValue. # noqa: E501 + :rtype: TsValue + """ + return self._current + + @current.setter + def current(self, current): + """Sets the current of this ComparisonTsValue. + + + :param current: The current of this ComparisonTsValue. # noqa: E501 + :type: TsValue + """ + + self._current = current + + @property + def previous(self): + """Gets the previous of this ComparisonTsValue. # noqa: E501 + + + :return: The previous of this ComparisonTsValue. # noqa: E501 + :rtype: TsValue + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this ComparisonTsValue. + + + :param previous: The previous of this ComparisonTsValue. # noqa: E501 + :type: TsValue + """ + + self._previous = previous + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ComparisonTsValue, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ComparisonTsValue): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/complex_filter_predicate.py b/tb_rest_client/models/models_pe/complex_filter_predicate.py index 8d607e47..00c4b3b1 100644 --- a/tb_rest_client/models/models_pe/complex_filter_predicate.py +++ b/tb_rest_client/models/models_pe/complex_filter_predicate.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 +from tb_rest_client.models.models_pe.key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 class ComplexFilterPredicate(KeyFilterPredicate): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/complex_version_create_request.py b/tb_rest_client/models/models_pe/complex_version_create_request.py index a6a9985a..ea1487b5 100644 --- a/tb_rest_client/models/models_pe/complex_version_create_request.py +++ b/tb_rest_client/models/models_pe/complex_version_create_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .version_create_request import VersionCreateRequest # noqa: F401,E501 +from tb_rest_client.models.models_pe.version_create_request import VersionCreateRequest # noqa: F401,E501 class ComplexVersionCreateRequest(VersionCreateRequest): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -66,7 +66,7 @@ def __init__(self, branch=None, entity_types=None, sync_strategy=None, type=None self.type = type if version_name is not None: self.version_name = version_name - VersionCreateRequest.__init__(self, branch, type, version_name) + VersionCreateRequest.__init__(self, *args, **kwargs) @property def branch(self): diff --git a/tb_rest_client/models/models_pe/component_descriptor.py b/tb_rest_client/models/models_pe/component_descriptor.py index 083b96aa..ff443b89 100644 --- a/tb_rest_client/models/models_pe/component_descriptor.py +++ b/tb_rest_client/models/models_pe/component_descriptor.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ComponentDescriptor(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -32,6 +32,7 @@ class ComponentDescriptor(object): 'created_time': 'int', 'type': 'str', 'scope': 'str', + 'clustering_mode': 'str', 'name': 'str', 'clazz': 'str', 'configuration_descriptor': 'JsonNode', @@ -43,18 +44,20 @@ class ComponentDescriptor(object): 'created_time': 'createdTime', 'type': 'type', 'scope': 'scope', + 'clustering_mode': 'clusteringMode', 'name': 'name', 'clazz': 'clazz', 'configuration_descriptor': 'configurationDescriptor', 'actions': 'actions' } - def __init__(self, id=None, created_time=None, type=None, scope=None, name=None, clazz=None, configuration_descriptor=None, actions=None): # noqa: E501 + def __init__(self, id=None, created_time=None, type=None, scope=None, clustering_mode=None, name=None, clazz=None, configuration_descriptor=None, actions=None): # noqa: E501 """ComponentDescriptor - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None self._type = None self._scope = None + self._clustering_mode = None self._name = None self._clazz = None self._configuration_descriptor = None @@ -68,6 +71,8 @@ def __init__(self, id=None, created_time=None, type=None, scope=None, name=None, self.type = type if scope is not None: self.scope = scope + if clustering_mode is not None: + self.clustering_mode = clustering_mode if name is not None: self.name = name if clazz is not None: @@ -179,6 +184,35 @@ def scope(self, scope): self._scope = scope + @property + def clustering_mode(self): + """Gets the clustering_mode of this ComponentDescriptor. # noqa: E501 + + Clustering mode of the RuleNode. This mode represents the ability to start Rule Node in multiple microservices. # noqa: E501 + + :return: The clustering_mode of this ComponentDescriptor. # noqa: E501 + :rtype: str + """ + return self._clustering_mode + + @clustering_mode.setter + def clustering_mode(self, clustering_mode): + """Sets the clustering_mode of this ComponentDescriptor. + + Clustering mode of the RuleNode. This mode represents the ability to start Rule Node in multiple microservices. # noqa: E501 + + :param clustering_mode: The clustering_mode of this ComponentDescriptor. # noqa: E501 + :type: str + """ + allowed_values = ["ENABLED", "SINGLETON", "USER_PREFERENCE"] # noqa: E501 + if clustering_mode not in allowed_values: + raise ValueError( + "Invalid value for `clustering_mode` ({0}), must be one of {1}" # noqa: E501 + .format(clustering_mode, allowed_values) + ) + + self._clustering_mode = clustering_mode + @property def name(self): """Gets the name of this ComponentDescriptor. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/component_descriptor_id.py b/tb_rest_client/models/models_pe/component_descriptor_id.py index 2f0977ae..ebf0a6bb 100644 --- a/tb_rest_client/models/models_pe/component_descriptor_id.py +++ b/tb_rest_client/models/models_pe/component_descriptor_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ComponentDescriptorId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,13 +28,11 @@ class ComponentDescriptorId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_pe/contact_basedobject.py b/tb_rest_client/models/models_pe/contact_basedobject.py index f271f5d9..2aeabab0 100644 --- a/tb_rest_client/models/models_pe/contact_basedobject.py +++ b/tb_rest_client/models/models_pe/contact_basedobject.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,10 +15,9 @@ import six - class ContactBasedobject(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -29,28 +28,21 @@ class ContactBasedobject(object): and the value is json key in definition. """ swagger_types = { - 'active': 'bool', 'additional_info': 'JsonNode', 'address': 'str', 'address2': 'str', 'city': 'str', 'country': 'str', 'created_time': 'int', - 'current_period_start_ts': 'int', 'email': 'str', 'id': 'object', - 'last_inactive_ts': 'int', 'name': 'str', 'phone': 'str', - 'region': 'str', 'state': 'str', - 'tenant_profile_id': 'TenantProfileId', - 'zip': 'str', - 'title': 'str', + 'zip': 'str' } attribute_map = { - 'active': 'active', 'additional_info': 'additionalInfo', 'address': 'address', 'address2': 'address2', @@ -62,17 +54,10 @@ class ContactBasedobject(object): 'name': 'name', 'phone': 'phone', 'state': 'state', - 'zip': 'zip', - 'title': 'title', - 'current_period_start_ts': 'currentPeriodStartTs', - 'last_inactive_ts': 'lastInactiveTs', - 'region': 'region', - 'tenant_profile_id': 'tenantProfileId' + 'zip': 'zip' } - def __init__(self, additional_info=None, address=None, address2=None, city=None, country=None, created_time=None, - email=None, id=None, name=None, phone=None, state=None, zip=None, title=None, active=None, - current_period_start_ts=None, last_inactive_ts=None, region=None, tenant_profile_id=None): # noqa: E501 + def __init__(self, additional_info=None, address=None, address2=None, city=None, country=None, created_time=None, email=None, id=None, name=None, phone=None, state=None, zip=None): # noqa: E501 """ContactBasedobject - a model defined in Swagger""" # noqa: E501 self._additional_info = None self._address = None @@ -87,13 +72,6 @@ def __init__(self, additional_info=None, address=None, address2=None, city=None, self._state = None self._zip = None self.discriminator = None - self._title = title - self.active = active - self.current_period_start_ts = current_period_start_ts - self.last_inactive_ts = last_inactive_ts - self.region = region - self.tenant_profile_id = tenant_profile_id - if additional_info is not None: self.additional_info = additional_info if address is not None: @@ -119,10 +97,6 @@ def __init__(self, additional_info=None, address=None, address2=None, city=None, if zip is not None: self.zip = zip - @property - def title(self): - return self._title - @property def additional_info(self): """Gets the additional_info of this ContactBasedobject. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/converter.py b/tb_rest_client/models/models_pe/converter.py index cb0c4dcd..186f95ab 100644 --- a/tb_rest_client/models/models_pe/converter.py +++ b/tb_rest_client/models/models_pe/converter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Converter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class Converter(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'ConverterId', 'id': 'ConverterId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -41,7 +40,6 @@ class Converter(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -53,9 +51,8 @@ class Converter(object): 'edge_template': 'edgeTemplate' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, name=None, type=None, debug_mode=None, configuration=None, additional_info=None, edge_template=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, name=None, type=None, debug_mode=None, configuration=None, additional_info=None, edge_template=None): # noqa: E501 """Converter - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -66,8 +63,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._additional_info = None self._edge_template = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -85,27 +80,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if edge_template is not None: self.edge_template = edge_template - @property - def external_id(self): - """Gets the external_id of this Converter. # noqa: E501 - - - :return: The external_id of this Converter. # noqa: E501 - :rtype: ConverterId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Converter. - - - :param external_id: The external_id of this Converter. # noqa: E501 - :type: ConverterId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this Converter. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/converter_id.py b/tb_rest_client/models/models_pe/converter_id.py index 88c8630e..176dd740 100644 --- a/tb_rest_client/models/models_pe/converter_id.py +++ b/tb_rest_client/models/models_pe/converter_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ConverterId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/custom_menu.py b/tb_rest_client/models/models_pe/custom_menu.py index 3cbb5c04..3e239460 100644 --- a/tb_rest_client/models/models_pe/custom_menu.py +++ b/tb_rest_client/models/models_pe/custom_menu.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CustomMenu(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/custom_menu_item.py b/tb_rest_client/models/models_pe/custom_menu_item.py index d61282cf..3bc4bdd4 100644 --- a/tb_rest_client/models/models_pe/custom_menu_item.py +++ b/tb_rest_client/models/models_pe/custom_menu_item.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CustomMenuItem(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/custom_time_schedule.py b/tb_rest_client/models/models_pe/custom_time_schedule.py index 035d7b12..6e222153 100644 --- a/tb_rest_client/models/models_pe/custom_time_schedule.py +++ b/tb_rest_client/models/models_pe/custom_time_schedule.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CustomTimeSchedule(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/custom_time_schedule_item.py b/tb_rest_client/models/models_pe/custom_time_schedule_item.py index 60d3a93f..cd08a30b 100644 --- a/tb_rest_client/models/models_pe/custom_time_schedule_item.py +++ b/tb_rest_client/models/models_pe/custom_time_schedule_item.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CustomTimeScheduleItem(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/custom_translation.py b/tb_rest_client/models/models_pe/custom_translation.py index 26d1043f..697c7cd9 100644 --- a/tb_rest_client/models/models_pe/custom_translation.py +++ b/tb_rest_client/models/models_pe/custom_translation.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CustomTranslation(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/customer.py b/tb_rest_client/models/models_pe/customer.py index c28a368f..4b4d9ec4 100644 --- a/tb_rest_client/models/models_pe/customer.py +++ b/tb_rest_client/models/models_pe/customer.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Customer(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class Customer(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'CustomerId', 'id': 'CustomerId', 'created_time': 'int', 'title': 'str', @@ -49,7 +48,6 @@ class Customer(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'title': 'title', @@ -69,9 +67,8 @@ class Customer(object): 'additional_info': 'additionalInfo' } - def __init__(self, external_id=None, id=None, created_time=None, title=None, name=None, tenant_id=None, parent_customer_id=None, customer_id=None, owner_id=None, country=None, state=None, city=None, address=None, address2=None, zip=None, phone=None, email=None, additional_info=None): # noqa: E501 + def __init__(self, id=None, created_time=None, title=None, name=None, tenant_id=None, parent_customer_id=None, customer_id=None, owner_id=None, country=None, state=None, city=None, address=None, address2=None, zip=None, phone=None, email=None, additional_info=None): # noqa: E501 """Customer - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._title = None @@ -90,8 +87,6 @@ def __init__(self, external_id=None, id=None, created_time=None, title=None, nam self._email = None self._additional_info = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -118,27 +113,6 @@ def __init__(self, external_id=None, id=None, created_time=None, title=None, nam if additional_info is not None: self.additional_info = additional_info - @property - def external_id(self): - """Gets the external_id of this Customer. # noqa: E501 - - - :return: The external_id of this Customer. # noqa: E501 - :rtype: CustomerId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Customer. - - - :param external_id: The external_id of this Customer. # noqa: E501 - :type: CustomerId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this Customer. # noqa: E501 @@ -247,6 +221,8 @@ def tenant_id(self, tenant_id): :param tenant_id: The tenant_id of this Customer. # noqa: E501 :type: TenantId """ + # if tenant_id is None: + # raise ValueError("Invalid value for `tenant_id`, must not be `None`") # noqa: E501 self._tenant_id = tenant_id diff --git a/tb_rest_client/models/models_pe/customer_id.py b/tb_rest_client/models/models_pe/customer_id.py index 40cbd396..974a6cdb 100644 --- a/tb_rest_client/models/models_pe/customer_id.py +++ b/tb_rest_client/models/models_pe/customer_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class CustomerId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/customer_info.py b/tb_rest_client/models/models_pe/customer_info.py new file mode 100644 index 00000000..4e00f2ab --- /dev/null +++ b/tb_rest_client/models/models_pe/customer_info.py @@ -0,0 +1,597 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class CustomerInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'CustomerId', + 'created_time': 'int', + 'title': 'str', + 'name': 'str', + 'tenant_id': 'TenantId', + 'parent_customer_id': 'CustomerId', + 'customer_id': 'CustomerId', + 'owner_id': 'EntityId', + 'country': 'str', + 'state': 'str', + 'city': 'str', + 'address': 'str', + 'address2': 'str', + 'zip': 'str', + 'phone': 'str', + 'email': 'str', + 'additional_info': 'JsonNode', + 'owner_name': 'str', + 'groups': 'list[EntityInfo]' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'title': 'title', + 'name': 'name', + 'tenant_id': 'tenantId', + 'parent_customer_id': 'parentCustomerId', + 'customer_id': 'customerId', + 'owner_id': 'ownerId', + 'country': 'country', + 'state': 'state', + 'city': 'city', + 'address': 'address', + 'address2': 'address2', + 'zip': 'zip', + 'phone': 'phone', + 'email': 'email', + 'additional_info': 'additionalInfo', + 'owner_name': 'ownerName', + 'groups': 'groups' + } + + def __init__(self, id=None, created_time=None, title=None, name=None, tenant_id=None, parent_customer_id=None, customer_id=None, owner_id=None, country=None, state=None, city=None, address=None, address2=None, zip=None, phone=None, email=None, additional_info=None, owner_name=None, groups=None): # noqa: E501 + """CustomerInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._title = None + self._name = None + self._tenant_id = None + self._parent_customer_id = None + self._customer_id = None + self._owner_id = None + self._country = None + self._state = None + self._city = None + self._address = None + self._address2 = None + self._zip = None + self._phone = None + self._email = None + self._additional_info = None + self._owner_name = None + self._groups = None + self.discriminator = None + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if title is not None: + self.title = title + if name is not None: + self.name = name + self.tenant_id = tenant_id + if parent_customer_id is not None: + self.parent_customer_id = parent_customer_id + if customer_id is not None: + self.customer_id = customer_id + if owner_id is not None: + self.owner_id = owner_id + self.country = country + self.state = state + self.city = city + self.address = address + self.address2 = address2 + self.zip = zip + self.phone = phone + self.email = email + if additional_info is not None: + self.additional_info = additional_info + if owner_name is not None: + self.owner_name = owner_name + if groups is not None: + self.groups = groups + + @property + def id(self): + """Gets the id of this CustomerInfo. # noqa: E501 + + + :return: The id of this CustomerInfo. # noqa: E501 + :rtype: CustomerId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CustomerInfo. + + + :param id: The id of this CustomerInfo. # noqa: E501 + :type: CustomerId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this CustomerInfo. # noqa: E501 + + Timestamp of the customer creation, in milliseconds # noqa: E501 + + :return: The created_time of this CustomerInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this CustomerInfo. + + Timestamp of the customer creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this CustomerInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def title(self): + """Gets the title of this CustomerInfo. # noqa: E501 + + Title of the customer # noqa: E501 + + :return: The title of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this CustomerInfo. + + Title of the customer # noqa: E501 + + :param title: The title of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def name(self): + """Gets the name of this CustomerInfo. # noqa: E501 + + Name of the customer. Read-only, duplicated from title for backward compatibility # noqa: E501 + + :return: The name of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CustomerInfo. + + Name of the customer. Read-only, duplicated from title for backward compatibility # noqa: E501 + + :param name: The name of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def tenant_id(self): + """Gets the tenant_id of this CustomerInfo. # noqa: E501 + + + :return: The tenant_id of this CustomerInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this CustomerInfo. + + + :param tenant_id: The tenant_id of this CustomerInfo. # noqa: E501 + :type: TenantId + """ + if tenant_id is None: + raise ValueError("Invalid value for `tenant_id`, must not be `None`") # noqa: E501 + + self._tenant_id = tenant_id + + @property + def parent_customer_id(self): + """Gets the parent_customer_id of this CustomerInfo. # noqa: E501 + + + :return: The parent_customer_id of this CustomerInfo. # noqa: E501 + :rtype: CustomerId + """ + return self._parent_customer_id + + @parent_customer_id.setter + def parent_customer_id(self, parent_customer_id): + """Sets the parent_customer_id of this CustomerInfo. + + + :param parent_customer_id: The parent_customer_id of this CustomerInfo. # noqa: E501 + :type: CustomerId + """ + + self._parent_customer_id = parent_customer_id + + @property + def customer_id(self): + """Gets the customer_id of this CustomerInfo. # noqa: E501 + + + :return: The customer_id of this CustomerInfo. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this CustomerInfo. + + + :param customer_id: The customer_id of this CustomerInfo. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def owner_id(self): + """Gets the owner_id of this CustomerInfo. # noqa: E501 + + + :return: The owner_id of this CustomerInfo. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this CustomerInfo. + + + :param owner_id: The owner_id of this CustomerInfo. # noqa: E501 + :type: EntityId + """ + + self._owner_id = owner_id + + @property + def country(self): + """Gets the country of this CustomerInfo. # noqa: E501 + + Country # noqa: E501 + + :return: The country of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._country + + @country.setter + def country(self, country): + """Sets the country of this CustomerInfo. + + Country # noqa: E501 + + :param country: The country of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._country = country + + @property + def state(self): + """Gets the state of this CustomerInfo. # noqa: E501 + + State # noqa: E501 + + :return: The state of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this CustomerInfo. + + State # noqa: E501 + + :param state: The state of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def city(self): + """Gets the city of this CustomerInfo. # noqa: E501 + + City # noqa: E501 + + :return: The city of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._city + + @city.setter + def city(self, city): + """Sets the city of this CustomerInfo. + + City # noqa: E501 + + :param city: The city of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._city = city + + @property + def address(self): + """Gets the address of this CustomerInfo. # noqa: E501 + + Address Line 1 # noqa: E501 + + :return: The address of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this CustomerInfo. + + Address Line 1 # noqa: E501 + + :param address: The address of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._address = address + + @property + def address2(self): + """Gets the address2 of this CustomerInfo. # noqa: E501 + + Address Line 2 # noqa: E501 + + :return: The address2 of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._address2 + + @address2.setter + def address2(self, address2): + """Sets the address2 of this CustomerInfo. + + Address Line 2 # noqa: E501 + + :param address2: The address2 of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._address2 = address2 + + @property + def zip(self): + """Gets the zip of this CustomerInfo. # noqa: E501 + + Zip code # noqa: E501 + + :return: The zip of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._zip + + @zip.setter + def zip(self, zip): + """Sets the zip of this CustomerInfo. + + Zip code # noqa: E501 + + :param zip: The zip of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._zip = zip + + @property + def phone(self): + """Gets the phone of this CustomerInfo. # noqa: E501 + + Phone number # noqa: E501 + + :return: The phone of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._phone + + @phone.setter + def phone(self, phone): + """Sets the phone of this CustomerInfo. + + Phone number # noqa: E501 + + :param phone: The phone of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._phone = phone + + @property + def email(self): + """Gets the email of this CustomerInfo. # noqa: E501 + + Email # noqa: E501 + + :return: The email of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this CustomerInfo. + + Email # noqa: E501 + + :param email: The email of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def additional_info(self): + """Gets the additional_info of this CustomerInfo. # noqa: E501 + + + :return: The additional_info of this CustomerInfo. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this CustomerInfo. + + + :param additional_info: The additional_info of this CustomerInfo. # noqa: E501 + :type: JsonNode + """ + + self._additional_info = additional_info + + @property + def owner_name(self): + """Gets the owner_name of this CustomerInfo. # noqa: E501 + + Owner name # noqa: E501 + + :return: The owner_name of this CustomerInfo. # noqa: E501 + :rtype: str + """ + return self._owner_name + + @owner_name.setter + def owner_name(self, owner_name): + """Sets the owner_name of this CustomerInfo. + + Owner name # noqa: E501 + + :param owner_name: The owner_name of this CustomerInfo. # noqa: E501 + :type: str + """ + + self._owner_name = owner_name + + @property + def groups(self): + """Gets the groups of this CustomerInfo. # noqa: E501 + + Groups # noqa: E501 + + :return: The groups of this CustomerInfo. # noqa: E501 + :rtype: list[EntityInfo] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this CustomerInfo. + + Groups # noqa: E501 + + :param groups: The groups of this CustomerInfo. # noqa: E501 + :type: list[EntityInfo] + """ + + self._groups = groups + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CustomerInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CustomerInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/customer_users_filter.py b/tb_rest_client/models/models_pe/customer_users_filter.py new file mode 100644 index 00000000..4347d664 --- /dev/null +++ b/tb_rest_client/models/models_pe/customer_users_filter.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.users_filter import UsersFilter # noqa: F401,E501 + +class CustomerUsersFilter(UsersFilter): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'customer_id': 'str' + } + if hasattr(UsersFilter, "swagger_types"): + swagger_types.update(UsersFilter.swagger_types) + + attribute_map = { + 'customer_id': 'customerId' + } + if hasattr(UsersFilter, "attribute_map"): + attribute_map.update(UsersFilter.attribute_map) + + def __init__(self, customer_id=None, *args, **kwargs): # noqa: E501 + """CustomerUsersFilter - a model defined in Swagger""" # noqa: E501 + self._customer_id = None + self.discriminator = None + self.customer_id = customer_id + UsersFilter.__init__(self, *args, **kwargs) + + @property + def customer_id(self): + """Gets the customer_id of this CustomerUsersFilter. # noqa: E501 + + + :return: The customer_id of this CustomerUsersFilter. # noqa: E501 + :rtype: str + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this CustomerUsersFilter. + + + :param customer_id: The customer_id of this CustomerUsersFilter. # noqa: E501 + :type: str + """ + if customer_id is None: + raise ValueError("Invalid value for `customer_id`, must not be `None`") # noqa: E501 + + self._customer_id = customer_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CustomerUsersFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CustomerUsersFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/dashboard.py b/tb_rest_client/models/models_pe/dashboard.py index 5b5675e5..96e584b1 100644 --- a/tb_rest_client/models/models_pe/dashboard.py +++ b/tb_rest_client/models/models_pe/dashboard.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Dashboard(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,7 @@ class Dashboard(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'DashboardId', + 'id': 'DashboardId', 'created_time': 'int', 'tenant_id': 'TenantId', 'customer_id': 'CustomerId', @@ -39,12 +39,11 @@ class Dashboard(object): 'mobile_hide': 'bool', 'mobile_order': 'int', 'name': 'str', - 'configuration': 'JsonNode', - 'id': 'DashboardId' + 'configuration': 'JsonNode' } attribute_map = { - 'external_id': 'externalId', + 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', 'customer_id': 'customerId', @@ -55,13 +54,12 @@ class Dashboard(object): 'mobile_hide': 'mobileHide', 'mobile_order': 'mobileOrder', 'name': 'name', - 'configuration': 'configuration', - 'id': 'id' + 'configuration': 'configuration' } - def __init__(self, external_id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, title=None, image=None, assigned_customers=None, mobile_hide=None, mobile_order=None, name=None, configuration=None, id=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, title=None, image=None, assigned_customers=None, mobile_hide=None, mobile_order=None, name=None, configuration=None): # noqa: E501 """Dashboard - a model defined in Swagger""" # noqa: E501 - self._external_id = None + self._id = None self._created_time = None self._tenant_id = None self._customer_id = None @@ -73,10 +71,9 @@ def __init__(self, external_id=None, created_time=None, tenant_id=None, customer self._mobile_order = None self._name = None self._configuration = None - self.id = id self.discriminator = None - if external_id is not None: - self.external_id = external_id + if id is not None: + self.id = id if created_time is not None: self.created_time = created_time if tenant_id is not None: @@ -101,25 +98,25 @@ def __init__(self, external_id=None, created_time=None, tenant_id=None, customer self.configuration = configuration @property - def external_id(self): - """Gets the external_id of this Dashboard. # noqa: E501 + def id(self): + """Gets the id of this Dashboard. # noqa: E501 - :return: The external_id of this Dashboard. # noqa: E501 + :return: The id of this Dashboard. # noqa: E501 :rtype: DashboardId """ - return self._external_id + return self._id - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Dashboard. + @id.setter + def id(self, id): + """Sets the id of this Dashboard. - :param external_id: The external_id of this Dashboard. # noqa: E501 + :param id: The id of this Dashboard. # noqa: E501 :type: DashboardId """ - self._external_id = external_id + self._id = id @property def created_time(self): diff --git a/tb_rest_client/models/models_pe/dashboard_id.py b/tb_rest_client/models/models_pe/dashboard_id.py index d27c8abb..967e2e73 100644 --- a/tb_rest_client/models/models_pe/dashboard_id.py +++ b/tb_rest_client/models/models_pe/dashboard_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DashboardId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/dashboard_info.py b/tb_rest_client/models/models_pe/dashboard_info.py index 61e4c027..fbc1ff9a 100644 --- a/tb_rest_client/models/models_pe/dashboard_info.py +++ b/tb_rest_client/models/models_pe/dashboard_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DashboardInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -38,7 +38,10 @@ class DashboardInfo(object): 'assigned_customers': 'list[ShortCustomerInfo]', 'mobile_hide': 'bool', 'mobile_order': 'int', - 'name': 'str' + 'name': 'str', + 'configuration': 'JsonNode', + 'owner_name': 'str', + 'groups': 'list[EntityInfo]' } attribute_map = { @@ -52,10 +55,13 @@ class DashboardInfo(object): 'assigned_customers': 'assignedCustomers', 'mobile_hide': 'mobileHide', 'mobile_order': 'mobileOrder', - 'name': 'name' + 'name': 'name', + 'configuration': 'configuration', + 'owner_name': 'ownerName', + 'groups': 'groups' } - def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, title=None, image=None, assigned_customers=None, mobile_hide=None, mobile_order=None, name=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, title=None, image=None, assigned_customers=None, mobile_hide=None, mobile_order=None, name=None, configuration=None, owner_name=None, groups=None): # noqa: E501 """DashboardInfo - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None @@ -68,6 +74,9 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self._mobile_hide = None self._mobile_order = None self._name = None + self._configuration = None + self._owner_name = None + self._groups = None self.discriminator = None if id is not None: self.id = id @@ -91,6 +100,12 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.mobile_order = mobile_order if name is not None: self.name = name + if configuration is not None: + self.configuration = configuration + if owner_name is not None: + self.owner_name = owner_name + if groups is not None: + self.groups = groups @property def id(self): @@ -337,6 +352,73 @@ def name(self, name): self._name = name + @property + def configuration(self): + """Gets the configuration of this DashboardInfo. # noqa: E501 + + + :return: The configuration of this DashboardInfo. # noqa: E501 + :rtype: JsonNode + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this DashboardInfo. + + + :param configuration: The configuration of this DashboardInfo. # noqa: E501 + :type: JsonNode + """ + + self._configuration = configuration + + @property + def owner_name(self): + """Gets the owner_name of this DashboardInfo. # noqa: E501 + + Owner name # noqa: E501 + + :return: The owner_name of this DashboardInfo. # noqa: E501 + :rtype: str + """ + return self._owner_name + + @owner_name.setter + def owner_name(self, owner_name): + """Sets the owner_name of this DashboardInfo. + + Owner name # noqa: E501 + + :param owner_name: The owner_name of this DashboardInfo. # noqa: E501 + :type: str + """ + + self._owner_name = owner_name + + @property + def groups(self): + """Gets the groups of this DashboardInfo. # noqa: E501 + + Groups # noqa: E501 + + :return: The groups of this DashboardInfo. # noqa: E501 + :rtype: list[EntityInfo] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this DashboardInfo. + + Groups # noqa: E501 + + :param groups: The groups of this DashboardInfo. # noqa: E501 + :type: list[EntityInfo] + """ + + self._groups = groups + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_pe/debug_converter_event_filter.py b/tb_rest_client/models/models_pe/debug_converter_event_filter.py index e5042ecf..ac42fe65 100644 --- a/tb_rest_client/models/models_pe/debug_converter_event_filter.py +++ b/tb_rest_client/models/models_pe/debug_converter_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .event_filter import EventFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.event_filter import EventFilter # noqa: F401,E501 class DebugConverterEventFilter(EventFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -32,6 +32,7 @@ class DebugConverterEventFilter(EventFilter): 'error': 'bool', '_in': 'str', 'metadata': 'str', + 'not_empty': 'bool', 'out': 'str', 'type': 'str', 'event_type': 'str', @@ -45,6 +46,7 @@ class DebugConverterEventFilter(EventFilter): 'error': 'error', '_in': 'in', 'metadata': 'metadata', + 'not_empty': 'notEmpty', 'out': 'out', 'type': 'type', 'event_type': 'eventType', @@ -54,11 +56,12 @@ class DebugConverterEventFilter(EventFilter): if hasattr(EventFilter, "attribute_map"): attribute_map.update(EventFilter.attribute_map) - def __init__(self, error=None, _in=None, metadata=None, out=None, type=None, event_type=None, server=None, error_str=None, *args, **kwargs): # noqa: E501 + def __init__(self, error=None, _in=None, metadata=None, not_empty=None, out=None, type=None, event_type=None, server=None, error_str=None, *args, **kwargs): # noqa: E501 """DebugConverterEventFilter - a model defined in Swagger""" # noqa: E501 self._error = None self.__in = None self._metadata = None + self._not_empty = None self._out = None self._type = None self._event_type = None @@ -71,6 +74,8 @@ def __init__(self, error=None, _in=None, metadata=None, out=None, type=None, eve self._in = _in if metadata is not None: self.metadata = metadata + if not_empty is not None: + self.not_empty = not_empty if out is not None: self.out = out if type is not None: @@ -145,6 +150,27 @@ def metadata(self, metadata): self._metadata = metadata + @property + def not_empty(self): + """Gets the not_empty of this DebugConverterEventFilter. # noqa: E501 + + + :return: The not_empty of this DebugConverterEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this DebugConverterEventFilter. + + + :param not_empty: The not_empty of this DebugConverterEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + @property def out(self): """Gets the out of this DebugConverterEventFilter. # noqa: E501 @@ -209,7 +235,7 @@ def event_type(self, event_type): """ if event_type is None: raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 - allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "STATS"] # noqa: E501 + allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "RAW_DATA", "STATS"] # noqa: E501 if event_type not in allowed_values: raise ValueError( "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/debug_integration_event_filter.py b/tb_rest_client/models/models_pe/debug_integration_event_filter.py index 07ca6d55..e09055f6 100644 --- a/tb_rest_client/models/models_pe/debug_integration_event_filter.py +++ b/tb_rest_client/models/models_pe/debug_integration_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .event_filter import EventFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.event_filter import EventFilter # noqa: F401,E501 class DebugIntegrationEventFilter(EventFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -31,7 +31,8 @@ class DebugIntegrationEventFilter(EventFilter): swagger_types = { 'error': 'bool', 'message': 'str', - 'status': 'str', + 'not_empty': 'bool', + 'status_integration': 'str', 'type': 'str', 'event_type': 'str', 'server': 'str', @@ -43,7 +44,8 @@ class DebugIntegrationEventFilter(EventFilter): attribute_map = { 'error': 'error', 'message': 'message', - 'status': 'status', + 'not_empty': 'notEmpty', + 'status_integration': 'statusIntegration', 'type': 'type', 'event_type': 'eventType', 'server': 'server', @@ -52,11 +54,12 @@ class DebugIntegrationEventFilter(EventFilter): if hasattr(EventFilter, "attribute_map"): attribute_map.update(EventFilter.attribute_map) - def __init__(self, error=None, message=None, status=None, type=None, event_type=None, server=None, error_str=None, *args, **kwargs): # noqa: E501 + def __init__(self, error=None, message=None, not_empty=None, status_integration=None, type=None, event_type=None, server=None, error_str=None, *args, **kwargs): # noqa: E501 """DebugIntegrationEventFilter - a model defined in Swagger""" # noqa: E501 self._error = None self._message = None - self._status = None + self._not_empty = None + self._status_integration = None self._type = None self._event_type = None self._server = None @@ -66,8 +69,10 @@ def __init__(self, error=None, message=None, status=None, type=None, event_type= self.error = error if message is not None: self.message = message - if status is not None: - self.status = status + if not_empty is not None: + self.not_empty = not_empty + if status_integration is not None: + self.status_integration = status_integration if type is not None: self.type = type self.event_type = event_type @@ -120,25 +125,46 @@ def message(self, message): self._message = message @property - def status(self): - """Gets the status of this DebugIntegrationEventFilter. # noqa: E501 + def not_empty(self): + """Gets the not_empty of this DebugIntegrationEventFilter. # noqa: E501 + + + :return: The not_empty of this DebugIntegrationEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this DebugIntegrationEventFilter. + + + :param not_empty: The not_empty of this DebugIntegrationEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + + @property + def status_integration(self): + """Gets the status_integration of this DebugIntegrationEventFilter. # noqa: E501 - :return: The status of this DebugIntegrationEventFilter. # noqa: E501 + :return: The status_integration of this DebugIntegrationEventFilter. # noqa: E501 :rtype: str """ - return self._status + return self._status_integration - @status.setter - def status(self, status): - """Sets the status of this DebugIntegrationEventFilter. + @status_integration.setter + def status_integration(self, status_integration): + """Sets the status_integration of this DebugIntegrationEventFilter. - :param status: The status of this DebugIntegrationEventFilter. # noqa: E501 + :param status_integration: The status_integration of this DebugIntegrationEventFilter. # noqa: E501 :type: str """ - self._status = status + self._status_integration = status_integration @property def type(self): @@ -183,7 +209,7 @@ def event_type(self, event_type): """ if event_type is None: raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 - allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "STATS"] # noqa: E501 + allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "RAW_DATA", "STATS"] # noqa: E501 if event_type not in allowed_values: raise ValueError( "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/debug_rule_chain_event_filter.py b/tb_rest_client/models/models_pe/debug_rule_chain_event_filter.py index 2c4108a8..a876c0f4 100644 --- a/tb_rest_client/models/models_pe/debug_rule_chain_event_filter.py +++ b/tb_rest_client/models/models_pe/debug_rule_chain_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.4.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_pe/debug_rule_node_event_filter.py b/tb_rest_client/models/models_pe/debug_rule_node_event_filter.py index d7e8d4a5..e7702f68 100644 --- a/tb_rest_client/models/models_pe/debug_rule_node_event_filter.py +++ b/tb_rest_client/models/models_pe/debug_rule_node_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.4.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_pe/default_coap_device_type_configuration.py b/tb_rest_client/models/models_pe/default_coap_device_type_configuration.py index 35b9a18d..6d2484ad 100644 --- a/tb_rest_client/models/models_pe/default_coap_device_type_configuration.py +++ b/tb_rest_client/models/models_pe/default_coap_device_type_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .coap_device_type_configuration import CoapDeviceTypeConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.coap_device_type_configuration import CoapDeviceTypeConfiguration # noqa: F401,E501 class DefaultCoapDeviceTypeConfiguration(CoapDeviceTypeConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/default_device_configuration.py b/tb_rest_client/models/models_pe/default_device_configuration.py index 3e54b36f..2a7d0c5b 100644 --- a/tb_rest_client/models/models_pe/default_device_configuration.py +++ b/tb_rest_client/models/models_pe/default_device_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_configuration import DeviceConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.device_configuration import DeviceConfiguration # noqa: F401,E501 class DefaultDeviceConfiguration(DeviceConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/default_device_profile_configuration.py b/tb_rest_client/models/models_pe/default_device_profile_configuration.py index bf6c5447..a14b8d6d 100644 --- a/tb_rest_client/models/models_pe/default_device_profile_configuration.py +++ b/tb_rest_client/models/models_pe/default_device_profile_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DefaultDeviceProfileConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/default_device_profile_transport_configuration.py b/tb_rest_client/models/models_pe/default_device_profile_transport_configuration.py index 868d68e8..d586e059 100644 --- a/tb_rest_client/models/models_pe/default_device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_pe/default_device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DefaultDeviceProfileTransportConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/default_device_transport_configuration.py b/tb_rest_client/models/models_pe/default_device_transport_configuration.py index d554d879..6ac36da9 100644 --- a/tb_rest_client/models/models_pe/default_device_transport_configuration.py +++ b/tb_rest_client/models/models_pe/default_device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 class DefaultDeviceTransportConfiguration(DeviceTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/default_rule_chain_create_request.py b/tb_rest_client/models/models_pe/default_rule_chain_create_request.py index 8b88a15d..95cabf60 100644 --- a/tb_rest_client/models/models_pe/default_rule_chain_create_request.py +++ b/tb_rest_client/models/models_pe/default_rule_chain_create_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DefaultRuleChainCreateRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/default_tenant_profile_configuration.py b/tb_rest_client/models/models_pe/default_tenant_profile_configuration.py index 977464e5..5aec813f 100644 --- a/tb_rest_client/models/models_pe/default_tenant_profile_configuration.py +++ b/tb_rest_client/models/models_pe/default_tenant_profile_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DefaultTenantProfileConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -63,6 +63,8 @@ class DefaultTenantProfileConfiguration(object): 'rpc_ttl_days': 'int', 'tenant_entity_export_rate_limit': 'str', 'tenant_entity_import_rate_limit': 'str', + 'tenant_notification_requests_per_rule_rate_limit': 'str', + 'tenant_notification_requests_rate_limit': 'str', 'tenant_server_rest_limits_configuration': 'str', 'transport_device_msg_rate_limit': 'str', 'transport_device_telemetry_data_points_rate_limit': 'str', @@ -111,6 +113,8 @@ class DefaultTenantProfileConfiguration(object): 'rpc_ttl_days': 'rpcTtlDays', 'tenant_entity_export_rate_limit': 'tenantEntityExportRateLimit', 'tenant_entity_import_rate_limit': 'tenantEntityImportRateLimit', + 'tenant_notification_requests_per_rule_rate_limit': 'tenantNotificationRequestsPerRuleRateLimit', + 'tenant_notification_requests_rate_limit': 'tenantNotificationRequestsRateLimit', 'tenant_server_rest_limits_configuration': 'tenantServerRestLimitsConfiguration', 'transport_device_msg_rate_limit': 'transportDeviceMsgRateLimit', 'transport_device_telemetry_data_points_rate_limit': 'transportDeviceTelemetryDataPointsRateLimit', @@ -123,7 +127,7 @@ class DefaultTenantProfileConfiguration(object): 'ws_updates_per_session_rate_limit': 'wsUpdatesPerSessionRateLimit' } - def __init__(self, alarms_ttl_days=None, cassandra_query_tenant_rate_limits_configuration=None, customer_server_rest_limits_configuration=None, default_storage_ttl_days=None, max_assets=None, max_converters=None, max_created_alarms=None, max_customers=None, max_dp_storage_days=None, max_dashboards=None, max_devices=None, max_emails=None, max_integrations=None, max_js_executions=None, max_ota_packages_in_bytes=None, max_re_executions=None, max_resources_in_bytes=None, max_rule_chains=None, max_rule_node_executions_per_message=None, max_scheduler_events=None, max_sms=None, max_transport_data_points=None, max_transport_messages=None, max_users=None, max_ws_sessions_per_customer=None, max_ws_sessions_per_public_user=None, max_ws_sessions_per_regular_user=None, max_ws_sessions_per_tenant=None, max_ws_subscriptions_per_customer=None, max_ws_subscriptions_per_public_user=None, max_ws_subscriptions_per_regular_user=None, max_ws_subscriptions_per_tenant=None, rpc_ttl_days=None, tenant_entity_export_rate_limit=None, tenant_entity_import_rate_limit=None, tenant_server_rest_limits_configuration=None, transport_device_msg_rate_limit=None, transport_device_telemetry_data_points_rate_limit=None, transport_device_telemetry_msg_rate_limit=None, transport_tenant_msg_rate_limit=None, transport_tenant_telemetry_data_points_rate_limit=None, transport_tenant_telemetry_msg_rate_limit=None, warn_threshold=None, ws_msg_queue_limit_per_session=None, ws_updates_per_session_rate_limit=None): # noqa: E501 + def __init__(self, alarms_ttl_days=None, cassandra_query_tenant_rate_limits_configuration=None, customer_server_rest_limits_configuration=None, default_storage_ttl_days=None, max_assets=None, max_converters=None, max_created_alarms=None, max_customers=None, max_dp_storage_days=None, max_dashboards=None, max_devices=None, max_emails=None, max_integrations=None, max_js_executions=None, max_ota_packages_in_bytes=None, max_re_executions=None, max_resources_in_bytes=None, max_rule_chains=None, max_rule_node_executions_per_message=None, max_scheduler_events=None, max_sms=None, max_transport_data_points=None, max_transport_messages=None, max_users=None, max_ws_sessions_per_customer=None, max_ws_sessions_per_public_user=None, max_ws_sessions_per_regular_user=None, max_ws_sessions_per_tenant=None, max_ws_subscriptions_per_customer=None, max_ws_subscriptions_per_public_user=None, max_ws_subscriptions_per_regular_user=None, max_ws_subscriptions_per_tenant=None, rpc_ttl_days=None, tenant_entity_export_rate_limit=None, tenant_entity_import_rate_limit=None, tenant_notification_requests_per_rule_rate_limit=None, tenant_notification_requests_rate_limit=None, tenant_server_rest_limits_configuration=None, transport_device_msg_rate_limit=None, transport_device_telemetry_data_points_rate_limit=None, transport_device_telemetry_msg_rate_limit=None, transport_tenant_msg_rate_limit=None, transport_tenant_telemetry_data_points_rate_limit=None, transport_tenant_telemetry_msg_rate_limit=None, warn_threshold=None, ws_msg_queue_limit_per_session=None, ws_updates_per_session_rate_limit=None): # noqa: E501 """DefaultTenantProfileConfiguration - a model defined in Swagger""" # noqa: E501 self._alarms_ttl_days = None self._cassandra_query_tenant_rate_limits_configuration = None @@ -160,6 +164,8 @@ def __init__(self, alarms_ttl_days=None, cassandra_query_tenant_rate_limits_conf self._rpc_ttl_days = None self._tenant_entity_export_rate_limit = None self._tenant_entity_import_rate_limit = None + self._tenant_notification_requests_per_rule_rate_limit = None + self._tenant_notification_requests_rate_limit = None self._tenant_server_rest_limits_configuration = None self._transport_device_msg_rate_limit = None self._transport_device_telemetry_data_points_rate_limit = None @@ -241,6 +247,10 @@ def __init__(self, alarms_ttl_days=None, cassandra_query_tenant_rate_limits_conf self.tenant_entity_export_rate_limit = tenant_entity_export_rate_limit if tenant_entity_import_rate_limit is not None: self.tenant_entity_import_rate_limit = tenant_entity_import_rate_limit + if tenant_notification_requests_per_rule_rate_limit is not None: + self.tenant_notification_requests_per_rule_rate_limit = tenant_notification_requests_per_rule_rate_limit + if tenant_notification_requests_rate_limit is not None: + self.tenant_notification_requests_rate_limit = tenant_notification_requests_rate_limit if tenant_server_rest_limits_configuration is not None: self.tenant_server_rest_limits_configuration = tenant_server_rest_limits_configuration if transport_device_msg_rate_limit is not None: @@ -997,6 +1007,48 @@ def tenant_entity_import_rate_limit(self, tenant_entity_import_rate_limit): self._tenant_entity_import_rate_limit = tenant_entity_import_rate_limit + @property + def tenant_notification_requests_per_rule_rate_limit(self): + """Gets the tenant_notification_requests_per_rule_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + + + :return: The tenant_notification_requests_per_rule_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + :rtype: str + """ + return self._tenant_notification_requests_per_rule_rate_limit + + @tenant_notification_requests_per_rule_rate_limit.setter + def tenant_notification_requests_per_rule_rate_limit(self, tenant_notification_requests_per_rule_rate_limit): + """Sets the tenant_notification_requests_per_rule_rate_limit of this DefaultTenantProfileConfiguration. + + + :param tenant_notification_requests_per_rule_rate_limit: The tenant_notification_requests_per_rule_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + :type: str + """ + + self._tenant_notification_requests_per_rule_rate_limit = tenant_notification_requests_per_rule_rate_limit + + @property + def tenant_notification_requests_rate_limit(self): + """Gets the tenant_notification_requests_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + + + :return: The tenant_notification_requests_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + :rtype: str + """ + return self._tenant_notification_requests_rate_limit + + @tenant_notification_requests_rate_limit.setter + def tenant_notification_requests_rate_limit(self, tenant_notification_requests_rate_limit): + """Sets the tenant_notification_requests_rate_limit of this DefaultTenantProfileConfiguration. + + + :param tenant_notification_requests_rate_limit: The tenant_notification_requests_rate_limit of this DefaultTenantProfileConfiguration. # noqa: E501 + :type: str + """ + + self._tenant_notification_requests_rate_limit = tenant_notification_requests_rate_limit + @property def tenant_server_rest_limits_configuration(self): """Gets the tenant_server_rest_limits_configuration of this DefaultTenantProfileConfiguration. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/deferred_result_entity_data_diff.py b/tb_rest_client/models/models_pe/deferred_result_entity_data_diff.py index bae55173..db5b7947 100644 --- a/tb_rest_client/models/models_pe/deferred_result_entity_data_diff.py +++ b/tb_rest_client/models/models_pe/deferred_result_entity_data_diff.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultEntityDataDiff(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/deferred_result_entity_data_info.py b/tb_rest_client/models/models_pe/deferred_result_entity_data_info.py index 300cc781..52af2b11 100644 --- a/tb_rest_client/models/models_pe/deferred_result_entity_data_info.py +++ b/tb_rest_client/models/models_pe/deferred_result_entity_data_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultEntityDataInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/deferred_result_list_branch_info.py b/tb_rest_client/models/models_pe/deferred_result_list_branch_info.py index 34bc81d1..da4c55e9 100644 --- a/tb_rest_client/models/models_pe/deferred_result_list_branch_info.py +++ b/tb_rest_client/models/models_pe/deferred_result_list_branch_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultListBranchInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/deferred_result_list_versioned_entity_info.py b/tb_rest_client/models/models_pe/deferred_result_list_versioned_entity_info.py index 788d1e61..55b0b7b9 100644 --- a/tb_rest_client/models/models_pe/deferred_result_list_versioned_entity_info.py +++ b/tb_rest_client/models/models_pe/deferred_result_list_versioned_entity_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultListVersionedEntityInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/deferred_result_page_data_entity_version.py b/tb_rest_client/models/models_pe/deferred_result_page_data_entity_version.py index f7c4b77c..076243f3 100644 --- a/tb_rest_client/models/models_pe/deferred_result_page_data_entity_version.py +++ b/tb_rest_client/models/models_pe/deferred_result_page_data_entity_version.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultPageDataEntityVersion(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/deferred_result_repository_settings.py b/tb_rest_client/models/models_pe/deferred_result_repository_settings.py index d0b637aa..588ff48d 100644 --- a/tb_rest_client/models/models_pe/deferred_result_repository_settings.py +++ b/tb_rest_client/models/models_pe/deferred_result_repository_settings.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultRepositorySettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/deferred_result_response_entity.py b/tb_rest_client/models/models_pe/deferred_result_response_entity.py index 12d1fdee..b5396f82 100644 --- a/tb_rest_client/models/models_pe/deferred_result_response_entity.py +++ b/tb_rest_client/models/models_pe/deferred_result_response_entity.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultResponseEntity(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/deferred_result_void.py b/tb_rest_client/models/models_pe/deferred_result_void.py index 8aa4d40f..3c0da84f 100644 --- a/tb_rest_client/models/models_pe/deferred_result_void.py +++ b/tb_rest_client/models/models_pe/deferred_result_void.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultVoid(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/deferred_resultuuid.py b/tb_rest_client/models/models_pe/deferred_resultuuid.py index d4b187bf..bb1197c1 100644 --- a/tb_rest_client/models/models_pe/deferred_resultuuid.py +++ b/tb_rest_client/models/models_pe/deferred_resultuuid.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeferredResultuuid(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/delivery_method_notification_template.py b/tb_rest_client/models/models_pe/delivery_method_notification_template.py new file mode 100644 index 00000000..d0c4777f --- /dev/null +++ b/tb_rest_client/models/models_pe/delivery_method_notification_template.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class DeliveryMethodNotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'enabled': 'bool' + } + + attribute_map = { + 'body': 'body', + 'enabled': 'enabled' + } + + def __init__(self, body=None, enabled=None): # noqa: E501 + """DeliveryMethodNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._body = None + self._enabled = None + self.discriminator = None + if body is not None: + self.body = body + if enabled is not None: + self.enabled = enabled + + @property + def body(self): + """Gets the body of this DeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The body of this DeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this DeliveryMethodNotificationTemplate. + + + :param body: The body of this DeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def enabled(self): + """Gets the enabled of this DeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The enabled of this DeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this DeliveryMethodNotificationTemplate. + + + :param enabled: The enabled of this DeliveryMethodNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeliveryMethodNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeliveryMethodNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/device.py b/tb_rest_client/models/models_pe/device.py index d9029324..3c88989c 100644 --- a/tb_rest_client/models/models_pe/device.py +++ b/tb_rest_client/models/models_pe/device.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Device(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class Device(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'DeviceId', 'id': 'DeviceId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -45,7 +44,6 @@ class Device(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -61,9 +59,8 @@ class Device(object): 'additional_info': 'additionalInfo' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, name=None, type=None, label=None, device_profile_id=None, device_data=None, firmware_id=None, software_id=None, additional_info=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, name=None, type=None, label=None, device_profile_id=None, device_data=None, firmware_id=None, software_id=None, additional_info=None): # noqa: E501 """Device - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -78,8 +75,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._software_id = None self._additional_info = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -92,8 +87,7 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self.owner_id = owner_id self.name = name self.type = type - if label is not None: - self.label = label + self.label = label self.device_profile_id = device_profile_id if device_data is not None: self.device_data = device_data @@ -104,27 +98,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if additional_info is not None: self.additional_info = additional_info - @property - def external_id(self): - """Gets the external_id of this Device. # noqa: E501 - - - :return: The external_id of this Device. # noqa: E501 - :rtype: DeviceId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Device. - - - :param external_id: The external_id of this Device. # noqa: E501 - :type: DeviceId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this Device. # noqa: E501 @@ -277,8 +250,8 @@ def type(self, type): :param type: The type of this Device. # noqa: E501 :type: str """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + # if type is None: + # raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @@ -302,8 +275,6 @@ def label(self, label): :param label: The label of this Device. # noqa: E501 :type: str """ - if label is None: - self._label = None self._label = label diff --git a/tb_rest_client/models/models_pe/device_activity_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/device_activity_notification_rule_trigger_config.py new file mode 100644 index 00000000..f73da183 --- /dev/null +++ b/tb_rest_client/models/models_pe/device_activity_notification_rule_trigger_config.py @@ -0,0 +1,207 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 + +class DeviceActivityNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'device_profiles': 'list[str]', + 'devices': 'list[str]', + 'notify_on': 'list[str]', + 'trigger_type': 'str' + } + if hasattr(NotificationRuleTriggerConfig, "swagger_types"): + swagger_types.update(NotificationRuleTriggerConfig.swagger_types) + + attribute_map = { + 'device_profiles': 'deviceProfiles', + 'devices': 'devices', + 'notify_on': 'notifyOn', + 'trigger_type': 'triggerType' + } + if hasattr(NotificationRuleTriggerConfig, "attribute_map"): + attribute_map.update(NotificationRuleTriggerConfig.attribute_map) + + def __init__(self, device_profiles=None, devices=None, notify_on=None, trigger_type=None, *args, **kwargs): # noqa: E501 + """DeviceActivityNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._device_profiles = None + self._devices = None + self._notify_on = None + self._trigger_type = None + self.discriminator = None + if device_profiles is not None: + self.device_profiles = device_profiles + if devices is not None: + self.devices = devices + if notify_on is not None: + self.notify_on = notify_on + if trigger_type is not None: + self.trigger_type = trigger_type + NotificationRuleTriggerConfig.__init__(self, *args, **kwargs) + + @property + def device_profiles(self): + """Gets the device_profiles of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The device_profiles of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._device_profiles + + @device_profiles.setter + def device_profiles(self, device_profiles): + """Sets the device_profiles of this DeviceActivityNotificationRuleTriggerConfig. + + + :param device_profiles: The device_profiles of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._device_profiles = device_profiles + + @property + def devices(self): + """Gets the devices of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The devices of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._devices + + @devices.setter + def devices(self, devices): + """Sets the devices of this DeviceActivityNotificationRuleTriggerConfig. + + + :param devices: The devices of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._devices = devices + + @property + def notify_on(self): + """Gets the notify_on of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._notify_on + + @notify_on.setter + def notify_on(self, notify_on): + """Sets the notify_on of this DeviceActivityNotificationRuleTriggerConfig. + + + :param notify_on: The notify_on of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACTIVE", "INACTIVE"] # noqa: E501 + if not set(notify_on).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `notify_on` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(notify_on) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._notify_on = notify_on + + @property + def trigger_type(self): + """Gets the trigger_type of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this DeviceActivityNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this DeviceActivityNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeviceActivityNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeviceActivityNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/device_configuration.py b/tb_rest_client/models/models_pe/device_configuration.py index 4d53a33a..750728dd 100644 --- a/tb_rest_client/models/models_pe/device_configuration.py +++ b/tb_rest_client/models/models_pe/device_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_credentials.py b/tb_rest_client/models/models_pe/device_credentials.py new file mode 100644 index 00000000..9da88255 --- /dev/null +++ b/tb_rest_client/models/models_pe/device_credentials.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class DeviceCredentials(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'DeviceCredentialsId', + 'created_time': 'int', + 'device_id': 'DeviceId', + 'credentials_type': 'str', + 'credentials_id': 'str', + 'credentials_value': 'str' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'device_id': 'deviceId', + 'credentials_type': 'credentialsType', + 'credentials_id': 'credentialsId', + 'credentials_value': 'credentialsValue' + } + + def __init__(self, id=None, created_time=None, device_id=None, credentials_type=None, credentials_id=None, credentials_value=None): # noqa: E501 + """DeviceCredentials - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._device_id = None + self._credentials_type = None + self._credentials_id = None + self._credentials_value = None + self.discriminator = None + self.id = id + if created_time is not None: + self.created_time = created_time + self.device_id = device_id + if credentials_type is not None: + self.credentials_type = credentials_type + self.credentials_id = credentials_id + if credentials_value is not None: + self.credentials_value = credentials_value + + @property + def id(self): + """Gets the id of this DeviceCredentials. # noqa: E501 + + + :return: The id of this DeviceCredentials. # noqa: E501 + :rtype: DeviceCredentialsId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DeviceCredentials. + + + :param id: The id of this DeviceCredentials. # noqa: E501 + :type: DeviceCredentialsId + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this DeviceCredentials. # noqa: E501 + + Timestamp of the device credentials creation, in milliseconds # noqa: E501 + + :return: The created_time of this DeviceCredentials. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this DeviceCredentials. + + Timestamp of the device credentials creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this DeviceCredentials. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def device_id(self): + """Gets the device_id of this DeviceCredentials. # noqa: E501 + + + :return: The device_id of this DeviceCredentials. # noqa: E501 + :rtype: DeviceId + """ + return self._device_id + + @device_id.setter + def device_id(self, device_id): + """Sets the device_id of this DeviceCredentials. + + + :param device_id: The device_id of this DeviceCredentials. # noqa: E501 + :type: DeviceId + """ + if device_id is None: + raise ValueError("Invalid value for `device_id`, must not be `None`") # noqa: E501 + + self._device_id = device_id + + @property + def credentials_type(self): + """Gets the credentials_type of this DeviceCredentials. # noqa: E501 + + Type of the credentials # noqa: E501 + + :return: The credentials_type of this DeviceCredentials. # noqa: E501 + :rtype: str + """ + return self._credentials_type + + @credentials_type.setter + def credentials_type(self, credentials_type): + """Sets the credentials_type of this DeviceCredentials. + + Type of the credentials # noqa: E501 + + :param credentials_type: The credentials_type of this DeviceCredentials. # noqa: E501 + :type: str + """ + allowed_values = ["ACCESS_TOKEN", "LWM2M_CREDENTIALS", "MQTT_BASIC", "X509_CERTIFICATE"] # noqa: E501 + if credentials_type not in allowed_values: + raise ValueError( + "Invalid value for `credentials_type` ({0}), must be one of {1}" # noqa: E501 + .format(credentials_type, allowed_values) + ) + + self._credentials_type = credentials_type + + @property + def credentials_id(self): + """Gets the credentials_id of this DeviceCredentials. # noqa: E501 + + Unique Credentials Id per platform instance. Used to lookup credentials from the database. By default, new access token for your device. Depends on the type of the credentials. # noqa: E501 + + :return: The credentials_id of this DeviceCredentials. # noqa: E501 + :rtype: str + """ + return self._credentials_id + + @credentials_id.setter + def credentials_id(self, credentials_id): + """Sets the credentials_id of this DeviceCredentials. + + Unique Credentials Id per platform instance. Used to lookup credentials from the database. By default, new access token for your device. Depends on the type of the credentials. # noqa: E501 + + :param credentials_id: The credentials_id of this DeviceCredentials. # noqa: E501 + :type: str + """ + if credentials_id is None: + raise ValueError("Invalid value for `credentials_id`, must not be `None`") # noqa: E501 + + self._credentials_id = credentials_id + + @property + def credentials_value(self): + """Gets the credentials_value of this DeviceCredentials. # noqa: E501 + + Value of the credentials. Null in case of ACCESS_TOKEN credentials type. Base64 value in case of X509_CERTIFICATE. Complex object in case of MQTT_BASIC and LWM2M_CREDENTIALS # noqa: E501 + + :return: The credentials_value of this DeviceCredentials. # noqa: E501 + :rtype: str + """ + return self._credentials_value + + @credentials_value.setter + def credentials_value(self, credentials_value): + """Sets the credentials_value of this DeviceCredentials. + + Value of the credentials. Null in case of ACCESS_TOKEN credentials type. Base64 value in case of X509_CERTIFICATE. Complex object in case of MQTT_BASIC and LWM2M_CREDENTIALS # noqa: E501 + + :param credentials_value: The credentials_value of this DeviceCredentials. # noqa: E501 + :type: str + """ + + self._credentials_value = credentials_value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeviceCredentials, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeviceCredentials): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/device_credentials_id.py b/tb_rest_client/models/models_pe/device_credentials_id.py index 86896fbd..ca149160 100644 --- a/tb_rest_client/models/models_pe/device_credentials_id.py +++ b/tb_rest_client/models/models_pe/device_credentials_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceCredentialsId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,11 +28,11 @@ class DeviceCredentialsId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', + 'id': 'str' } attribute_map = { - 'id': 'id', + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_pe/device_data.py b/tb_rest_client/models/models_pe/device_data.py index ff1d38c7..d74a6bba 100644 --- a/tb_rest_client/models/models_pe/device_data.py +++ b/tb_rest_client/models/models_pe/device_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_export_data.py b/tb_rest_client/models/models_pe/device_export_data.py index 7b3d7d96..19ca5ab8 100644 --- a/tb_rest_client/models/models_pe/device_export_data.py +++ b/tb_rest_client/models/models_pe/device_export_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 class DeviceExportData(EntityExportDataobject): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -149,7 +149,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this DeviceExportData. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/device_group_ota_package.py b/tb_rest_client/models/models_pe/device_group_ota_package.py index 2b329be9..5bc6e572 100644 --- a/tb_rest_client/models/models_pe/device_group_ota_package.py +++ b/tb_rest_client/models/models_pe/device_group_ota_package.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceGroupOtaPackage(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_id.py b/tb_rest_client/models/models_pe/device_id.py index a63730e2..03d75727 100644 --- a/tb_rest_client/models/models_pe/device_id.py +++ b/tb_rest_client/models/models_pe/device_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_info.py b/tb_rest_client/models/models_pe/device_info.py new file mode 100644 index 00000000..692fff93 --- /dev/null +++ b/tb_rest_client/models/models_pe/device_info.py @@ -0,0 +1,516 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class DeviceInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'DeviceId', + 'created_time': 'int', + 'tenant_id': 'TenantId', + 'customer_id': 'CustomerId', + 'owner_id': 'EntityId', + 'name': 'str', + 'type': 'str', + 'label': 'str', + 'device_profile_id': 'DeviceProfileId', + 'device_data': 'DeviceData', + 'firmware_id': 'OtaPackageId', + 'software_id': 'OtaPackageId', + 'additional_info': 'JsonNode', + 'owner_name': 'str', + 'groups': 'list[EntityInfo]', + 'active': 'bool' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'tenant_id': 'tenantId', + 'customer_id': 'customerId', + 'owner_id': 'ownerId', + 'name': 'name', + 'type': 'type', + 'label': 'label', + 'device_profile_id': 'deviceProfileId', + 'device_data': 'deviceData', + 'firmware_id': 'firmwareId', + 'software_id': 'softwareId', + 'additional_info': 'additionalInfo', + 'owner_name': 'ownerName', + 'groups': 'groups', + 'active': 'active' + } + + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, name=None, type=None, label=None, device_profile_id=None, device_data=None, firmware_id=None, software_id=None, additional_info=None, owner_name=None, groups=None, active=None): # noqa: E501 + """DeviceInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._tenant_id = None + self._customer_id = None + self._owner_id = None + self._name = None + self._type = None + self._label = None + self._device_profile_id = None + self._device_data = None + self._firmware_id = None + self._software_id = None + self._additional_info = None + self._owner_name = None + self._groups = None + self._active = None + self.discriminator = None + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if tenant_id is not None: + self.tenant_id = tenant_id + if customer_id is not None: + self.customer_id = customer_id + if owner_id is not None: + self.owner_id = owner_id + self.name = name + self.type = type + self.label = label + self.device_profile_id = device_profile_id + if device_data is not None: + self.device_data = device_data + if firmware_id is not None: + self.firmware_id = firmware_id + if software_id is not None: + self.software_id = software_id + if additional_info is not None: + self.additional_info = additional_info + if owner_name is not None: + self.owner_name = owner_name + if groups is not None: + self.groups = groups + if active is not None: + self.active = active + + @property + def id(self): + """Gets the id of this DeviceInfo. # noqa: E501 + + + :return: The id of this DeviceInfo. # noqa: E501 + :rtype: DeviceId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DeviceInfo. + + + :param id: The id of this DeviceInfo. # noqa: E501 + :type: DeviceId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this DeviceInfo. # noqa: E501 + + Timestamp of the device creation, in milliseconds # noqa: E501 + + :return: The created_time of this DeviceInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this DeviceInfo. + + Timestamp of the device creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this DeviceInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def tenant_id(self): + """Gets the tenant_id of this DeviceInfo. # noqa: E501 + + + :return: The tenant_id of this DeviceInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this DeviceInfo. + + + :param tenant_id: The tenant_id of this DeviceInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def customer_id(self): + """Gets the customer_id of this DeviceInfo. # noqa: E501 + + + :return: The customer_id of this DeviceInfo. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this DeviceInfo. + + + :param customer_id: The customer_id of this DeviceInfo. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def owner_id(self): + """Gets the owner_id of this DeviceInfo. # noqa: E501 + + + :return: The owner_id of this DeviceInfo. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this DeviceInfo. + + + :param owner_id: The owner_id of this DeviceInfo. # noqa: E501 + :type: EntityId + """ + + self._owner_id = owner_id + + @property + def name(self): + """Gets the name of this DeviceInfo. # noqa: E501 + + Unique Device Name in scope of Tenant # noqa: E501 + + :return: The name of this DeviceInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DeviceInfo. + + Unique Device Name in scope of Tenant # noqa: E501 + + :param name: The name of this DeviceInfo. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def type(self): + """Gets the type of this DeviceInfo. # noqa: E501 + + Device Profile Name # noqa: E501 + + :return: The type of this DeviceInfo. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this DeviceInfo. + + Device Profile Name # noqa: E501 + + :param type: The type of this DeviceInfo. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + @property + def label(self): + """Gets the label of this DeviceInfo. # noqa: E501 + + Label that may be used in widgets # noqa: E501 + + :return: The label of this DeviceInfo. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this DeviceInfo. + + Label that may be used in widgets # noqa: E501 + + :param label: The label of this DeviceInfo. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def device_profile_id(self): + """Gets the device_profile_id of this DeviceInfo. # noqa: E501 + + + :return: The device_profile_id of this DeviceInfo. # noqa: E501 + :rtype: DeviceProfileId + """ + return self._device_profile_id + + @device_profile_id.setter + def device_profile_id(self, device_profile_id): + """Sets the device_profile_id of this DeviceInfo. + + + :param device_profile_id: The device_profile_id of this DeviceInfo. # noqa: E501 + :type: DeviceProfileId + """ + if device_profile_id is None: + raise ValueError("Invalid value for `device_profile_id`, must not be `None`") # noqa: E501 + + self._device_profile_id = device_profile_id + + @property + def device_data(self): + """Gets the device_data of this DeviceInfo. # noqa: E501 + + + :return: The device_data of this DeviceInfo. # noqa: E501 + :rtype: DeviceData + """ + return self._device_data + + @device_data.setter + def device_data(self, device_data): + """Sets the device_data of this DeviceInfo. + + + :param device_data: The device_data of this DeviceInfo. # noqa: E501 + :type: DeviceData + """ + + self._device_data = device_data + + @property + def firmware_id(self): + """Gets the firmware_id of this DeviceInfo. # noqa: E501 + + + :return: The firmware_id of this DeviceInfo. # noqa: E501 + :rtype: OtaPackageId + """ + return self._firmware_id + + @firmware_id.setter + def firmware_id(self, firmware_id): + """Sets the firmware_id of this DeviceInfo. + + + :param firmware_id: The firmware_id of this DeviceInfo. # noqa: E501 + :type: OtaPackageId + """ + + self._firmware_id = firmware_id + + @property + def software_id(self): + """Gets the software_id of this DeviceInfo. # noqa: E501 + + + :return: The software_id of this DeviceInfo. # noqa: E501 + :rtype: OtaPackageId + """ + return self._software_id + + @software_id.setter + def software_id(self, software_id): + """Sets the software_id of this DeviceInfo. + + + :param software_id: The software_id of this DeviceInfo. # noqa: E501 + :type: OtaPackageId + """ + + self._software_id = software_id + + @property + def additional_info(self): + """Gets the additional_info of this DeviceInfo. # noqa: E501 + + + :return: The additional_info of this DeviceInfo. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this DeviceInfo. + + + :param additional_info: The additional_info of this DeviceInfo. # noqa: E501 + :type: JsonNode + """ + + self._additional_info = additional_info + + @property + def owner_name(self): + """Gets the owner_name of this DeviceInfo. # noqa: E501 + + Owner name # noqa: E501 + + :return: The owner_name of this DeviceInfo. # noqa: E501 + :rtype: str + """ + return self._owner_name + + @owner_name.setter + def owner_name(self, owner_name): + """Sets the owner_name of this DeviceInfo. + + Owner name # noqa: E501 + + :param owner_name: The owner_name of this DeviceInfo. # noqa: E501 + :type: str + """ + + self._owner_name = owner_name + + @property + def groups(self): + """Gets the groups of this DeviceInfo. # noqa: E501 + + Groups # noqa: E501 + + :return: The groups of this DeviceInfo. # noqa: E501 + :rtype: list[EntityInfo] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this DeviceInfo. + + Groups # noqa: E501 + + :param groups: The groups of this DeviceInfo. # noqa: E501 + :type: list[EntityInfo] + """ + + self._groups = groups + + @property + def active(self): + """Gets the active of this DeviceInfo. # noqa: E501 + + Device active flag. # noqa: E501 + + :return: The active of this DeviceInfo. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this DeviceInfo. + + Device active flag. # noqa: E501 + + :param active: The active of this DeviceInfo. # noqa: E501 + :type: bool + """ + + self._active = active + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeviceInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeviceInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/device_profile.py b/tb_rest_client/models/models_pe/device_profile.py new file mode 100644 index 00000000..a7a76552 --- /dev/null +++ b/tb_rest_client/models/models_pe/device_profile.py @@ -0,0 +1,590 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class DeviceProfile(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'DeviceProfileId', + 'created_time': 'int', + 'tenant_id': 'TenantId', + 'name': 'str', + 'default': 'bool', + 'default_dashboard_id': 'DashboardId', + 'default_rule_chain_id': 'RuleChainId', + 'default_queue_name': 'str', + 'firmware_id': 'OtaPackageId', + 'software_id': 'OtaPackageId', + 'description': 'str', + 'image': 'str', + 'provision_device_key': 'str', + 'transport_type': 'str', + 'provision_type': 'str', + 'profile_data': 'DeviceProfileData', + 'type': 'str', + 'default_edge_rule_chain_id': 'RuleChainId' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'tenant_id': 'tenantId', + 'name': 'name', + 'default': 'default', + 'default_dashboard_id': 'defaultDashboardId', + 'default_rule_chain_id': 'defaultRuleChainId', + 'default_queue_name': 'defaultQueueName', + 'firmware_id': 'firmwareId', + 'software_id': 'softwareId', + 'description': 'description', + 'image': 'image', + 'provision_device_key': 'provisionDeviceKey', + 'transport_type': 'transportType', + 'provision_type': 'provisionType', + 'profile_data': 'profileData', + 'type': 'type', + 'default_edge_rule_chain_id': 'defaultEdgeRuleChainId' + } + + def __init__(self, id=None, created_time=None, tenant_id=None, name=None, default=None, default_dashboard_id=None, default_rule_chain_id=None, default_queue_name=None, firmware_id=None, software_id=None, description=None, image=None, provision_device_key=None, transport_type=None, provision_type=None, profile_data=None, type=None, default_edge_rule_chain_id=None): # noqa: E501 + """DeviceProfile - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._tenant_id = None + self._name = None + self._default = None + self._default_dashboard_id = None + self._default_rule_chain_id = None + self._default_queue_name = None + self._firmware_id = None + self._software_id = None + self._description = None + self._image = None + self._provision_device_key = None + self._transport_type = None + self._provision_type = None + self._profile_data = None + self._type = None + self._default_edge_rule_chain_id = None + self.discriminator = None + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if tenant_id is not None: + self.tenant_id = tenant_id + if name is not None: + self.name = name + if default is not None: + self.default = default + if default_dashboard_id is not None: + self.default_dashboard_id = default_dashboard_id + if default_rule_chain_id is not None: + self.default_rule_chain_id = default_rule_chain_id + if default_queue_name is not None: + self.default_queue_name = default_queue_name + if firmware_id is not None: + self.firmware_id = firmware_id + if software_id is not None: + self.software_id = software_id + if description is not None: + self.description = description + if image is not None: + self.image = image + if provision_device_key is not None: + self.provision_device_key = provision_device_key + if transport_type is not None: + self.transport_type = transport_type + if provision_type is not None: + self.provision_type = provision_type + if profile_data is not None: + self.profile_data = profile_data + if type is not None: + self.type = type + if default_edge_rule_chain_id is not None: + self.default_edge_rule_chain_id = default_edge_rule_chain_id + + @property + def id(self): + """Gets the id of this DeviceProfile. # noqa: E501 + + + :return: The id of this DeviceProfile. # noqa: E501 + :rtype: DeviceProfileId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DeviceProfile. + + + :param id: The id of this DeviceProfile. # noqa: E501 + :type: DeviceProfileId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this DeviceProfile. # noqa: E501 + + Timestamp of the profile creation, in milliseconds # noqa: E501 + + :return: The created_time of this DeviceProfile. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this DeviceProfile. + + Timestamp of the profile creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this DeviceProfile. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def tenant_id(self): + """Gets the tenant_id of this DeviceProfile. # noqa: E501 + + + :return: The tenant_id of this DeviceProfile. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this DeviceProfile. + + + :param tenant_id: The tenant_id of this DeviceProfile. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def name(self): + """Gets the name of this DeviceProfile. # noqa: E501 + + Unique Device Profile Name in scope of Tenant. # noqa: E501 + + :return: The name of this DeviceProfile. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DeviceProfile. + + Unique Device Profile Name in scope of Tenant. # noqa: E501 + + :param name: The name of this DeviceProfile. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def default(self): + """Gets the default of this DeviceProfile. # noqa: E501 + + Used to mark the default profile. Default profile is used when the device profile is not specified during device creation. # noqa: E501 + + :return: The default of this DeviceProfile. # noqa: E501 + :rtype: bool + """ + return self._default + + @default.setter + def default(self, default): + """Sets the default of this DeviceProfile. + + Used to mark the default profile. Default profile is used when the device profile is not specified during device creation. # noqa: E501 + + :param default: The default of this DeviceProfile. # noqa: E501 + :type: bool + """ + + self._default = default + + @property + def default_dashboard_id(self): + """Gets the default_dashboard_id of this DeviceProfile. # noqa: E501 + + + :return: The default_dashboard_id of this DeviceProfile. # noqa: E501 + :rtype: DashboardId + """ + return self._default_dashboard_id + + @default_dashboard_id.setter + def default_dashboard_id(self, default_dashboard_id): + """Sets the default_dashboard_id of this DeviceProfile. + + + :param default_dashboard_id: The default_dashboard_id of this DeviceProfile. # noqa: E501 + :type: DashboardId + """ + + self._default_dashboard_id = default_dashboard_id + + @property + def default_rule_chain_id(self): + """Gets the default_rule_chain_id of this DeviceProfile. # noqa: E501 + + + :return: The default_rule_chain_id of this DeviceProfile. # noqa: E501 + :rtype: RuleChainId + """ + return self._default_rule_chain_id + + @default_rule_chain_id.setter + def default_rule_chain_id(self, default_rule_chain_id): + """Sets the default_rule_chain_id of this DeviceProfile. + + + :param default_rule_chain_id: The default_rule_chain_id of this DeviceProfile. # noqa: E501 + :type: RuleChainId + """ + + self._default_rule_chain_id = default_rule_chain_id + + @property + def default_queue_name(self): + """Gets the default_queue_name of this DeviceProfile. # noqa: E501 + + Rule engine queue name. 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. # noqa: E501 + + :return: The default_queue_name of this DeviceProfile. # noqa: E501 + :rtype: str + """ + return self._default_queue_name + + @default_queue_name.setter + def default_queue_name(self, default_queue_name): + """Sets the default_queue_name of this DeviceProfile. + + Rule engine queue name. 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. # noqa: E501 + + :param default_queue_name: The default_queue_name of this DeviceProfile. # noqa: E501 + :type: str + """ + + self._default_queue_name = default_queue_name + + @property + def firmware_id(self): + """Gets the firmware_id of this DeviceProfile. # noqa: E501 + + + :return: The firmware_id of this DeviceProfile. # noqa: E501 + :rtype: OtaPackageId + """ + return self._firmware_id + + @firmware_id.setter + def firmware_id(self, firmware_id): + """Sets the firmware_id of this DeviceProfile. + + + :param firmware_id: The firmware_id of this DeviceProfile. # noqa: E501 + :type: OtaPackageId + """ + + self._firmware_id = firmware_id + + @property + def software_id(self): + """Gets the software_id of this DeviceProfile. # noqa: E501 + + + :return: The software_id of this DeviceProfile. # noqa: E501 + :rtype: OtaPackageId + """ + return self._software_id + + @software_id.setter + def software_id(self, software_id): + """Sets the software_id of this DeviceProfile. + + + :param software_id: The software_id of this DeviceProfile. # noqa: E501 + :type: OtaPackageId + """ + + self._software_id = software_id + + @property + def description(self): + """Gets the description of this DeviceProfile. # noqa: E501 + + Device Profile description. # noqa: E501 + + :return: The description of this DeviceProfile. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this DeviceProfile. + + Device Profile description. # noqa: E501 + + :param description: The description of this DeviceProfile. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def image(self): + """Gets the image of this DeviceProfile. # noqa: E501 + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. # noqa: E501 + + :return: The image of this DeviceProfile. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this DeviceProfile. + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. # noqa: E501 + + :param image: The image of this DeviceProfile. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def provision_device_key(self): + """Gets the provision_device_key of this DeviceProfile. # noqa: E501 + + Unique provisioning key used by 'Device Provisioning' feature. # noqa: E501 + + :return: The provision_device_key of this DeviceProfile. # noqa: E501 + :rtype: str + """ + return self._provision_device_key + + @provision_device_key.setter + def provision_device_key(self, provision_device_key): + """Sets the provision_device_key of this DeviceProfile. + + Unique provisioning key used by 'Device Provisioning' feature. # noqa: E501 + + :param provision_device_key: The provision_device_key of this DeviceProfile. # noqa: E501 + :type: str + """ + + self._provision_device_key = provision_device_key + + @property + def transport_type(self): + """Gets the transport_type of this DeviceProfile. # noqa: E501 + + Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT. # noqa: E501 + + :return: The transport_type of this DeviceProfile. # noqa: E501 + :rtype: str + """ + return self._transport_type + + @transport_type.setter + def transport_type(self, transport_type): + """Sets the transport_type of this DeviceProfile. + + Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT. # noqa: E501 + + :param transport_type: The transport_type of this DeviceProfile. # noqa: E501 + :type: str + """ + allowed_values = ["COAP", "DEFAULT", "LWM2M", "MQTT", "SNMP"] # noqa: E501 + if transport_type not in allowed_values: + raise ValueError( + "Invalid value for `transport_type` ({0}), must be one of {1}" # noqa: E501 + .format(transport_type, allowed_values) + ) + + self._transport_type = transport_type + + @property + def provision_type(self): + """Gets the provision_type of this DeviceProfile. # noqa: E501 + + Provisioning strategy. # noqa: E501 + + :return: The provision_type of this DeviceProfile. # noqa: E501 + :rtype: str + """ + return self._provision_type + + @provision_type.setter + def provision_type(self, provision_type): + """Sets the provision_type of this DeviceProfile. + + Provisioning strategy. # noqa: E501 + + :param provision_type: The provision_type of this DeviceProfile. # noqa: E501 + :type: str + """ + allowed_values = ["ALLOW_CREATE_NEW_DEVICES", "CHECK_PRE_PROVISIONED_DEVICES", "DISABLED", "X509_CERTIFICATE_CHAIN"] # noqa: E501 + if provision_type not in allowed_values: + raise ValueError( + "Invalid value for `provision_type` ({0}), must be one of {1}" # noqa: E501 + .format(provision_type, allowed_values) + ) + + self._provision_type = provision_type + + @property + def profile_data(self): + """Gets the profile_data of this DeviceProfile. # noqa: E501 + + + :return: The profile_data of this DeviceProfile. # noqa: E501 + :rtype: DeviceProfileData + """ + return self._profile_data + + @profile_data.setter + def profile_data(self, profile_data): + """Sets the profile_data of this DeviceProfile. + + + :param profile_data: The profile_data of this DeviceProfile. # noqa: E501 + :type: DeviceProfileData + """ + + self._profile_data = profile_data + + @property + def type(self): + """Gets the type of this DeviceProfile. # noqa: E501 + + Type of the profile. Always 'DEFAULT' for now. Reserved for future use. # noqa: E501 + + :return: The type of this DeviceProfile. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this DeviceProfile. + + Type of the profile. Always 'DEFAULT' for now. Reserved for future use. # noqa: E501 + + :param type: The type of this DeviceProfile. # noqa: E501 + :type: str + """ + allowed_values = ["DEFAULT"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def default_edge_rule_chain_id(self): + """Gets the default_edge_rule_chain_id of this DeviceProfile. # noqa: E501 + + + :return: The default_edge_rule_chain_id of this DeviceProfile. # noqa: E501 + :rtype: RuleChainId + """ + return self._default_edge_rule_chain_id + + @default_edge_rule_chain_id.setter + def default_edge_rule_chain_id(self, default_edge_rule_chain_id): + """Sets the default_edge_rule_chain_id of this DeviceProfile. + + + :param default_edge_rule_chain_id: The default_edge_rule_chain_id of this DeviceProfile. # noqa: E501 + :type: RuleChainId + """ + + self._default_edge_rule_chain_id = default_edge_rule_chain_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeviceProfile, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeviceProfile): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/device_profile_alarm.py b/tb_rest_client/models/models_pe/device_profile_alarm.py index bf8ce524..5273faf7 100644 --- a/tb_rest_client/models/models_pe/device_profile_alarm.py +++ b/tb_rest_client/models/models_pe/device_profile_alarm.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileAlarm(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_profile_configuration.py b/tb_rest_client/models/models_pe/device_profile_configuration.py index 6273b599..10e7ca43 100644 --- a/tb_rest_client/models/models_pe/device_profile_configuration.py +++ b/tb_rest_client/models/models_pe/device_profile_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_profile_data.py b/tb_rest_client/models/models_pe/device_profile_data.py index 018af9aa..343de984 100644 --- a/tb_rest_client/models/models_pe/device_profile_data.py +++ b/tb_rest_client/models/models_pe/device_profile_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_profile_id.py b/tb_rest_client/models/models_pe/device_profile_id.py index c8c52cd2..38cf3153 100644 --- a/tb_rest_client/models/models_pe/device_profile_id.py +++ b/tb_rest_client/models/models_pe/device_profile_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_profile_info.py b/tb_rest_client/models/models_pe/device_profile_info.py new file mode 100644 index 00000000..2cbfb23d --- /dev/null +++ b/tb_rest_client/models/models_pe/device_profile_info.py @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class DeviceProfileInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'EntityId', + 'name': 'str', + 'image': 'str', + 'default_dashboard_id': 'DashboardId', + 'type': 'str', + 'transport_type': 'str', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'image': 'image', + 'default_dashboard_id': 'defaultDashboardId', + 'type': 'type', + 'transport_type': 'transportType', + 'tenant_id': 'tenantId' + } + + def __init__(self, id=None, name=None, image=None, default_dashboard_id=None, type=None, transport_type=None, tenant_id=None): # noqa: E501 + """DeviceProfileInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._image = None + self._default_dashboard_id = None + self._type = None + self._transport_type = None + self._tenant_id = None + self.discriminator = None + if id is not None: + self.id = id + if name is not None: + self.name = name + if image is not None: + self.image = image + if default_dashboard_id is not None: + self.default_dashboard_id = default_dashboard_id + if type is not None: + self.type = type + if transport_type is not None: + self.transport_type = transport_type + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def id(self): + """Gets the id of this DeviceProfileInfo. # noqa: E501 + + + :return: The id of this DeviceProfileInfo. # noqa: E501 + :rtype: EntityId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DeviceProfileInfo. + + + :param id: The id of this DeviceProfileInfo. # noqa: E501 + :type: EntityId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this DeviceProfileInfo. # noqa: E501 + + Entity Name # noqa: E501 + + :return: The name of this DeviceProfileInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DeviceProfileInfo. + + Entity Name # noqa: E501 + + :param name: The name of this DeviceProfileInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def image(self): + """Gets the image of this DeviceProfileInfo. # noqa: E501 + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. # noqa: E501 + + :return: The image of this DeviceProfileInfo. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this DeviceProfileInfo. + + Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. # noqa: E501 + + :param image: The image of this DeviceProfileInfo. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def default_dashboard_id(self): + """Gets the default_dashboard_id of this DeviceProfileInfo. # noqa: E501 + + + :return: The default_dashboard_id of this DeviceProfileInfo. # noqa: E501 + :rtype: DashboardId + """ + return self._default_dashboard_id + + @default_dashboard_id.setter + def default_dashboard_id(self, default_dashboard_id): + """Sets the default_dashboard_id of this DeviceProfileInfo. + + + :param default_dashboard_id: The default_dashboard_id of this DeviceProfileInfo. # noqa: E501 + :type: DashboardId + """ + + self._default_dashboard_id = default_dashboard_id + + @property + def type(self): + """Gets the type of this DeviceProfileInfo. # noqa: E501 + + Type of the profile. Always 'DEFAULT' for now. Reserved for future use. # noqa: E501 + + :return: The type of this DeviceProfileInfo. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this DeviceProfileInfo. + + Type of the profile. Always 'DEFAULT' for now. Reserved for future use. # noqa: E501 + + :param type: The type of this DeviceProfileInfo. # noqa: E501 + :type: str + """ + allowed_values = ["DEFAULT"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def transport_type(self): + """Gets the transport_type of this DeviceProfileInfo. # noqa: E501 + + Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT. # noqa: E501 + + :return: The transport_type of this DeviceProfileInfo. # noqa: E501 + :rtype: str + """ + return self._transport_type + + @transport_type.setter + def transport_type(self, transport_type): + """Sets the transport_type of this DeviceProfileInfo. + + Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT. # noqa: E501 + + :param transport_type: The transport_type of this DeviceProfileInfo. # noqa: E501 + :type: str + """ + allowed_values = ["COAP", "DEFAULT", "LWM2M", "MQTT", "SNMP"] # noqa: E501 + if transport_type not in allowed_values: + raise ValueError( + "Invalid value for `transport_type` ({0}), must be one of {1}" # noqa: E501 + .format(transport_type, allowed_values) + ) + + self._transport_type = transport_type + + @property + def tenant_id(self): + """Gets the tenant_id of this DeviceProfileInfo. # noqa: E501 + + + :return: The tenant_id of this DeviceProfileInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this DeviceProfileInfo. + + + :param tenant_id: The tenant_id of this DeviceProfileInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeviceProfileInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeviceProfileInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/device_profile_provision_configuration.py b/tb_rest_client/models/models_pe/device_profile_provision_configuration.py index e3d05e3a..6721b347 100644 --- a/tb_rest_client/models/models_pe/device_profile_provision_configuration.py +++ b/tb_rest_client/models/models_pe/device_profile_provision_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileProvisionConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_profile_transport_configuration.py b/tb_rest_client/models/models_pe/device_profile_transport_configuration.py index e9a8788f..6e0a1c81 100644 --- a/tb_rest_client/models/models_pe/device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_pe/device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceProfileTransportConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_search_query.py b/tb_rest_client/models/models_pe/device_search_query.py index 04a88d31..5e9d665a 100644 --- a/tb_rest_client/models/models_pe/device_search_query.py +++ b/tb_rest_client/models/models_pe/device_search_query.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceSearchQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_search_query_filter.py b/tb_rest_client/models/models_pe/device_search_query_filter.py index 55ee9384..ab7c874b 100644 --- a/tb_rest_client/models/models_pe/device_search_query_filter.py +++ b/tb_rest_client/models/models_pe/device_search_query_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class DeviceSearchQueryFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/device_transport_configuration.py b/tb_rest_client/models/models_pe/device_transport_configuration.py index 54eb863a..cea4e147 100644 --- a/tb_rest_client/models/models_pe/device_transport_configuration.py +++ b/tb_rest_client/models/models_pe/device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DeviceTransportConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/device_type_filter.py b/tb_rest_client/models/models_pe/device_type_filter.py index 7e57adae..f4ccd8da 100644 --- a/tb_rest_client/models/models_pe/device_type_filter.py +++ b/tb_rest_client/models/models_pe/device_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class DeviceTypeFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -30,27 +30,27 @@ class DeviceTypeFilter(EntityFilter): """ swagger_types = { 'device_name_filter': 'str', - 'device_type': 'str' + 'device_types': 'list[str]' } if hasattr(EntityFilter, "swagger_types"): swagger_types.update(EntityFilter.swagger_types) attribute_map = { 'device_name_filter': 'deviceNameFilter', - 'device_type': 'deviceType' + 'device_types': 'deviceTypes' } if hasattr(EntityFilter, "attribute_map"): attribute_map.update(EntityFilter.attribute_map) - def __init__(self, device_name_filter=None, device_type=None, *args, **kwargs): # noqa: E501 + def __init__(self, device_name_filter=None, device_types=None, *args, **kwargs): # noqa: E501 """DeviceTypeFilter - a model defined in Swagger""" # noqa: E501 self._device_name_filter = None - self._device_type = None + self._device_types = None self.discriminator = None if device_name_filter is not None: self.device_name_filter = device_name_filter - if device_type is not None: - self.device_type = device_type + if device_types is not None: + self.device_types = device_types EntityFilter.__init__(self, *args, **kwargs) @property @@ -75,25 +75,25 @@ def device_name_filter(self, device_name_filter): self._device_name_filter = device_name_filter @property - def device_type(self): - """Gets the device_type of this DeviceTypeFilter. # noqa: E501 + def device_types(self): + """Gets the device_types of this DeviceTypeFilter. # noqa: E501 - :return: The device_type of this DeviceTypeFilter. # noqa: E501 - :rtype: str + :return: The device_types of this DeviceTypeFilter. # noqa: E501 + :rtype: list[str] """ - return self._device_type + return self._device_types - @device_type.setter - def device_type(self, device_type): - """Sets the device_type of this DeviceTypeFilter. + @device_types.setter + def device_types(self, device_types): + """Sets the device_types of this DeviceTypeFilter. - :param device_type: The device_type of this DeviceTypeFilter. # noqa: E501 - :type: str + :param device_types: The device_types of this DeviceTypeFilter. # noqa: E501 + :type: list[str] """ - self._device_type = device_type + self._device_types = device_types def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_pe/disabled_device_profile_provision_configuration.py b/tb_rest_client/models/models_pe/disabled_device_profile_provision_configuration.py index 2c1adbf9..458f389d 100644 --- a/tb_rest_client/models/models_pe/disabled_device_profile_provision_configuration.py +++ b/tb_rest_client/models/models_pe/disabled_device_profile_provision_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_profile_provision_configuration import DeviceProfileProvisionConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.device_profile_provision_configuration import DeviceProfileProvisionConfiguration # noqa: F401,E501 class DisabledDeviceProfileProvisionConfiguration(DeviceProfileProvisionConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/duration_alarm_condition_spec.py b/tb_rest_client/models/models_pe/duration_alarm_condition_spec.py index 321fdcdc..d78fa0d3 100644 --- a/tb_rest_client/models/models_pe/duration_alarm_condition_spec.py +++ b/tb_rest_client/models/models_pe/duration_alarm_condition_spec.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 +from tb_rest_client.models.models_pe.alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 class DurationAlarmConditionSpec(AlarmConditionSpec): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/dynamic_valueboolean.py b/tb_rest_client/models/models_pe/dynamic_valueboolean.py index d51e3a75..e11a7d12 100644 --- a/tb_rest_client/models/models_pe/dynamic_valueboolean.py +++ b/tb_rest_client/models/models_pe/dynamic_valueboolean.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DynamicValueboolean(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/dynamic_valuedouble.py b/tb_rest_client/models/models_pe/dynamic_valuedouble.py index 436f164e..fdd9d1e0 100644 --- a/tb_rest_client/models/models_pe/dynamic_valuedouble.py +++ b/tb_rest_client/models/models_pe/dynamic_valuedouble.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DynamicValuedouble(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/dynamic_valueint.py b/tb_rest_client/models/models_pe/dynamic_valueint.py index f36a9d24..1997d99d 100644 --- a/tb_rest_client/models/models_pe/dynamic_valueint.py +++ b/tb_rest_client/models/models_pe/dynamic_valueint.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DynamicValueint(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/dynamic_valuelong.py b/tb_rest_client/models/models_pe/dynamic_valuelong.py index df774810..b85bcbb0 100644 --- a/tb_rest_client/models/models_pe/dynamic_valuelong.py +++ b/tb_rest_client/models/models_pe/dynamic_valuelong.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DynamicValuelong(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/dynamic_valuestring.py b/tb_rest_client/models/models_pe/dynamic_valuestring.py index 3b81730a..f60532e4 100644 --- a/tb_rest_client/models/models_pe/dynamic_valuestring.py +++ b/tb_rest_client/models/models_pe/dynamic_valuestring.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class DynamicValuestring(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/edge.py b/tb_rest_client/models/models_pe/edge.py index 8b76d4ef..77d78d22 100644 --- a/tb_rest_client/models/models_pe/edge.py +++ b/tb_rest_client/models/models_pe/edge.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Edge(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/edge_event.py b/tb_rest_client/models/models_pe/edge_event.py index 054e3f15..89a03711 100644 --- a/tb_rest_client/models/models_pe/edge_event.py +++ b/tb_rest_client/models/models_pe/edge_event.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EdgeEvent(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -105,7 +105,7 @@ def action(self, action): :param action: The action of this EdgeEvent. # noqa: E501 :type: str """ - allowed_values = ["ADDED", "ADDED_TO_ENTITY_GROUP", "ALARM_ACK", "ALARM_CLEAR", "ASSIGNED_TO_EDGE", "ATTRIBUTES_DELETED", "ATTRIBUTES_UPDATED", "CHANGE_OWNER", "CREDENTIALS_REQUEST", "CREDENTIALS_UPDATED", "DELETED", "ENTITY_MERGE_REQUEST", "POST_ATTRIBUTES", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "REMOVED_FROM_ENTITY_GROUP", "RPC_CALL", "TIMESERIES_UPDATED", "UNASSIGNED_FROM_EDGE", "UPDATED"] # noqa: E501 + allowed_values = ["ADDED", "ADDED_TO_ENTITY_GROUP", "ALARM_ACK", "ALARM_ASSIGNED", "ALARM_CLEAR", "ALARM_UNASSIGNED", "ASSIGNED_TO_EDGE", "ATTRIBUTES_DELETED", "ATTRIBUTES_UPDATED", "CHANGE_OWNER", "CREDENTIALS_REQUEST", "CREDENTIALS_UPDATED", "DELETED", "ENTITY_MERGE_REQUEST", "POST_ATTRIBUTES", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "REMOVED_FROM_ENTITY_GROUP", "RPC_CALL", "TIMESERIES_UPDATED", "UNASSIGNED_FROM_EDGE", "UPDATED"] # noqa: E501 if action not in allowed_values: raise ValueError( "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 @@ -279,7 +279,7 @@ def type(self, type): :param type: The type of this EdgeEvent. # noqa: E501 :type: str """ - allowed_values = ["ADMIN_SETTINGS", "ALARM", "ASSET", "CONVERTER", "CUSTOMER", "CUSTOM_TRANSLATION", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "LOGIN_WHITE_LABELING", "OTA_PACKAGE", "QUEUE", "RELATION", "ROLE", "RULE_CHAIN", "RULE_CHAIN_METADATA", "SCHEDULER_EVENT", "TENANT", "USER", "WHITE_LABELING", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ADMIN_SETTINGS", "ALARM", "ASSET", "ASSET_PROFILE", "CONVERTER", "CUSTOMER", "CUSTOM_TRANSLATION", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "LOGIN_WHITE_LABELING", "OTA_PACKAGE", "QUEUE", "RELATION", "ROLE", "RULE_CHAIN", "RULE_CHAIN_METADATA", "SCHEDULER_EVENT", "TENANT", "USER", "WHITE_LABELING", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/edge_event_id.py b/tb_rest_client/models/models_pe/edge_event_id.py index 6726358c..9092500d 100644 --- a/tb_rest_client/models/models_pe/edge_event_id.py +++ b/tb_rest_client/models/models_pe/edge_event_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EdgeEventId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/edge_id.py b/tb_rest_client/models/models_pe/edge_id.py index ffa53a5d..3b9904d7 100644 --- a/tb_rest_client/models/models_pe/edge_id.py +++ b/tb_rest_client/models/models_pe/edge_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EdgeId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/edge_info.py b/tb_rest_client/models/models_pe/edge_info.py new file mode 100644 index 00000000..f6c04fda --- /dev/null +++ b/tb_rest_client/models/models_pe/edge_info.py @@ -0,0 +1,526 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EdgeInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_info': 'JsonNode', + 'owner_id': 'EntityId', + 'id': 'EdgeId', + 'created_time': 'int', + 'tenant_id': 'TenantId', + 'customer_id': 'CustomerId', + 'root_rule_chain_id': 'RuleChainId', + 'name': 'str', + 'type': 'str', + 'label': 'str', + 'routing_key': 'str', + 'secret': 'str', + 'edge_license_key': 'str', + 'cloud_endpoint': 'str', + 'owner_name': 'str', + 'groups': 'list[EntityInfo]' + } + + attribute_map = { + 'additional_info': 'additionalInfo', + 'owner_id': 'ownerId', + 'id': 'id', + 'created_time': 'createdTime', + 'tenant_id': 'tenantId', + 'customer_id': 'customerId', + 'root_rule_chain_id': 'rootRuleChainId', + 'name': 'name', + 'type': 'type', + 'label': 'label', + 'routing_key': 'routingKey', + 'secret': 'secret', + 'edge_license_key': 'edgeLicenseKey', + 'cloud_endpoint': 'cloudEndpoint', + 'owner_name': 'ownerName', + 'groups': 'groups' + } + + def __init__(self, additional_info=None, owner_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, root_rule_chain_id=None, name=None, type=None, label=None, routing_key=None, secret=None, edge_license_key=None, cloud_endpoint=None, owner_name=None, groups=None): # noqa: E501 + """EdgeInfo - a model defined in Swagger""" # noqa: E501 + self._additional_info = None + self._owner_id = None + self._id = None + self._created_time = None + self._tenant_id = None + self._customer_id = None + self._root_rule_chain_id = None + self._name = None + self._type = None + self._label = None + self._routing_key = None + self._secret = None + self._edge_license_key = None + self._cloud_endpoint = None + self._owner_name = None + self._groups = None + self.discriminator = None + if additional_info is not None: + self.additional_info = additional_info + if owner_id is not None: + self.owner_id = owner_id + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if tenant_id is not None: + self.tenant_id = tenant_id + if customer_id is not None: + self.customer_id = customer_id + if root_rule_chain_id is not None: + self.root_rule_chain_id = root_rule_chain_id + self.name = name + self.type = type + if label is not None: + self.label = label + self.routing_key = routing_key + self.secret = secret + self.edge_license_key = edge_license_key + self.cloud_endpoint = cloud_endpoint + if owner_name is not None: + self.owner_name = owner_name + if groups is not None: + self.groups = groups + + @property + def additional_info(self): + """Gets the additional_info of this EdgeInfo. # noqa: E501 + + + :return: The additional_info of this EdgeInfo. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this EdgeInfo. + + + :param additional_info: The additional_info of this EdgeInfo. # noqa: E501 + :type: JsonNode + """ + + self._additional_info = additional_info + + @property + def owner_id(self): + """Gets the owner_id of this EdgeInfo. # noqa: E501 + + + :return: The owner_id of this EdgeInfo. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this EdgeInfo. + + + :param owner_id: The owner_id of this EdgeInfo. # noqa: E501 + :type: EntityId + """ + + self._owner_id = owner_id + + @property + def id(self): + """Gets the id of this EdgeInfo. # noqa: E501 + + + :return: The id of this EdgeInfo. # noqa: E501 + :rtype: EdgeId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EdgeInfo. + + + :param id: The id of this EdgeInfo. # noqa: E501 + :type: EdgeId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this EdgeInfo. # noqa: E501 + + Timestamp of the edge creation, in milliseconds # noqa: E501 + + :return: The created_time of this EdgeInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this EdgeInfo. + + Timestamp of the edge creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this EdgeInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def tenant_id(self): + """Gets the tenant_id of this EdgeInfo. # noqa: E501 + + + :return: The tenant_id of this EdgeInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this EdgeInfo. + + + :param tenant_id: The tenant_id of this EdgeInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def customer_id(self): + """Gets the customer_id of this EdgeInfo. # noqa: E501 + + + :return: The customer_id of this EdgeInfo. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this EdgeInfo. + + + :param customer_id: The customer_id of this EdgeInfo. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def root_rule_chain_id(self): + """Gets the root_rule_chain_id of this EdgeInfo. # noqa: E501 + + + :return: The root_rule_chain_id of this EdgeInfo. # noqa: E501 + :rtype: RuleChainId + """ + return self._root_rule_chain_id + + @root_rule_chain_id.setter + def root_rule_chain_id(self, root_rule_chain_id): + """Sets the root_rule_chain_id of this EdgeInfo. + + + :param root_rule_chain_id: The root_rule_chain_id of this EdgeInfo. # noqa: E501 + :type: RuleChainId + """ + + self._root_rule_chain_id = root_rule_chain_id + + @property + def name(self): + """Gets the name of this EdgeInfo. # noqa: E501 + + Unique Edge Name in scope of Tenant # noqa: E501 + + :return: The name of this EdgeInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EdgeInfo. + + Unique Edge Name in scope of Tenant # noqa: E501 + + :param name: The name of this EdgeInfo. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def type(self): + """Gets the type of this EdgeInfo. # noqa: E501 + + Edge type # noqa: E501 + + :return: The type of this EdgeInfo. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this EdgeInfo. + + Edge type # noqa: E501 + + :param type: The type of this EdgeInfo. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + @property + def label(self): + """Gets the label of this EdgeInfo. # noqa: E501 + + Label that may be used in widgets # noqa: E501 + + :return: The label of this EdgeInfo. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this EdgeInfo. + + Label that may be used in widgets # noqa: E501 + + :param label: The label of this EdgeInfo. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def routing_key(self): + """Gets the routing_key of this EdgeInfo. # noqa: E501 + + Edge routing key ('username') to authorize on cloud # noqa: E501 + + :return: The routing_key of this EdgeInfo. # noqa: E501 + :rtype: str + """ + return self._routing_key + + @routing_key.setter + def routing_key(self, routing_key): + """Sets the routing_key of this EdgeInfo. + + Edge routing key ('username') to authorize on cloud # noqa: E501 + + :param routing_key: The routing_key of this EdgeInfo. # noqa: E501 + :type: str + """ + if routing_key is None: + raise ValueError("Invalid value for `routing_key`, must not be `None`") # noqa: E501 + + self._routing_key = routing_key + + @property + def secret(self): + """Gets the secret of this EdgeInfo. # noqa: E501 + + Edge secret ('password') to authorize on cloud # noqa: E501 + + :return: The secret of this EdgeInfo. # noqa: E501 + :rtype: str + """ + return self._secret + + @secret.setter + def secret(self, secret): + """Sets the secret of this EdgeInfo. + + Edge secret ('password') to authorize on cloud # noqa: E501 + + :param secret: The secret of this EdgeInfo. # noqa: E501 + :type: str + """ + if secret is None: + raise ValueError("Invalid value for `secret`, must not be `None`") # noqa: E501 + + self._secret = secret + + @property + def edge_license_key(self): + """Gets the edge_license_key of this EdgeInfo. # noqa: E501 + + Edge license key obtained from license portal # noqa: E501 + + :return: The edge_license_key of this EdgeInfo. # noqa: E501 + :rtype: str + """ + return self._edge_license_key + + @edge_license_key.setter + def edge_license_key(self, edge_license_key): + """Sets the edge_license_key of this EdgeInfo. + + Edge license key obtained from license portal # noqa: E501 + + :param edge_license_key: The edge_license_key of this EdgeInfo. # noqa: E501 + :type: str + """ + if edge_license_key is None: + raise ValueError("Invalid value for `edge_license_key`, must not be `None`") # noqa: E501 + + self._edge_license_key = edge_license_key + + @property + def cloud_endpoint(self): + """Gets the cloud_endpoint of this EdgeInfo. # noqa: E501 + + Edge uses this cloud URL to activate and periodically check it's license # noqa: E501 + + :return: The cloud_endpoint of this EdgeInfo. # noqa: E501 + :rtype: str + """ + return self._cloud_endpoint + + @cloud_endpoint.setter + def cloud_endpoint(self, cloud_endpoint): + """Sets the cloud_endpoint of this EdgeInfo. + + Edge uses this cloud URL to activate and periodically check it's license # noqa: E501 + + :param cloud_endpoint: The cloud_endpoint of this EdgeInfo. # noqa: E501 + :type: str + """ + if cloud_endpoint is None: + raise ValueError("Invalid value for `cloud_endpoint`, must not be `None`") # noqa: E501 + + self._cloud_endpoint = cloud_endpoint + + @property + def owner_name(self): + """Gets the owner_name of this EdgeInfo. # noqa: E501 + + Owner name # noqa: E501 + + :return: The owner_name of this EdgeInfo. # noqa: E501 + :rtype: str + """ + return self._owner_name + + @owner_name.setter + def owner_name(self, owner_name): + """Sets the owner_name of this EdgeInfo. + + Owner name # noqa: E501 + + :param owner_name: The owner_name of this EdgeInfo. # noqa: E501 + :type: str + """ + + self._owner_name = owner_name + + @property + def groups(self): + """Gets the groups of this EdgeInfo. # noqa: E501 + + Groups # noqa: E501 + + :return: The groups of this EdgeInfo. # noqa: E501 + :rtype: list[EntityInfo] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this EdgeInfo. + + Groups # noqa: E501 + + :param groups: The groups of this EdgeInfo. # noqa: E501 + :type: list[EntityInfo] + """ + + self._groups = groups + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EdgeInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EdgeInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/edge_install_instructions.py b/tb_rest_client/models/models_pe/edge_install_instructions.py new file mode 100644 index 00000000..4c9be905 --- /dev/null +++ b/tb_rest_client/models/models_pe/edge_install_instructions.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EdgeInstallInstructions(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'docker_install_instructions': 'str' + } + + attribute_map = { + 'docker_install_instructions': 'dockerInstallInstructions' + } + + def __init__(self, docker_install_instructions=None): # noqa: E501 + """EdgeInstallInstructions - a model defined in Swagger""" # noqa: E501 + self._docker_install_instructions = None + self.discriminator = None + if docker_install_instructions is not None: + self.docker_install_instructions = docker_install_instructions + + @property + def docker_install_instructions(self): + """Gets the docker_install_instructions of this EdgeInstallInstructions. # noqa: E501 + + Markdown with docker install instructions # noqa: E501 + + :return: The docker_install_instructions of this EdgeInstallInstructions. # noqa: E501 + :rtype: str + """ + return self._docker_install_instructions + + @docker_install_instructions.setter + def docker_install_instructions(self, docker_install_instructions): + """Sets the docker_install_instructions of this EdgeInstallInstructions. + + Markdown with docker install instructions # noqa: E501 + + :param docker_install_instructions: The docker_install_instructions of this EdgeInstallInstructions. # noqa: E501 + :type: str + """ + + self._docker_install_instructions = docker_install_instructions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EdgeInstallInstructions, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EdgeInstallInstructions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/edge_search_query.py b/tb_rest_client/models/models_pe/edge_search_query.py index 15e43b0a..f4e94145 100644 --- a/tb_rest_client/models/models_pe/edge_search_query.py +++ b/tb_rest_client/models/models_pe/edge_search_query.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EdgeSearchQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/edge_search_query_filter.py b/tb_rest_client/models/models_pe/edge_search_query_filter.py index 670ef172..f98f9a60 100644 --- a/tb_rest_client/models/models_pe/edge_search_query_filter.py +++ b/tb_rest_client/models/models_pe/edge_search_query_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EdgeSearchQueryFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/edge_type_filter.py b/tb_rest_client/models/models_pe/edge_type_filter.py index 12e1db01..c4258363 100644 --- a/tb_rest_client/models/models_pe/edge_type_filter.py +++ b/tb_rest_client/models/models_pe/edge_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EdgeTypeFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -30,27 +30,27 @@ class EdgeTypeFilter(EntityFilter): """ swagger_types = { 'edge_name_filter': 'str', - 'edge_type': 'str' + 'edge_types': 'list[str]' } if hasattr(EntityFilter, "swagger_types"): swagger_types.update(EntityFilter.swagger_types) attribute_map = { 'edge_name_filter': 'edgeNameFilter', - 'edge_type': 'edgeType' + 'edge_types': 'edgeTypes' } if hasattr(EntityFilter, "attribute_map"): attribute_map.update(EntityFilter.attribute_map) - def __init__(self, edge_name_filter=None, edge_type=None, *args, **kwargs): # noqa: E501 + def __init__(self, edge_name_filter=None, edge_types=None, *args, **kwargs): # noqa: E501 """EdgeTypeFilter - a model defined in Swagger""" # noqa: E501 self._edge_name_filter = None - self._edge_type = None + self._edge_types = None self.discriminator = None if edge_name_filter is not None: self.edge_name_filter = edge_name_filter - if edge_type is not None: - self.edge_type = edge_type + if edge_types is not None: + self.edge_types = edge_types EntityFilter.__init__(self, *args, **kwargs) @property @@ -75,25 +75,25 @@ def edge_name_filter(self, edge_name_filter): self._edge_name_filter = edge_name_filter @property - def edge_type(self): - """Gets the edge_type of this EdgeTypeFilter. # noqa: E501 + def edge_types(self): + """Gets the edge_types of this EdgeTypeFilter. # noqa: E501 - :return: The edge_type of this EdgeTypeFilter. # noqa: E501 - :rtype: str + :return: The edge_types of this EdgeTypeFilter. # noqa: E501 + :rtype: list[str] """ - return self._edge_type + return self._edge_types - @edge_type.setter - def edge_type(self, edge_type): - """Sets the edge_type of this EdgeTypeFilter. + @edge_types.setter + def edge_types(self, edge_types): + """Sets the edge_types of this EdgeTypeFilter. - :param edge_type: The edge_type of this EdgeTypeFilter. # noqa: E501 - :type: str + :param edge_types: The edge_types of this EdgeTypeFilter. # noqa: E501 + :type: list[str] """ - self._edge_type = edge_type + self._edge_types = edge_types def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_pe/efento_coap_device_type_configuration.py b/tb_rest_client/models/models_pe/efento_coap_device_type_configuration.py index 827bcd64..aa3d9862 100644 --- a/tb_rest_client/models/models_pe/efento_coap_device_type_configuration.py +++ b/tb_rest_client/models/models_pe/efento_coap_device_type_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EfentoCoapDeviceTypeConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/email_delivery_method_notification_template.py b/tb_rest_client/models/models_pe/email_delivery_method_notification_template.py new file mode 100644 index 00000000..bee9dc30 --- /dev/null +++ b/tb_rest_client/models/models_pe/email_delivery_method_notification_template.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.delivery_method_notification_template import DeliveryMethodNotificationTemplate # noqa: F401,E501 + +class EmailDeliveryMethodNotificationTemplate(DeliveryMethodNotificationTemplate): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'enabled': 'bool', + 'subject': 'str' + } + if hasattr(DeliveryMethodNotificationTemplate, "swagger_types"): + swagger_types.update(DeliveryMethodNotificationTemplate.swagger_types) + + attribute_map = { + 'body': 'body', + 'enabled': 'enabled', + 'subject': 'subject' + } + if hasattr(DeliveryMethodNotificationTemplate, "attribute_map"): + attribute_map.update(DeliveryMethodNotificationTemplate.attribute_map) + + def __init__(self, body=None, enabled=None, subject=None, *args, **kwargs): # noqa: E501 + """EmailDeliveryMethodNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._body = None + self._enabled = None + self._subject = None + self.discriminator = None + if body is not None: + self.body = body + if enabled is not None: + self.enabled = enabled + if subject is not None: + self.subject = subject + DeliveryMethodNotificationTemplate.__init__(self, *args, **kwargs) + + @property + def body(self): + """Gets the body of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The body of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EmailDeliveryMethodNotificationTemplate. + + + :param body: The body of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def enabled(self): + """Gets the enabled of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The enabled of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this EmailDeliveryMethodNotificationTemplate. + + + :param enabled: The enabled of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def subject(self): + """Gets the subject of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The subject of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this EmailDeliveryMethodNotificationTemplate. + + + :param subject: The subject of this EmailDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._subject = subject + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EmailDeliveryMethodNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailDeliveryMethodNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/email_two_fa_account_config.py b/tb_rest_client/models/models_pe/email_two_fa_account_config.py index a1d181d7..3d5c31fe 100644 --- a/tb_rest_client/models/models_pe/email_two_fa_account_config.py +++ b/tb_rest_client/models/models_pe/email_two_fa_account_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EmailTwoFaAccountConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/email_two_fa_provider_config.py b/tb_rest_client/models/models_pe/email_two_fa_provider_config.py index c7a4e02d..3ebbb4f8 100644 --- a/tb_rest_client/models/models_pe/email_two_fa_provider_config.py +++ b/tb_rest_client/models/models_pe/email_two_fa_provider_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .two_fa_provider_config import TwoFaProviderConfig # noqa: F401,E501 +from tb_rest_client.models.models_pe.two_fa_provider_config import TwoFaProviderConfig # noqa: F401,E501 class EmailTwoFaProviderConfig(TwoFaProviderConfig): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/entities_by_group_name_filter.py b/tb_rest_client/models/models_pe/entities_by_group_name_filter.py index ab8d1d8b..9987712a 100644 --- a/tb_rest_client/models/models_pe/entities_by_group_name_filter.py +++ b/tb_rest_client/models/models_pe/entities_by_group_name_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EntitiesByGroupNameFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -97,7 +97,7 @@ def group_type(self, group_type): :param group_type: The group_type of this EntitiesByGroupNameFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if group_type not in allowed_values: raise ValueError( "Invalid value for `group_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entities_limit_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/entities_limit_notification_rule_trigger_config.py new file mode 100644 index 00000000..575e5535 --- /dev/null +++ b/tb_rest_client/models/models_pe/entities_limit_notification_rule_trigger_config.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 + +class EntitiesLimitNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'entity_types': 'list[str]', + 'threshold': 'float', + 'trigger_type': 'str' + } + if hasattr(NotificationRuleTriggerConfig, "swagger_types"): + swagger_types.update(NotificationRuleTriggerConfig.swagger_types) + + attribute_map = { + 'entity_types': 'entityTypes', + 'threshold': 'threshold', + 'trigger_type': 'triggerType' + } + if hasattr(NotificationRuleTriggerConfig, "attribute_map"): + attribute_map.update(NotificationRuleTriggerConfig.attribute_map) + + def __init__(self, entity_types=None, threshold=None, trigger_type=None, *args, **kwargs): # noqa: E501 + """EntitiesLimitNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._entity_types = None + self._threshold = None + self._trigger_type = None + self.discriminator = None + if entity_types is not None: + self.entity_types = entity_types + if threshold is not None: + self.threshold = threshold + if trigger_type is not None: + self.trigger_type = trigger_type + NotificationRuleTriggerConfig.__init__(self, *args, **kwargs) + + @property + def entity_types(self): + """Gets the entity_types of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The entity_types of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._entity_types + + @entity_types.setter + def entity_types(self, entity_types): + """Sets the entity_types of this EntitiesLimitNotificationRuleTriggerConfig. + + + :param entity_types: The entity_types of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if not set(entity_types).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `entity_types` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(entity_types) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._entity_types = entity_types + + @property + def threshold(self): + """Gets the threshold of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The threshold of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: float + """ + return self._threshold + + @threshold.setter + def threshold(self, threshold): + """Sets the threshold of this EntitiesLimitNotificationRuleTriggerConfig. + + + :param threshold: The threshold of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: float + """ + + self._threshold = threshold + + @property + def trigger_type(self): + """Gets the trigger_type of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this EntitiesLimitNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this EntitiesLimitNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EntitiesLimitNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EntitiesLimitNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/entity_action_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/entity_action_notification_rule_trigger_config.py new file mode 100644 index 00000000..87eed8c4 --- /dev/null +++ b/tb_rest_client/models/models_pe/entity_action_notification_rule_trigger_config.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EntityActionNotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created': 'bool', + 'deleted': 'bool', + 'entity_types': 'list[str]', + 'trigger_type': 'str', + 'updated': 'bool' + } + + attribute_map = { + 'created': 'created', + 'deleted': 'deleted', + 'entity_types': 'entityTypes', + 'trigger_type': 'triggerType', + 'updated': 'updated' + } + + def __init__(self, created=None, deleted=None, entity_types=None, trigger_type=None, updated=None): # noqa: E501 + """EntityActionNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._created = None + self._deleted = None + self._entity_types = None + self._trigger_type = None + self._updated = None + self.discriminator = None + if created is not None: + self.created = created + if deleted is not None: + self.deleted = deleted + if entity_types is not None: + self.entity_types = entity_types + if trigger_type is not None: + self.trigger_type = trigger_type + if updated is not None: + self.updated = updated + + @property + def created(self): + """Gets the created of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The created of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this EntityActionNotificationRuleTriggerConfig. + + + :param created: The created of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._created = created + + @property + def deleted(self): + """Gets the deleted of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The deleted of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._deleted + + @deleted.setter + def deleted(self, deleted): + """Sets the deleted of this EntityActionNotificationRuleTriggerConfig. + + + :param deleted: The deleted of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._deleted = deleted + + @property + def entity_types(self): + """Gets the entity_types of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The entity_types of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._entity_types + + @entity_types.setter + def entity_types(self, entity_types): + """Sets the entity_types of this EntityActionNotificationRuleTriggerConfig. + + + :param entity_types: The entity_types of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if not set(entity_types).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `entity_types` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(entity_types) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._entity_types = entity_types + + @property + def trigger_type(self): + """Gets the trigger_type of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this EntityActionNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + @property + def updated(self): + """Gets the updated of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The updated of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._updated + + @updated.setter + def updated(self, updated): + """Sets the updated of this EntityActionNotificationRuleTriggerConfig. + + + :param updated: The updated of this EntityActionNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._updated = updated + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EntityActionNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EntityActionNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/entity_count_query.py b/tb_rest_client/models/models_pe/entity_count_query.py index 468747fa..faf68453 100644 --- a/tb_rest_client/models/models_pe/entity_count_query.py +++ b/tb_rest_client/models/models_pe/entity_count_query.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityCountQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_data.py b/tb_rest_client/models/models_pe/entity_data.py index 91edd8cd..ee62ef65 100644 --- a/tb_rest_client/models/models_pe/entity_data.py +++ b/tb_rest_client/models/models_pe/entity_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,6 +28,7 @@ class EntityData(object): and the value is json key in definition. """ swagger_types = { + 'agg_latest': 'dict(str, ComparisonTsValue)', 'entity_id': 'EntityId', 'latest': 'dict(str, object)', 'read_attrs': 'bool', @@ -36,6 +37,7 @@ class EntityData(object): } attribute_map = { + 'agg_latest': 'aggLatest', 'entity_id': 'entityId', 'latest': 'latest', 'read_attrs': 'readAttrs', @@ -43,14 +45,17 @@ class EntityData(object): 'timeseries': 'timeseries' } - def __init__(self, entity_id=None, latest=None, read_attrs=None, read_ts=None, timeseries=None): # noqa: E501 + def __init__(self, agg_latest=None, entity_id=None, latest=None, read_attrs=None, read_ts=None, timeseries=None): # noqa: E501 """EntityData - a model defined in Swagger""" # noqa: E501 + self._agg_latest = None self._entity_id = None self._latest = None self._read_attrs = None self._read_ts = None self._timeseries = None self.discriminator = None + if agg_latest is not None: + self.agg_latest = agg_latest if entity_id is not None: self.entity_id = entity_id if latest is not None: @@ -62,6 +67,27 @@ def __init__(self, entity_id=None, latest=None, read_attrs=None, read_ts=None, t if timeseries is not None: self.timeseries = timeseries + @property + def agg_latest(self): + """Gets the agg_latest of this EntityData. # noqa: E501 + + + :return: The agg_latest of this EntityData. # noqa: E501 + :rtype: dict(str, ComparisonTsValue) + """ + return self._agg_latest + + @agg_latest.setter + def agg_latest(self, agg_latest): + """Sets the agg_latest of this EntityData. + + + :param agg_latest: The agg_latest of this EntityData. # noqa: E501 + :type: dict(str, ComparisonTsValue) + """ + + self._agg_latest = agg_latest + @property def entity_id(self): """Gets the entity_id of this EntityData. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_data_diff.py b/tb_rest_client/models/models_pe/entity_data_diff.py index bd73ec7e..a61762e9 100644 --- a/tb_rest_client/models/models_pe/entity_data_diff.py +++ b/tb_rest_client/models/models_pe/entity_data_diff.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityDataDiff(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_data_info.py b/tb_rest_client/models/models_pe/entity_data_info.py index 297c68e1..106874c9 100644 --- a/tb_rest_client/models/models_pe/entity_data_info.py +++ b/tb_rest_client/models/models_pe/entity_data_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityDataInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_data_page_link.py b/tb_rest_client/models/models_pe/entity_data_page_link.py index cef874b4..af2947cf 100644 --- a/tb_rest_client/models/models_pe/entity_data_page_link.py +++ b/tb_rest_client/models/models_pe/entity_data_page_link.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityDataPageLink(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_data_query.py b/tb_rest_client/models/models_pe/entity_data_query.py index cc1547ca..5aabc532 100644 --- a/tb_rest_client/models/models_pe/entity_data_query.py +++ b/tb_rest_client/models/models_pe/entity_data_query.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityDataQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_data_sort_order.py b/tb_rest_client/models/models_pe/entity_data_sort_order.py index 8a3c430c..09f3dd5b 100644 --- a/tb_rest_client/models/models_pe/entity_data_sort_order.py +++ b/tb_rest_client/models/models_pe/entity_data_sort_order.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityDataSortOrder(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_export_dataobject.py b/tb_rest_client/models/models_pe/entity_export_dataobject.py index 5f98e14a..885ef11d 100644 --- a/tb_rest_client/models/models_pe/entity_export_dataobject.py +++ b/tb_rest_client/models/models_pe/entity_export_dataobject.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityExportDataobject(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -117,7 +117,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityExportDataobject. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_filter.py b/tb_rest_client/models/models_pe/entity_filter.py index e7cb64bf..683a909d 100644 --- a/tb_rest_client/models/models_pe/entity_filter.py +++ b/tb_rest_client/models/models_pe/entity_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityFilter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_group.py b/tb_rest_client/models/models_pe/entity_group.py index c0d71205..3a4c4f03 100644 --- a/tb_rest_client/models/models_pe/entity_group.py +++ b/tb_rest_client/models/models_pe/entity_group.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityGroup(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class EntityGroup(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'EntityGroupId', 'id': 'EntityGroupId', 'created_time': 'int', 'owner_id': 'EntityId', @@ -41,7 +40,6 @@ class EntityGroup(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'owner_id': 'ownerId', @@ -53,9 +51,8 @@ class EntityGroup(object): 'edge_group_all': 'edgeGroupAll' } - def __init__(self, external_id=None, id=None, created_time=None, owner_id=None, name=None, type=None, additional_info=None, configuration=None, group_all=None, edge_group_all=None): # noqa: E501 + def __init__(self, id=None, created_time=None, owner_id=None, name=None, type=None, additional_info=None, configuration=None, group_all=None, edge_group_all=None): # noqa: E501 """EntityGroup - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._owner_id = None @@ -66,8 +63,6 @@ def __init__(self, external_id=None, id=None, created_time=None, owner_id=None, self._group_all = None self._edge_group_all = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -85,27 +80,6 @@ def __init__(self, external_id=None, id=None, created_time=None, owner_id=None, if edge_group_all is not None: self.edge_group_all = edge_group_all - @property - def external_id(self): - """Gets the external_id of this EntityGroup. # noqa: E501 - - - :return: The external_id of this EntityGroup. # noqa: E501 - :rtype: EntityGroupId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this EntityGroup. - - - :param external_id: The external_id of this EntityGroup. # noqa: E501 - :type: EntityGroupId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this EntityGroup. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_group_export_data.py b/tb_rest_client/models/models_pe/entity_group_export_data.py index 4ef04400..4a55151d 100644 --- a/tb_rest_client/models/models_pe/entity_group_export_data.py +++ b/tb_rest_client/models/models_pe/entity_group_export_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 class EntityGroupExportData(EntityExportDataobject): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -133,7 +133,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityGroupExportData. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_group_filter.py b/tb_rest_client/models/models_pe/entity_group_filter.py index 52141991..293f29b6 100644 --- a/tb_rest_client/models/models_pe/entity_group_filter.py +++ b/tb_rest_client/models/models_pe/entity_group_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EntityGroupFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -92,7 +92,7 @@ def group_type(self, group_type): :param group_type: The group_type of this EntityGroupFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if group_type not in allowed_values: raise ValueError( "Invalid value for `group_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_group_id.py b/tb_rest_client/models/models_pe/entity_group_id.py index e09bafe9..2bad32d9 100644 --- a/tb_rest_client/models/models_pe/entity_group_id.py +++ b/tb_rest_client/models/models_pe/entity_group_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityGroupId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,21 +28,18 @@ class EntityGroupId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } - def __init__(self, id=None, entity_type=None): # noqa: E501 + def __init__(self, id=None): # noqa: E501 """EntityGroupId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None self.id = id - self.entity_type = entity_type @property def id(self): diff --git a/tb_rest_client/models/models_pe/entity_group_info.py b/tb_rest_client/models/models_pe/entity_group_info.py index c8bdaccd..92806b2c 100644 --- a/tb_rest_client/models/models_pe/entity_group_info.py +++ b/tb_rest_client/models/models_pe/entity_group_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityGroupInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class EntityGroupInfo(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'EntityGroupId', 'id': 'EntityGroupId', 'created_time': 'int', 'owner_id': 'EntityId', @@ -42,7 +41,6 @@ class EntityGroupInfo(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'owner_id': 'ownerId', @@ -55,9 +53,8 @@ class EntityGroupInfo(object): 'owner_ids': 'ownerIds' } - def __init__(self, external_id=None, id=None, created_time=None, owner_id=None, name=None, type=None, additional_info=None, configuration=None, group_all=None, edge_group_all=None, owner_ids=None): # noqa: E501 + def __init__(self, id=None, created_time=None, owner_id=None, name=None, type=None, additional_info=None, configuration=None, group_all=None, edge_group_all=None, owner_ids=None): # noqa: E501 """EntityGroupInfo - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._owner_id = None @@ -69,8 +66,6 @@ def __init__(self, external_id=None, id=None, created_time=None, owner_id=None, self._edge_group_all = None self._owner_ids = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -89,27 +84,6 @@ def __init__(self, external_id=None, id=None, created_time=None, owner_id=None, self.edge_group_all = edge_group_all self.owner_ids = owner_ids - @property - def external_id(self): - """Gets the external_id of this EntityGroupInfo. # noqa: E501 - - - :return: The external_id of this EntityGroupInfo. # noqa: E501 - :rtype: EntityGroupId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this EntityGroupInfo. - - - :param external_id: The external_id of this EntityGroupInfo. # noqa: E501 - :type: EntityGroupId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this EntityGroupInfo. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_group_list_filter.py b/tb_rest_client/models/models_pe/entity_group_list_filter.py index ea718075..78c3e64e 100644 --- a/tb_rest_client/models/models_pe/entity_group_list_filter.py +++ b/tb_rest_client/models/models_pe/entity_group_list_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EntityGroupListFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -92,7 +92,7 @@ def group_type(self, group_type): :param group_type: The group_type of this EntityGroupListFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if group_type not in allowed_values: raise ValueError( "Invalid value for `group_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_group_name_filter.py b/tb_rest_client/models/models_pe/entity_group_name_filter.py index e187178f..8679b098 100644 --- a/tb_rest_client/models/models_pe/entity_group_name_filter.py +++ b/tb_rest_client/models/models_pe/entity_group_name_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EntityGroupNameFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -92,7 +92,7 @@ def group_type(self, group_type): :param group_type: The group_type of this EntityGroupNameFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if group_type not in allowed_values: raise ValueError( "Invalid value for `group_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_id.py b/tb_rest_client/models/models_pe/entity_id.py index 1b6b0e63..b686e9ec 100644 --- a/tb_rest_client/models/models_pe/entity_id.py +++ b/tb_rest_client/models/models_pe/entity_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -90,7 +90,7 @@ def entity_type(self, entity_type): """ if entity_type is None: raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_info.py b/tb_rest_client/models/models_pe/entity_info.py index 4ac9af9b..9ddea514 100644 --- a/tb_rest_client/models/models_pe/entity_info.py +++ b/tb_rest_client/models/models_pe/entity_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_key.py b/tb_rest_client/models/models_pe/entity_key.py index 598369b8..abd3422d 100644 --- a/tb_rest_client/models/models_pe/entity_key.py +++ b/tb_rest_client/models/models_pe/entity_key.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityKey(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_list_filter.py b/tb_rest_client/models/models_pe/entity_list_filter.py index 016d2933..43fcef7c 100644 --- a/tb_rest_client/models/models_pe/entity_list_filter.py +++ b/tb_rest_client/models/models_pe/entity_list_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EntityListFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -92,7 +92,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityListFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_load_error.py b/tb_rest_client/models/models_pe/entity_load_error.py index ae0a0ec8..da75cfb5 100644 --- a/tb_rest_client/models/models_pe/entity_load_error.py +++ b/tb_rest_client/models/models_pe/entity_load_error.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityLoadError(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_name_filter.py b/tb_rest_client/models/models_pe/entity_name_filter.py index b4b7f687..a4fcc539 100644 --- a/tb_rest_client/models/models_pe/entity_name_filter.py +++ b/tb_rest_client/models/models_pe/entity_name_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EntityNameFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -92,7 +92,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityNameFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_relation.py b/tb_rest_client/models/models_pe/entity_relation.py new file mode 100644 index 00000000..f016efa3 --- /dev/null +++ b/tb_rest_client/models/models_pe/entity_relation.py @@ -0,0 +1,224 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EntityRelation(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + '_from': 'EntityId', + 'to': 'EntityId', + 'type': 'str', + 'type_group': 'str', + 'additional_info': 'JsonNode' + } + + attribute_map = { + '_from': 'from', + 'to': 'to', + 'type': 'type', + 'type_group': 'typeGroup', + 'additional_info': 'additionalInfo' + } + + def __init__(self, _from=None, to=None, type=None, type_group=None, additional_info=None): # noqa: E501 + """EntityRelation - a model defined in Swagger""" # noqa: E501 + self.__from = None + self._to = None + self._type = None + self._type_group = None + self._additional_info = None + self.discriminator = None + if _from is not None: + self._from = _from + if to is not None: + self.to = to + if type is not None: + self.type = type + if type_group is not None: + self.type_group = type_group + if additional_info is not None: + self.additional_info = additional_info + + @property + def _from(self): + """Gets the _from of this EntityRelation. # noqa: E501 + + + :return: The _from of this EntityRelation. # noqa: E501 + :rtype: EntityId + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this EntityRelation. + + + :param _from: The _from of this EntityRelation. # noqa: E501 + :type: EntityId + """ + + self.__from = _from + + @property + def to(self): + """Gets the to of this EntityRelation. # noqa: E501 + + + :return: The to of this EntityRelation. # noqa: E501 + :rtype: EntityId + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this EntityRelation. + + + :param to: The to of this EntityRelation. # noqa: E501 + :type: EntityId + """ + + self._to = to + + @property + def type(self): + """Gets the type of this EntityRelation. # noqa: E501 + + String value of relation type. # noqa: E501 + + :return: The type of this EntityRelation. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this EntityRelation. + + String value of relation type. # noqa: E501 + + :param type: The type of this EntityRelation. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def type_group(self): + """Gets the type_group of this EntityRelation. # noqa: E501 + + Represents the type group of the relation. # noqa: E501 + + :return: The type_group of this EntityRelation. # noqa: E501 + :rtype: str + """ + return self._type_group + + @type_group.setter + def type_group(self, type_group): + """Sets the type_group of this EntityRelation. + + Represents the type group of the relation. # noqa: E501 + + :param type_group: The type_group of this EntityRelation. # noqa: E501 + :type: str + """ + allowed_values = ["COMMON", "DASHBOARD", "EDGE", "EDGE_AUTO_ASSIGN_RULE_CHAIN", "FROM_ENTITY_GROUP", "RULE_CHAIN", "RULE_NODE"] # noqa: E501 + if type_group not in allowed_values: + raise ValueError( + "Invalid value for `type_group` ({0}), must be one of {1}" # noqa: E501 + .format(type_group, allowed_values) + ) + + self._type_group = type_group + + @property + def additional_info(self): + """Gets the additional_info of this EntityRelation. # noqa: E501 + + + :return: The additional_info of this EntityRelation. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this EntityRelation. + + + :param additional_info: The additional_info of this EntityRelation. # noqa: E501 + :type: JsonNode + """ + + self._additional_info = additional_info + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EntityRelation, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EntityRelation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/entity_relation_info.py b/tb_rest_client/models/models_pe/entity_relation_info.py index 169c42c2..d950beb8 100644 --- a/tb_rest_client/models/models_pe/entity_relation_info.py +++ b/tb_rest_client/models/models_pe/entity_relation_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityRelationInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_relations_query.py b/tb_rest_client/models/models_pe/entity_relations_query.py index 48d1eb5f..7b19e63c 100644 --- a/tb_rest_client/models/models_pe/entity_relations_query.py +++ b/tb_rest_client/models/models_pe/entity_relations_query.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityRelationsQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_subtype.py b/tb_rest_client/models/models_pe/entity_subtype.py index 7821a6f4..2f43148d 100644 --- a/tb_rest_client/models/models_pe/entity_subtype.py +++ b/tb_rest_client/models/models_pe/entity_subtype.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntitySubtype(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -70,7 +70,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntitySubtype. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_type_filter.py b/tb_rest_client/models/models_pe/entity_type_filter.py index 3c52a40c..1b8135a7 100644 --- a/tb_rest_client/models/models_pe/entity_type_filter.py +++ b/tb_rest_client/models/models_pe/entity_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EntityTypeFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -66,7 +66,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityTypeFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_type_load_result.py b/tb_rest_client/models/models_pe/entity_type_load_result.py index c11ad4f7..6350e22e 100644 --- a/tb_rest_client/models/models_pe/entity_type_load_result.py +++ b/tb_rest_client/models/models_pe/entity_type_load_result.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityTypeLoadResult(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -132,7 +132,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityTypeLoadResult. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_type_version_create_config.py b/tb_rest_client/models/models_pe/entity_type_version_create_config.py index aa0be1ce..1a597e36 100644 --- a/tb_rest_client/models/models_pe/entity_type_version_create_config.py +++ b/tb_rest_client/models/models_pe/entity_type_version_create_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityTypeVersionCreateConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_type_version_load_config.py b/tb_rest_client/models/models_pe/entity_type_version_load_config.py index 5f5f584c..55c8d0ea 100644 --- a/tb_rest_client/models/models_pe/entity_type_version_load_config.py +++ b/tb_rest_client/models/models_pe/entity_type_version_load_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityTypeVersionLoadConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_type_version_load_request.py b/tb_rest_client/models/models_pe/entity_type_version_load_request.py index 5a6a4945..479e222b 100644 --- a/tb_rest_client/models/models_pe/entity_type_version_load_request.py +++ b/tb_rest_client/models/models_pe/entity_type_version_load_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .version_load_request import VersionLoadRequest # noqa: F401,E501 +from tb_rest_client.models.models_pe.version_load_request import VersionLoadRequest # noqa: F401,E501 class EntityTypeVersionLoadRequest(VersionLoadRequest): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -56,7 +56,7 @@ def __init__(self, entity_types=None, type=None, version_id=None, *args, **kwarg self.type = type if version_id is not None: self.version_id = version_id - VersionLoadRequest.__init__(self, type, version_id) + VersionLoadRequest.__init__(self, *args, **kwargs) @property def entity_types(self): diff --git a/tb_rest_client/models/models_pe/entity_version.py b/tb_rest_client/models/models_pe/entity_version.py index efb256cc..2791a985 100644 --- a/tb_rest_client/models/models_pe/entity_version.py +++ b/tb_rest_client/models/models_pe/entity_version.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityVersion(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_view.py b/tb_rest_client/models/models_pe/entity_view.py index f5f2cdab..de37b726 100644 --- a/tb_rest_client/models/models_pe/entity_view.py +++ b/tb_rest_client/models/models_pe/entity_view.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityView(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class EntityView(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'EntityViewId', 'id': 'EntityViewId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -44,7 +43,6 @@ class EntityView(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -59,9 +57,8 @@ class EntityView(object): 'owner_id': 'ownerId' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, entity_id=None, keys=None, start_time_ms=None, end_time_ms=None, additional_info=None, owner_id=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, entity_id=None, keys=None, start_time_ms=None, end_time_ms=None, additional_info=None, owner_id=None): # noqa: E501 """EntityView - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -75,8 +72,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._additional_info = None self._owner_id = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -98,27 +93,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if owner_id is not None: self.owner_id = owner_id - @property - def external_id(self): - """Gets the external_id of this EntityView. # noqa: E501 - - - :return: The external_id of this EntityView. # noqa: E501 - :rtype: EntityViewId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this EntityView. - - - :param external_id: The external_id of this EntityView. # noqa: E501 - :type: EntityViewId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this EntityView. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_view_id.py b/tb_rest_client/models/models_pe/entity_view_id.py index 2e674449..f8243708 100644 --- a/tb_rest_client/models/models_pe/entity_view_id.py +++ b/tb_rest_client/models/models_pe/entity_view_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityViewId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_view_info.py b/tb_rest_client/models/models_pe/entity_view_info.py new file mode 100644 index 00000000..63551872 --- /dev/null +++ b/tb_rest_client/models/models_pe/entity_view_info.py @@ -0,0 +1,466 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EntityViewInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'EntityViewId', + 'created_time': 'int', + 'tenant_id': 'TenantId', + 'customer_id': 'CustomerId', + 'name': 'str', + 'type': 'str', + 'entity_id': 'EntityId', + 'keys': 'TelemetryEntityView', + 'start_time_ms': 'int', + 'end_time_ms': 'int', + 'additional_info': 'JsonNode', + 'owner_name': 'str', + 'groups': 'list[EntityInfo]', + 'owner_id': 'EntityId' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'tenant_id': 'tenantId', + 'customer_id': 'customerId', + 'name': 'name', + 'type': 'type', + 'entity_id': 'entityId', + 'keys': 'keys', + 'start_time_ms': 'startTimeMs', + 'end_time_ms': 'endTimeMs', + 'additional_info': 'additionalInfo', + 'owner_name': 'ownerName', + 'groups': 'groups', + 'owner_id': 'ownerId' + } + + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, name=None, type=None, entity_id=None, keys=None, start_time_ms=None, end_time_ms=None, additional_info=None, owner_name=None, groups=None, owner_id=None): # noqa: E501 + """EntityViewInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._tenant_id = None + self._customer_id = None + self._name = None + self._type = None + self._entity_id = None + self._keys = None + self._start_time_ms = None + self._end_time_ms = None + self._additional_info = None + self._owner_name = None + self._groups = None + self._owner_id = None + self.discriminator = None + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if tenant_id is not None: + self.tenant_id = tenant_id + if customer_id is not None: + self.customer_id = customer_id + self.name = name + self.type = type + self.entity_id = entity_id + self.keys = keys + if start_time_ms is not None: + self.start_time_ms = start_time_ms + if end_time_ms is not None: + self.end_time_ms = end_time_ms + if additional_info is not None: + self.additional_info = additional_info + if owner_name is not None: + self.owner_name = owner_name + if groups is not None: + self.groups = groups + if owner_id is not None: + self.owner_id = owner_id + + @property + def id(self): + """Gets the id of this EntityViewInfo. # noqa: E501 + + + :return: The id of this EntityViewInfo. # noqa: E501 + :rtype: EntityViewId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EntityViewInfo. + + + :param id: The id of this EntityViewInfo. # noqa: E501 + :type: EntityViewId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this EntityViewInfo. # noqa: E501 + + Timestamp of the Entity View creation, in milliseconds # noqa: E501 + + :return: The created_time of this EntityViewInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this EntityViewInfo. + + Timestamp of the Entity View creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this EntityViewInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def tenant_id(self): + """Gets the tenant_id of this EntityViewInfo. # noqa: E501 + + + :return: The tenant_id of this EntityViewInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this EntityViewInfo. + + + :param tenant_id: The tenant_id of this EntityViewInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def customer_id(self): + """Gets the customer_id of this EntityViewInfo. # noqa: E501 + + + :return: The customer_id of this EntityViewInfo. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this EntityViewInfo. + + + :param customer_id: The customer_id of this EntityViewInfo. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def name(self): + """Gets the name of this EntityViewInfo. # noqa: E501 + + Entity View name # noqa: E501 + + :return: The name of this EntityViewInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EntityViewInfo. + + Entity View name # noqa: E501 + + :param name: The name of this EntityViewInfo. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def type(self): + """Gets the type of this EntityViewInfo. # noqa: E501 + + Device Profile Name # noqa: E501 + + :return: The type of this EntityViewInfo. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this EntityViewInfo. + + Device Profile Name # noqa: E501 + + :param type: The type of this EntityViewInfo. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + @property + def entity_id(self): + """Gets the entity_id of this EntityViewInfo. # noqa: E501 + + + :return: The entity_id of this EntityViewInfo. # noqa: E501 + :rtype: EntityId + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this EntityViewInfo. + + + :param entity_id: The entity_id of this EntityViewInfo. # noqa: E501 + :type: EntityId + """ + if entity_id is None: + raise ValueError("Invalid value for `entity_id`, must not be `None`") # noqa: E501 + + self._entity_id = entity_id + + @property + def keys(self): + """Gets the keys of this EntityViewInfo. # noqa: E501 + + + :return: The keys of this EntityViewInfo. # noqa: E501 + :rtype: TelemetryEntityView + """ + return self._keys + + @keys.setter + def keys(self, keys): + """Sets the keys of this EntityViewInfo. + + + :param keys: The keys of this EntityViewInfo. # noqa: E501 + :type: TelemetryEntityView + """ + if keys is None: + raise ValueError("Invalid value for `keys`, must not be `None`") # noqa: E501 + + self._keys = keys + + @property + def start_time_ms(self): + """Gets the start_time_ms of this EntityViewInfo. # noqa: E501 + + 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; # noqa: E501 + + :return: The start_time_ms of this EntityViewInfo. # noqa: E501 + :rtype: int + """ + return self._start_time_ms + + @start_time_ms.setter + def start_time_ms(self, start_time_ms): + """Sets the start_time_ms of this EntityViewInfo. + + 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; # noqa: E501 + + :param start_time_ms: The start_time_ms of this EntityViewInfo. # noqa: E501 + :type: int + """ + + self._start_time_ms = start_time_ms + + @property + def end_time_ms(self): + """Gets the end_time_ms of this EntityViewInfo. # noqa: E501 + + 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; # noqa: E501 + + :return: The end_time_ms of this EntityViewInfo. # noqa: E501 + :rtype: int + """ + return self._end_time_ms + + @end_time_ms.setter + def end_time_ms(self, end_time_ms): + """Sets the end_time_ms of this EntityViewInfo. + + 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; # noqa: E501 + + :param end_time_ms: The end_time_ms of this EntityViewInfo. # noqa: E501 + :type: int + """ + + self._end_time_ms = end_time_ms + + @property + def additional_info(self): + """Gets the additional_info of this EntityViewInfo. # noqa: E501 + + + :return: The additional_info of this EntityViewInfo. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this EntityViewInfo. + + + :param additional_info: The additional_info of this EntityViewInfo. # noqa: E501 + :type: JsonNode + """ + + self._additional_info = additional_info + + @property + def owner_name(self): + """Gets the owner_name of this EntityViewInfo. # noqa: E501 + + Owner name # noqa: E501 + + :return: The owner_name of this EntityViewInfo. # noqa: E501 + :rtype: str + """ + return self._owner_name + + @owner_name.setter + def owner_name(self, owner_name): + """Sets the owner_name of this EntityViewInfo. + + Owner name # noqa: E501 + + :param owner_name: The owner_name of this EntityViewInfo. # noqa: E501 + :type: str + """ + + self._owner_name = owner_name + + @property + def groups(self): + """Gets the groups of this EntityViewInfo. # noqa: E501 + + Groups # noqa: E501 + + :return: The groups of this EntityViewInfo. # noqa: E501 + :rtype: list[EntityInfo] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this EntityViewInfo. + + Groups # noqa: E501 + + :param groups: The groups of this EntityViewInfo. # noqa: E501 + :type: list[EntityInfo] + """ + + self._groups = groups + + @property + def owner_id(self): + """Gets the owner_id of this EntityViewInfo. # noqa: E501 + + + :return: The owner_id of this EntityViewInfo. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this EntityViewInfo. + + + :param owner_id: The owner_id of this EntityViewInfo. # noqa: E501 + :type: EntityId + """ + + self._owner_id = owner_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EntityViewInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EntityViewInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/entity_view_search_query.py b/tb_rest_client/models/models_pe/entity_view_search_query.py index 1bee16c8..e2e4768a 100644 --- a/tb_rest_client/models/models_pe/entity_view_search_query.py +++ b/tb_rest_client/models/models_pe/entity_view_search_query.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EntityViewSearchQuery(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/entity_view_search_query_filter.py b/tb_rest_client/models/models_pe/entity_view_search_query_filter.py index 2427cd7f..92841bdf 100644 --- a/tb_rest_client/models/models_pe/entity_view_search_query_filter.py +++ b/tb_rest_client/models/models_pe/entity_view_search_query_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EntityViewSearchQueryFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/entity_view_type_filter.py b/tb_rest_client/models/models_pe/entity_view_type_filter.py index 924f7c6a..c644d32f 100644 --- a/tb_rest_client/models/models_pe/entity_view_type_filter.py +++ b/tb_rest_client/models/models_pe/entity_view_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class EntityViewTypeFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -30,27 +30,27 @@ class EntityViewTypeFilter(EntityFilter): """ swagger_types = { 'entity_view_name_filter': 'str', - 'entity_view_type': 'str' + 'entity_view_types': 'list[str]' } if hasattr(EntityFilter, "swagger_types"): swagger_types.update(EntityFilter.swagger_types) attribute_map = { 'entity_view_name_filter': 'entityViewNameFilter', - 'entity_view_type': 'entityViewType' + 'entity_view_types': 'entityViewTypes' } if hasattr(EntityFilter, "attribute_map"): attribute_map.update(EntityFilter.attribute_map) - def __init__(self, entity_view_name_filter=None, entity_view_type=None, *args, **kwargs): # noqa: E501 + def __init__(self, entity_view_name_filter=None, entity_view_types=None, *args, **kwargs): # noqa: E501 """EntityViewTypeFilter - a model defined in Swagger""" # noqa: E501 self._entity_view_name_filter = None - self._entity_view_type = None + self._entity_view_types = None self.discriminator = None if entity_view_name_filter is not None: self.entity_view_name_filter = entity_view_name_filter - if entity_view_type is not None: - self.entity_view_type = entity_view_type + if entity_view_types is not None: + self.entity_view_types = entity_view_types EntityFilter.__init__(self, *args, **kwargs) @property @@ -75,25 +75,25 @@ def entity_view_name_filter(self, entity_view_name_filter): self._entity_view_name_filter = entity_view_name_filter @property - def entity_view_type(self): - """Gets the entity_view_type of this EntityViewTypeFilter. # noqa: E501 + def entity_view_types(self): + """Gets the entity_view_types of this EntityViewTypeFilter. # noqa: E501 - :return: The entity_view_type of this EntityViewTypeFilter. # noqa: E501 - :rtype: str + :return: The entity_view_types of this EntityViewTypeFilter. # noqa: E501 + :rtype: list[str] """ - return self._entity_view_type + return self._entity_view_types - @entity_view_type.setter - def entity_view_type(self, entity_view_type): - """Sets the entity_view_type of this EntityViewTypeFilter. + @entity_view_types.setter + def entity_view_types(self, entity_view_types): + """Sets the entity_view_types of this EntityViewTypeFilter. - :param entity_view_type: The entity_view_type of this EntityViewTypeFilter. # noqa: E501 - :type: str + :param entity_view_types: The entity_view_types of this EntityViewTypeFilter. # noqa: E501 + :type: list[str] """ - self._entity_view_type = entity_view_type + self._entity_view_types = entity_view_types def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_pe/error_event_filter.py b/tb_rest_client/models/models_pe/error_event_filter.py index 56b0769c..24204085 100644 --- a/tb_rest_client/models/models_pe/error_event_filter.py +++ b/tb_rest_client/models/models_pe/error_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .event_filter import EventFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.event_filter import EventFilter # noqa: F401,E501 class ErrorEventFilter(EventFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -29,6 +29,7 @@ class ErrorEventFilter(EventFilter): and the value is json key in definition. """ swagger_types = { + 'not_empty': 'bool', 'event_type': 'str', 'server': 'str', 'method': 'str', @@ -38,6 +39,7 @@ class ErrorEventFilter(EventFilter): swagger_types.update(EventFilter.swagger_types) attribute_map = { + 'not_empty': 'notEmpty', 'event_type': 'eventType', 'server': 'server', 'method': 'method', @@ -46,13 +48,16 @@ class ErrorEventFilter(EventFilter): if hasattr(EventFilter, "attribute_map"): attribute_map.update(EventFilter.attribute_map) - def __init__(self, event_type=None, server=None, method=None, error_str=None, *args, **kwargs): # noqa: E501 + def __init__(self, not_empty=None, event_type=None, server=None, method=None, error_str=None, *args, **kwargs): # noqa: E501 """ErrorEventFilter - a model defined in Swagger""" # noqa: E501 + self._not_empty = None self._event_type = None self._server = None self._method = None self._error_str = None self.discriminator = None + if not_empty is not None: + self.not_empty = not_empty self.event_type = event_type if server is not None: self.server = server @@ -62,6 +67,27 @@ def __init__(self, event_type=None, server=None, method=None, error_str=None, *a self.error_str = error_str EventFilter.__init__(self, *args, **kwargs) + @property + def not_empty(self): + """Gets the not_empty of this ErrorEventFilter. # noqa: E501 + + + :return: The not_empty of this ErrorEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this ErrorEventFilter. + + + :param not_empty: The not_empty of this ErrorEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + @property def event_type(self): """Gets the event_type of this ErrorEventFilter. # noqa: E501 @@ -84,7 +110,7 @@ def event_type(self, event_type): """ if event_type is None: raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 - allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "STATS"] # noqa: E501 + allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "RAW_DATA", "STATS"] # noqa: E501 if event_type not in allowed_values: raise ValueError( "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/escalated_notification_rule_recipients_config.py b/tb_rest_client/models/models_pe/escalated_notification_rule_recipients_config.py new file mode 100644 index 00000000..0bba3acd --- /dev/null +++ b/tb_rest_client/models/models_pe/escalated_notification_rule_recipients_config.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EscalatedNotificationRuleRecipientsConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'escalation_table': 'dict(str, list[str])', + 'trigger_type': 'str' + } + + attribute_map = { + 'escalation_table': 'escalationTable', + 'trigger_type': 'triggerType' + } + + def __init__(self, escalation_table=None, trigger_type=None): # noqa: E501 + """EscalatedNotificationRuleRecipientsConfig - a model defined in Swagger""" # noqa: E501 + self._escalation_table = None + self._trigger_type = None + self.discriminator = None + if escalation_table is not None: + self.escalation_table = escalation_table + self.trigger_type = trigger_type + + @property + def escalation_table(self): + """Gets the escalation_table of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + + + :return: The escalation_table of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + :rtype: dict(str, list[str]) + """ + return self._escalation_table + + @escalation_table.setter + def escalation_table(self, escalation_table): + """Sets the escalation_table of this EscalatedNotificationRuleRecipientsConfig. + + + :param escalation_table: The escalation_table of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + :type: dict(str, list[str]) + """ + + self._escalation_table = escalation_table + + @property + def trigger_type(self): + """Gets the trigger_type of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + + + :return: The trigger_type of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this EscalatedNotificationRuleRecipientsConfig. + + + :param trigger_type: The trigger_type of this EscalatedNotificationRuleRecipientsConfig. # noqa: E501 + :type: str + """ + if trigger_type is None: + raise ValueError("Invalid value for `trigger_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EscalatedNotificationRuleRecipientsConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EscalatedNotificationRuleRecipientsConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/event.py b/tb_rest_client/models/models_pe/event.py index d7971b49..2cf03e40 100644 --- a/tb_rest_client/models/models_pe/event.py +++ b/tb_rest_client/models/models_pe/event.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.4.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_pe/event_filter.py b/tb_rest_client/models/models_pe/event_filter.py index cf9a3a4e..659248b4 100644 --- a/tb_rest_client/models/models_pe/event_filter.py +++ b/tb_rest_client/models/models_pe/event_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EventFilter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,19 +28,45 @@ class EventFilter(object): and the value is json key in definition. """ swagger_types = { + 'not_empty': 'bool', 'event_type': 'str' } attribute_map = { + 'not_empty': 'notEmpty', 'event_type': 'eventType' } - def __init__(self, event_type=None): # noqa: E501 + def __init__(self, not_empty=None, event_type=None): # noqa: E501 """EventFilter - a model defined in Swagger""" # noqa: E501 + self._not_empty = None self._event_type = None self.discriminator = None + if not_empty is not None: + self.not_empty = not_empty self.event_type = event_type + @property + def not_empty(self): + """Gets the not_empty of this EventFilter. # noqa: E501 + + + :return: The not_empty of this EventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this EventFilter. + + + :param not_empty: The not_empty of this EventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + @property def event_type(self): """Gets the event_type of this EventFilter. # noqa: E501 @@ -63,7 +89,7 @@ def event_type(self, event_type): """ if event_type is None: raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 - allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "STATS"] # noqa: E501 + allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "RAW_DATA", "STATS"] # noqa: E501 if event_type not in allowed_values: raise ValueError( "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/event_id.py b/tb_rest_client/models/models_pe/event_id.py index a3440ca4..de882606 100644 --- a/tb_rest_client/models/models_pe/event_id.py +++ b/tb_rest_client/models/models_pe/event_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class EventId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,13 +28,11 @@ class EventId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } def __init__(self, id=None): # noqa: E501 diff --git a/tb_rest_client/models/models_pe/event_info.py b/tb_rest_client/models/models_pe/event_info.py new file mode 100644 index 00000000..2b07e67d --- /dev/null +++ b/tb_rest_client/models/models_pe/event_info.py @@ -0,0 +1,272 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EventInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'EventId', + 'tenant_id': 'TenantId', + 'type': 'str', + 'uid': 'str', + 'entity_id': 'EntityId', + 'body': 'JsonNode', + 'created_time': 'int' + } + + attribute_map = { + 'id': 'id', + 'tenant_id': 'tenantId', + 'type': 'type', + 'uid': 'uid', + 'entity_id': 'entityId', + 'body': 'body', + 'created_time': 'createdTime' + } + + def __init__(self, id=None, tenant_id=None, type=None, uid=None, entity_id=None, body=None, created_time=None): # noqa: E501 + """EventInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._tenant_id = None + self._type = None + self._uid = None + self._entity_id = None + self._body = None + self._created_time = None + self.discriminator = None + if id is not None: + self.id = id + if tenant_id is not None: + self.tenant_id = tenant_id + if type is not None: + self.type = type + if uid is not None: + self.uid = uid + if entity_id is not None: + self.entity_id = entity_id + if body is not None: + self.body = body + if created_time is not None: + self.created_time = created_time + + @property + def id(self): + """Gets the id of this EventInfo. # noqa: E501 + + + :return: The id of this EventInfo. # noqa: E501 + :rtype: EventId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EventInfo. + + + :param id: The id of this EventInfo. # noqa: E501 + :type: EventId + """ + + self._id = id + + @property + def tenant_id(self): + """Gets the tenant_id of this EventInfo. # noqa: E501 + + + :return: The tenant_id of this EventInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this EventInfo. + + + :param tenant_id: The tenant_id of this EventInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def type(self): + """Gets the type of this EventInfo. # noqa: E501 + + Event type # noqa: E501 + + :return: The type of this EventInfo. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this EventInfo. + + Event type # noqa: E501 + + :param type: The type of this EventInfo. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def uid(self): + """Gets the uid of this EventInfo. # noqa: E501 + + string # noqa: E501 + + :return: The uid of this EventInfo. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this EventInfo. + + string # noqa: E501 + + :param uid: The uid of this EventInfo. # noqa: E501 + :type: str + """ + + self._uid = uid + + @property + def entity_id(self): + """Gets the entity_id of this EventInfo. # noqa: E501 + + + :return: The entity_id of this EventInfo. # noqa: E501 + :rtype: EntityId + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this EventInfo. + + + :param entity_id: The entity_id of this EventInfo. # noqa: E501 + :type: EntityId + """ + + self._entity_id = entity_id + + @property + def body(self): + """Gets the body of this EventInfo. # noqa: E501 + + + :return: The body of this EventInfo. # noqa: E501 + :rtype: JsonNode + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EventInfo. + + + :param body: The body of this EventInfo. # noqa: E501 + :type: JsonNode + """ + + self._body = body + + @property + def created_time(self): + """Gets the created_time of this EventInfo. # noqa: E501 + + Timestamp of the event creation, in milliseconds # noqa: E501 + + :return: The created_time of this EventInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this EventInfo. + + Timestamp of the event creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this EventInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EventInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EventInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/exportable_entity_entity_id.py b/tb_rest_client/models/models_pe/exportable_entity_entity_id.py index 30369277..9d21f758 100644 --- a/tb_rest_client/models/models_pe/exportable_entity_entity_id.py +++ b/tb_rest_client/models/models_pe/exportable_entity_entity_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ExportableEntityEntityId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -29,29 +29,24 @@ class ExportableEntityEntityId(object): """ swagger_types = { 'created_time': 'int', - 'external_id': 'EntityId', 'id': 'EntityId', 'name': 'str' } attribute_map = { 'created_time': 'createdTime', - 'external_id': 'externalId', 'id': 'id', 'name': 'name' } - def __init__(self, created_time=None, external_id=None, id=None, name=None): # noqa: E501 + def __init__(self, created_time=None, id=None, name=None): # noqa: E501 """ExportableEntityEntityId - a model defined in Swagger""" # noqa: E501 self._created_time = None - self._external_id = None self._id = None self._name = None self.discriminator = None if created_time is not None: self.created_time = created_time - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if name is not None: @@ -78,27 +73,6 @@ def created_time(self, created_time): self._created_time = created_time - @property - def external_id(self): - """Gets the external_id of this ExportableEntityEntityId. # noqa: E501 - - - :return: The external_id of this ExportableEntityEntityId. # noqa: E501 - :rtype: EntityId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this ExportableEntityEntityId. - - - :param external_id: The external_id of this ExportableEntityEntityId. # noqa: E501 - :type: EntityId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this ExportableEntityEntityId. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/favicon.py b/tb_rest_client/models/models_pe/favicon.py index 0f877b58..2be96af8 100644 --- a/tb_rest_client/models/models_pe/favicon.py +++ b/tb_rest_client/models/models_pe/favicon.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Favicon(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/features_info.py b/tb_rest_client/models/models_pe/features_info.py new file mode 100644 index 00000000..8a6a6037 --- /dev/null +++ b/tb_rest_client/models/models_pe/features_info.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class FeaturesInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email_enabled': 'bool', + 'notification_enabled': 'bool', + 'oauth_enabled': 'bool', + 'sms_enabled': 'bool', + 'two_fa_enabled': 'bool', + 'white_labeling_enabled': 'bool' + } + + attribute_map = { + 'email_enabled': 'emailEnabled', + 'notification_enabled': 'notificationEnabled', + 'oauth_enabled': 'oauthEnabled', + 'sms_enabled': 'smsEnabled', + 'two_fa_enabled': 'twoFaEnabled', + 'white_labeling_enabled': 'whiteLabelingEnabled' + } + + def __init__(self, email_enabled=None, notification_enabled=None, oauth_enabled=None, sms_enabled=None, two_fa_enabled=None, white_labeling_enabled=None): # noqa: E501 + """FeaturesInfo - a model defined in Swagger""" # noqa: E501 + self._email_enabled = None + self._notification_enabled = None + self._oauth_enabled = None + self._sms_enabled = None + self._two_fa_enabled = None + self._white_labeling_enabled = None + self.discriminator = None + if email_enabled is not None: + self.email_enabled = email_enabled + if notification_enabled is not None: + self.notification_enabled = notification_enabled + if oauth_enabled is not None: + self.oauth_enabled = oauth_enabled + if sms_enabled is not None: + self.sms_enabled = sms_enabled + if two_fa_enabled is not None: + self.two_fa_enabled = two_fa_enabled + if white_labeling_enabled is not None: + self.white_labeling_enabled = white_labeling_enabled + + @property + def email_enabled(self): + """Gets the email_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The email_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._email_enabled + + @email_enabled.setter + def email_enabled(self, email_enabled): + """Sets the email_enabled of this FeaturesInfo. + + + :param email_enabled: The email_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._email_enabled = email_enabled + + @property + def notification_enabled(self): + """Gets the notification_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The notification_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._notification_enabled + + @notification_enabled.setter + def notification_enabled(self, notification_enabled): + """Sets the notification_enabled of this FeaturesInfo. + + + :param notification_enabled: The notification_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._notification_enabled = notification_enabled + + @property + def oauth_enabled(self): + """Gets the oauth_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The oauth_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._oauth_enabled + + @oauth_enabled.setter + def oauth_enabled(self, oauth_enabled): + """Sets the oauth_enabled of this FeaturesInfo. + + + :param oauth_enabled: The oauth_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._oauth_enabled = oauth_enabled + + @property + def sms_enabled(self): + """Gets the sms_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The sms_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._sms_enabled + + @sms_enabled.setter + def sms_enabled(self, sms_enabled): + """Sets the sms_enabled of this FeaturesInfo. + + + :param sms_enabled: The sms_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._sms_enabled = sms_enabled + + @property + def two_fa_enabled(self): + """Gets the two_fa_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The two_fa_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._two_fa_enabled + + @two_fa_enabled.setter + def two_fa_enabled(self, two_fa_enabled): + """Sets the two_fa_enabled of this FeaturesInfo. + + + :param two_fa_enabled: The two_fa_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._two_fa_enabled = two_fa_enabled + + @property + def white_labeling_enabled(self): + """Gets the white_labeling_enabled of this FeaturesInfo. # noqa: E501 + + + :return: The white_labeling_enabled of this FeaturesInfo. # noqa: E501 + :rtype: bool + """ + return self._white_labeling_enabled + + @white_labeling_enabled.setter + def white_labeling_enabled(self, white_labeling_enabled): + """Sets the white_labeling_enabled of this FeaturesInfo. + + + :param white_labeling_enabled: The white_labeling_enabled of this FeaturesInfo. # noqa: E501 + :type: bool + """ + + self._white_labeling_enabled = white_labeling_enabled + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(FeaturesInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FeaturesInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/filter_predicate_valueboolean.py b/tb_rest_client/models/models_pe/filter_predicate_valueboolean.py index 7dba8954..9b2ccf50 100644 --- a/tb_rest_client/models/models_pe/filter_predicate_valueboolean.py +++ b/tb_rest_client/models/models_pe/filter_predicate_valueboolean.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class FilterPredicateValueboolean(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/filter_predicate_valuedouble.py b/tb_rest_client/models/models_pe/filter_predicate_valuedouble.py index 596f63e1..a9348f7c 100644 --- a/tb_rest_client/models/models_pe/filter_predicate_valuedouble.py +++ b/tb_rest_client/models/models_pe/filter_predicate_valuedouble.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class FilterPredicateValuedouble(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/filter_predicate_valueint.py b/tb_rest_client/models/models_pe/filter_predicate_valueint.py index 10473871..faec5be0 100644 --- a/tb_rest_client/models/models_pe/filter_predicate_valueint.py +++ b/tb_rest_client/models/models_pe/filter_predicate_valueint.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class FilterPredicateValueint(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/filter_predicate_valuelong.py b/tb_rest_client/models/models_pe/filter_predicate_valuelong.py index a3de73e3..f10e59cb 100644 --- a/tb_rest_client/models/models_pe/filter_predicate_valuelong.py +++ b/tb_rest_client/models/models_pe/filter_predicate_valuelong.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class FilterPredicateValuelong(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/filter_predicate_valuestring.py b/tb_rest_client/models/models_pe/filter_predicate_valuestring.py index fccbdc2e..7497a1f3 100644 --- a/tb_rest_client/models/models_pe/filter_predicate_valuestring.py +++ b/tb_rest_client/models/models_pe/filter_predicate_valuestring.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class FilterPredicateValuestring(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/group_entity_export_data.py b/tb_rest_client/models/models_pe/group_entity_export_data.py index dfc41eaf..083872be 100644 --- a/tb_rest_client/models/models_pe/group_entity_export_data.py +++ b/tb_rest_client/models/models_pe/group_entity_export_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 class GroupEntityExportData(EntityExportDataobject): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -123,7 +123,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this GroupEntityExportData. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/group_permission.py b/tb_rest_client/models/models_pe/group_permission.py index 3cd75c73..42b3da45 100644 --- a/tb_rest_client/models/models_pe/group_permission.py +++ b/tb_rest_client/models/models_pe/group_permission.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class GroupPermission(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -251,7 +251,7 @@ def entity_group_type(self, entity_group_type): :param entity_group_type: The entity_group_type of this GroupPermission. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_group_type not in allowed_values: raise ValueError( "Invalid value for `entity_group_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/group_permission_id.py b/tb_rest_client/models/models_pe/group_permission_id.py index 0e8e0180..ea3620a8 100644 --- a/tb_rest_client/models/models_pe/group_permission_id.py +++ b/tb_rest_client/models/models_pe/group_permission_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class GroupPermissionId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -90,7 +90,7 @@ def entity_type(self, entity_type): """ if entity_type is None: raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/group_permission_info.py b/tb_rest_client/models/models_pe/group_permission_info.py index 23ed7cac..c1ec70d3 100644 --- a/tb_rest_client/models/models_pe/group_permission_info.py +++ b/tb_rest_client/models/models_pe/group_permission_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class GroupPermissionInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -312,7 +312,7 @@ def entity_group_type(self, entity_group_type): :param entity_group_type: The entity_group_type of this GroupPermissionInfo. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_group_type not in allowed_values: raise ValueError( "Invalid value for `entity_group_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/home_dashboard.py b/tb_rest_client/models/models_pe/home_dashboard.py index 640f56c1..6f5f0fc4 100644 --- a/tb_rest_client/models/models_pe/home_dashboard.py +++ b/tb_rest_client/models/models_pe/home_dashboard.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class HomeDashboard(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,7 @@ class HomeDashboard(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'DashboardId', + 'id': 'DashboardId', 'created_time': 'int', 'tenant_id': 'TenantId', 'customer_id': 'CustomerId', @@ -40,12 +40,11 @@ class HomeDashboard(object): 'mobile_order': 'int', 'name': 'str', 'configuration': 'JsonNode', - 'hide_dashboard_toolbar': 'bool', - 'id': 'DashboardId' + 'hide_dashboard_toolbar': 'bool' } attribute_map = { - 'external_id': 'externalId', + 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', 'customer_id': 'customerId', @@ -57,13 +56,12 @@ class HomeDashboard(object): 'mobile_order': 'mobileOrder', 'name': 'name', 'configuration': 'configuration', - 'hide_dashboard_toolbar': 'hideDashboardToolbar', - 'id': 'id' + 'hide_dashboard_toolbar': 'hideDashboardToolbar' } - def __init__(self, external_id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, title=None, image=None, assigned_customers=None, mobile_hide=None, mobile_order=None, name=None, configuration=None, hide_dashboard_toolbar=None, id=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, title=None, image=None, assigned_customers=None, mobile_hide=None, mobile_order=None, name=None, configuration=None, hide_dashboard_toolbar=None): # noqa: E501 """HomeDashboard - a model defined in Swagger""" # noqa: E501 - self._external_id = None + self._id = None self._created_time = None self._tenant_id = None self._customer_id = None @@ -76,10 +74,9 @@ def __init__(self, external_id=None, created_time=None, tenant_id=None, customer self._name = None self._configuration = None self._hide_dashboard_toolbar = None - self.id = id self.discriminator = None - if external_id is not None: - self.external_id = external_id + if id is not None: + self.id = id if created_time is not None: self.created_time = created_time if tenant_id is not None: @@ -106,25 +103,25 @@ def __init__(self, external_id=None, created_time=None, tenant_id=None, customer self.hide_dashboard_toolbar = hide_dashboard_toolbar @property - def external_id(self): - """Gets the external_id of this HomeDashboard. # noqa: E501 + def id(self): + """Gets the id of this HomeDashboard. # noqa: E501 - :return: The external_id of this HomeDashboard. # noqa: E501 + :return: The id of this HomeDashboard. # noqa: E501 :rtype: DashboardId """ - return self._external_id + return self._id - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this HomeDashboard. + @id.setter + def id(self, id): + """Sets the id of this HomeDashboard. - :param external_id: The external_id of this HomeDashboard. # noqa: E501 + :param id: The id of this HomeDashboard. # noqa: E501 :type: DashboardId """ - self._external_id = external_id + self._id = id @property def created_time(self): diff --git a/tb_rest_client/models/models_pe/home_dashboard_info.py b/tb_rest_client/models/models_pe/home_dashboard_info.py new file mode 100644 index 00000000..fdbe2d6b --- /dev/null +++ b/tb_rest_client/models/models_pe/home_dashboard_info.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class HomeDashboardInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'dashboard_id': 'DashboardId', + 'hide_dashboard_toolbar': 'bool' + } + + attribute_map = { + 'dashboard_id': 'dashboardId', + 'hide_dashboard_toolbar': 'hideDashboardToolbar' + } + + def __init__(self, dashboard_id=None, hide_dashboard_toolbar=None): # noqa: E501 + """HomeDashboardInfo - a model defined in Swagger""" # noqa: E501 + self._dashboard_id = None + self._hide_dashboard_toolbar = None + self.discriminator = None + if dashboard_id is not None: + self.dashboard_id = dashboard_id + if hide_dashboard_toolbar is not None: + self.hide_dashboard_toolbar = hide_dashboard_toolbar + + @property + def dashboard_id(self): + """Gets the dashboard_id of this HomeDashboardInfo. # noqa: E501 + + + :return: The dashboard_id of this HomeDashboardInfo. # noqa: E501 + :rtype: DashboardId + """ + return self._dashboard_id + + @dashboard_id.setter + def dashboard_id(self, dashboard_id): + """Sets the dashboard_id of this HomeDashboardInfo. + + + :param dashboard_id: The dashboard_id of this HomeDashboardInfo. # noqa: E501 + :type: DashboardId + """ + + self._dashboard_id = dashboard_id + + @property + def hide_dashboard_toolbar(self): + """Gets the hide_dashboard_toolbar of this HomeDashboardInfo. # noqa: E501 + + Hide dashboard toolbar flag. Useful for rendering dashboards on mobile. # noqa: E501 + + :return: The hide_dashboard_toolbar of this HomeDashboardInfo. # noqa: E501 + :rtype: bool + """ + return self._hide_dashboard_toolbar + + @hide_dashboard_toolbar.setter + def hide_dashboard_toolbar(self, hide_dashboard_toolbar): + """Sets the hide_dashboard_toolbar of this HomeDashboardInfo. + + Hide dashboard toolbar flag. Useful for rendering dashboards on mobile. # noqa: E501 + + :param hide_dashboard_toolbar: The hide_dashboard_toolbar of this HomeDashboardInfo. # noqa: E501 + :type: bool + """ + + self._hide_dashboard_toolbar = hide_dashboard_toolbar + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HomeDashboardInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HomeDashboardInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/input_stream.py b/tb_rest_client/models/models_pe/input_stream.py index ee7915a5..a0a1d080 100644 --- a/tb_rest_client/models/models_pe/input_stream.py +++ b/tb_rest_client/models/models_pe/input_stream.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class InputStream(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/integration.py b/tb_rest_client/models/models_pe/integration.py index c4c08ddc..e39de016 100644 --- a/tb_rest_client/models/models_pe/integration.py +++ b/tb_rest_client/models/models_pe/integration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Integration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class Integration(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'IntegrationId', 'id': 'IntegrationId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -48,7 +47,6 @@ class Integration(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -67,9 +65,8 @@ class Integration(object): 'edge_template': 'edgeTemplate' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, default_converter_id=None, downlink_converter_id=None, routing_key=None, type=None, debug_mode=None, enabled=None, remote=None, allow_create_devices_or_assets=None, secret=None, configuration=None, additional_info=None, name=None, edge_template=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, default_converter_id=None, downlink_converter_id=None, routing_key=None, type=None, debug_mode=None, enabled=None, remote=None, allow_create_devices_or_assets=None, secret=None, configuration=None, additional_info=None, name=None, edge_template=None): # noqa: E501 """Integration - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -87,8 +84,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._name = None self._edge_template = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -117,27 +112,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if edge_template is not None: self.edge_template = edge_template - @property - def external_id(self): - """Gets the external_id of this Integration. # noqa: E501 - - - :return: The external_id of this Integration. # noqa: E501 - :rtype: IntegrationId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Integration. - - - :param external_id: The external_id of this Integration. # noqa: E501 - :type: IntegrationId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this Integration. # noqa: E501 @@ -294,7 +268,7 @@ def type(self, type): """ if type is None: raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["APACHE_PULSAR", "AWS_IOT", "AWS_KINESIS", "AWS_SQS", "AZURE_EVENT_HUB", "AZURE_IOT_HUB", "CHIRPSTACK", "COAP", "CUSTOM", "HTTP", "IBM_WATSON_IOT", "KAFKA", "LORIOT", "MQTT", "OCEANCONNECT", "OPC_UA", "PUB_SUB", "RABBITMQ", "SIGFOX", "TCP", "THINGPARK", "TMOBILE_IOT_CDP", "TPE", "TTI", "TTN", "UDP"] # noqa: E501 + allowed_values = ["APACHE_PULSAR", "AWS_IOT", "AWS_KINESIS", "AWS_SQS", "AZURE_EVENT_HUB", "AZURE_IOT_HUB", "AZURE_SERVICE_BUS", "CHIRPSTACK", "COAP", "CUSTOM", "HTTP", "IBM_WATSON_IOT", "KAFKA", "LORIOT", "MQTT", "OCEANCONNECT", "OPC_UA", "PUB_SUB", "RABBITMQ", "SIGFOX", "TCP", "THINGPARK", "TMOBILE_IOT_CDP", "TPE", "TTI", "TTN", "TUYA", "UDP"] # noqa: E501 if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/integration_id.py b/tb_rest_client/models/models_pe/integration_id.py index 43e99a20..7694ab42 100644 --- a/tb_rest_client/models/models_pe/integration_id.py +++ b/tb_rest_client/models/models_pe/integration_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class IntegrationId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/integration_info.py b/tb_rest_client/models/models_pe/integration_info.py new file mode 100644 index 00000000..6e9c2722 --- /dev/null +++ b/tb_rest_client/models/models_pe/integration_info.py @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class IntegrationInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'stats': 'ArrayNode', + 'status': 'ObjectNode', + 'id': 'IntegrationId', + 'created_time': 'int', + 'tenant_id': 'TenantId', + 'type': 'str', + 'debug_mode': 'bool', + 'enabled': 'bool', + 'remote': 'bool', + 'allow_create_devices_or_assets': 'bool', + 'name': 'str', + 'edge_template': 'bool' + } + + attribute_map = { + 'stats': 'stats', + 'status': 'status', + 'id': 'id', + 'created_time': 'createdTime', + 'tenant_id': 'tenantId', + 'type': 'type', + 'debug_mode': 'debugMode', + 'enabled': 'enabled', + 'remote': 'remote', + 'allow_create_devices_or_assets': 'allowCreateDevicesOrAssets', + 'name': 'name', + 'edge_template': 'edgeTemplate' + } + + def __init__(self, stats=None, status=None, id=None, created_time=None, tenant_id=None, type=None, debug_mode=None, enabled=None, remote=None, allow_create_devices_or_assets=None, name=None, edge_template=None): # noqa: E501 + """IntegrationInfo - a model defined in Swagger""" # noqa: E501 + self._stats = None + self._status = None + self._id = None + self._created_time = None + self._tenant_id = None + self._type = None + self._debug_mode = None + self._enabled = None + self._remote = None + self._allow_create_devices_or_assets = None + self._name = None + self._edge_template = None + self.discriminator = None + if stats is not None: + self.stats = stats + if status is not None: + self.status = status + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if tenant_id is not None: + self.tenant_id = tenant_id + self.type = type + if debug_mode is not None: + self.debug_mode = debug_mode + if enabled is not None: + self.enabled = enabled + if remote is not None: + self.remote = remote + if allow_create_devices_or_assets is not None: + self.allow_create_devices_or_assets = allow_create_devices_or_assets + self.name = name + if edge_template is not None: + self.edge_template = edge_template + + @property + def stats(self): + """Gets the stats of this IntegrationInfo. # noqa: E501 + + + :return: The stats of this IntegrationInfo. # noqa: E501 + :rtype: ArrayNode + """ + return self._stats + + @stats.setter + def stats(self, stats): + """Sets the stats of this IntegrationInfo. + + + :param stats: The stats of this IntegrationInfo. # noqa: E501 + :type: ArrayNode + """ + + self._stats = stats + + @property + def status(self): + """Gets the status of this IntegrationInfo. # noqa: E501 + + + :return: The status of this IntegrationInfo. # noqa: E501 + :rtype: ObjectNode + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this IntegrationInfo. + + + :param status: The status of this IntegrationInfo. # noqa: E501 + :type: ObjectNode + """ + + self._status = status + + @property + def id(self): + """Gets the id of this IntegrationInfo. # noqa: E501 + + + :return: The id of this IntegrationInfo. # noqa: E501 + :rtype: IntegrationId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this IntegrationInfo. + + + :param id: The id of this IntegrationInfo. # noqa: E501 + :type: IntegrationId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this IntegrationInfo. # noqa: E501 + + Timestamp of the integration creation, in milliseconds # noqa: E501 + + :return: The created_time of this IntegrationInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this IntegrationInfo. + + Timestamp of the integration creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this IntegrationInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def tenant_id(self): + """Gets the tenant_id of this IntegrationInfo. # noqa: E501 + + + :return: The tenant_id of this IntegrationInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this IntegrationInfo. + + + :param tenant_id: The tenant_id of this IntegrationInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def type(self): + """Gets the type of this IntegrationInfo. # noqa: E501 + + The type of the integration # noqa: E501 + + :return: The type of this IntegrationInfo. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this IntegrationInfo. + + The type of the integration # noqa: E501 + + :param type: The type of this IntegrationInfo. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["APACHE_PULSAR", "AWS_IOT", "AWS_KINESIS", "AWS_SQS", "AZURE_EVENT_HUB", "AZURE_IOT_HUB", "AZURE_SERVICE_BUS", "CHIRPSTACK", "COAP", "CUSTOM", "HTTP", "IBM_WATSON_IOT", "KAFKA", "LORIOT", "MQTT", "OCEANCONNECT", "OPC_UA", "PUB_SUB", "RABBITMQ", "SIGFOX", "TCP", "THINGPARK", "TMOBILE_IOT_CDP", "TPE", "TTI", "TTN", "TUYA", "UDP"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def debug_mode(self): + """Gets the debug_mode of this IntegrationInfo. # noqa: E501 + + Boolean flag to enable/disable saving received messages as debug events # noqa: E501 + + :return: The debug_mode of this IntegrationInfo. # noqa: E501 + :rtype: bool + """ + return self._debug_mode + + @debug_mode.setter + def debug_mode(self, debug_mode): + """Sets the debug_mode of this IntegrationInfo. + + Boolean flag to enable/disable saving received messages as debug events # noqa: E501 + + :param debug_mode: The debug_mode of this IntegrationInfo. # noqa: E501 + :type: bool + """ + + self._debug_mode = debug_mode + + @property + def enabled(self): + """Gets the enabled of this IntegrationInfo. # noqa: E501 + + Boolean flag to enable/disable the integration # noqa: E501 + + :return: The enabled of this IntegrationInfo. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this IntegrationInfo. + + Boolean flag to enable/disable the integration # noqa: E501 + + :param enabled: The enabled of this IntegrationInfo. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def remote(self): + """Gets the remote of this IntegrationInfo. # noqa: E501 + + Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core # noqa: E501 + + :return: The remote of this IntegrationInfo. # noqa: E501 + :rtype: bool + """ + return self._remote + + @remote.setter + def remote(self, remote): + """Sets the remote of this IntegrationInfo. + + Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core # noqa: E501 + + :param remote: The remote of this IntegrationInfo. # noqa: E501 + :type: bool + """ + + self._remote = remote + + @property + def allow_create_devices_or_assets(self): + """Gets the allow_create_devices_or_assets of this IntegrationInfo. # noqa: E501 + + Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet # noqa: E501 + + :return: The allow_create_devices_or_assets of this IntegrationInfo. # noqa: E501 + :rtype: bool + """ + return self._allow_create_devices_or_assets + + @allow_create_devices_or_assets.setter + def allow_create_devices_or_assets(self, allow_create_devices_or_assets): + """Sets the allow_create_devices_or_assets of this IntegrationInfo. + + Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet # noqa: E501 + + :param allow_create_devices_or_assets: The allow_create_devices_or_assets of this IntegrationInfo. # noqa: E501 + :type: bool + """ + + self._allow_create_devices_or_assets = allow_create_devices_or_assets + + @property + def name(self): + """Gets the name of this IntegrationInfo. # noqa: E501 + + Integration Name # noqa: E501 + + :return: The name of this IntegrationInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this IntegrationInfo. + + Integration Name # noqa: E501 + + :param name: The name of this IntegrationInfo. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def edge_template(self): + """Gets the edge_template of this IntegrationInfo. # noqa: E501 + + Boolean flag that specifies that is regular or edge template integration # noqa: E501 + + :return: The edge_template of this IntegrationInfo. # noqa: E501 + :rtype: bool + """ + return self._edge_template + + @edge_template.setter + def edge_template(self, edge_template): + """Sets the edge_template of this IntegrationInfo. + + Boolean flag that specifies that is regular or edge template integration # noqa: E501 + + :param edge_template: The edge_template of this IntegrationInfo. # noqa: E501 + :type: bool + """ + + self._edge_template = edge_template + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(IntegrationInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IntegrationInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/integration_lifecycle_event_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/integration_lifecycle_event_notification_rule_trigger_config.py new file mode 100644 index 00000000..16af1bfc --- /dev/null +++ b/tb_rest_client/models/models_pe/integration_lifecycle_event_notification_rule_trigger_config.py @@ -0,0 +1,234 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class IntegrationLifecycleEventNotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'integration_types': 'list[str]', + 'integrations': 'list[str]', + 'notify_on': 'list[str]', + 'only_on_error': 'bool', + 'trigger_type': 'str' + } + + attribute_map = { + 'integration_types': 'integrationTypes', + 'integrations': 'integrations', + 'notify_on': 'notifyOn', + 'only_on_error': 'onlyOnError', + 'trigger_type': 'triggerType' + } + + def __init__(self, integration_types=None, integrations=None, notify_on=None, only_on_error=None, trigger_type=None): # noqa: E501 + """IntegrationLifecycleEventNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._integration_types = None + self._integrations = None + self._notify_on = None + self._only_on_error = None + self._trigger_type = None + self.discriminator = None + if integration_types is not None: + self.integration_types = integration_types + if integrations is not None: + self.integrations = integrations + if notify_on is not None: + self.notify_on = notify_on + if only_on_error is not None: + self.only_on_error = only_on_error + if trigger_type is not None: + self.trigger_type = trigger_type + + @property + def integration_types(self): + """Gets the integration_types of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The integration_types of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._integration_types + + @integration_types.setter + def integration_types(self, integration_types): + """Sets the integration_types of this IntegrationLifecycleEventNotificationRuleTriggerConfig. + + + :param integration_types: The integration_types of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["APACHE_PULSAR", "AWS_IOT", "AWS_KINESIS", "AWS_SQS", "AZURE_EVENT_HUB", "AZURE_IOT_HUB", "AZURE_SERVICE_BUS", "CHIRPSTACK", "COAP", "CUSTOM", "HTTP", "IBM_WATSON_IOT", "KAFKA", "LORIOT", "MQTT", "OCEANCONNECT", "OPC_UA", "PUB_SUB", "RABBITMQ", "SIGFOX", "TCP", "THINGPARK", "TMOBILE_IOT_CDP", "TPE", "TTI", "TTN", "TUYA", "UDP"] # noqa: E501 + if not set(integration_types).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `integration_types` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(integration_types) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._integration_types = integration_types + + @property + def integrations(self): + """Gets the integrations of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The integrations of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._integrations + + @integrations.setter + def integrations(self, integrations): + """Sets the integrations of this IntegrationLifecycleEventNotificationRuleTriggerConfig. + + + :param integrations: The integrations of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._integrations = integrations + + @property + def notify_on(self): + """Gets the notify_on of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The notify_on of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._notify_on + + @notify_on.setter + def notify_on(self, notify_on): + """Sets the notify_on of this IntegrationLifecycleEventNotificationRuleTriggerConfig. + + + :param notify_on: The notify_on of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACTIVATED", "CREATED", "DELETED", "FAILED", "STARTED", "STOPPED", "SUSPENDED", "UPDATED"] # noqa: E501 + if not set(notify_on).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `notify_on` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(notify_on) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._notify_on = notify_on + + @property + def only_on_error(self): + """Gets the only_on_error of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The only_on_error of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._only_on_error + + @only_on_error.setter + def only_on_error(self, only_on_error): + """Sets the only_on_error of this IntegrationLifecycleEventNotificationRuleTriggerConfig. + + + :param only_on_error: The only_on_error of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._only_on_error = only_on_error + + @property + def trigger_type(self): + """Gets the trigger_type of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this IntegrationLifecycleEventNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this IntegrationLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(IntegrationLifecycleEventNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IntegrationLifecycleEventNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/json_node.py b/tb_rest_client/models/models_pe/json_node.py index 1e4e5e8a..2bcef2a6 100644 --- a/tb_rest_client/models/models_pe/json_node.py +++ b/tb_rest_client/models/models_pe/json_node.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class JsonNode(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/json_transport_payload_configuration.py b/tb_rest_client/models/models_pe/json_transport_payload_configuration.py index 5bf3b9a0..d0b66a6a 100644 --- a/tb_rest_client/models/models_pe/json_transport_payload_configuration.py +++ b/tb_rest_client/models/models_pe/json_transport_payload_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .transport_payload_type_configuration import TransportPayloadTypeConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.transport_payload_type_configuration import TransportPayloadTypeConfiguration # noqa: F401,E501 class JsonTransportPayloadConfiguration(TransportPayloadTypeConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/jwt_pair.py b/tb_rest_client/models/models_pe/jwt_pair.py new file mode 100644 index 00000000..e9e88f97 --- /dev/null +++ b/tb_rest_client/models/models_pe/jwt_pair.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class JWTPair(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'scope': 'str', + 'refresh_token': 'str', + 'token': 'str' + } + + attribute_map = { + 'scope': 'scope', + 'refresh_token': 'refreshToken', + 'token': 'token' + } + + def __init__(self, scope=None, refresh_token=None, token=None): # noqa: E501 + """JWTPair - a model defined in Swagger""" # noqa: E501 + self._scope = None + self._refresh_token = None + self._token = None + self.discriminator = None + if scope is not None: + self.scope = scope + if refresh_token is not None: + self.refresh_token = refresh_token + if token is not None: + self.token = token + + @property + def scope(self): + """Gets the scope of this JWTPair. # noqa: E501 + + + :return: The scope of this JWTPair. # noqa: E501 + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this JWTPair. + + + :param scope: The scope of this JWTPair. # noqa: E501 + :type: str + """ + allowed_values = ["CUSTOMER_USER", "PRE_VERIFICATION_TOKEN", "REFRESH_TOKEN", "SYS_ADMIN", "TENANT_ADMIN"] # noqa: E501 + if scope not in allowed_values: + raise ValueError( + "Invalid value for `scope` ({0}), must be one of {1}" # noqa: E501 + .format(scope, allowed_values) + ) + + self._scope = scope + + @property + def refresh_token(self): + """Gets the refresh_token of this JWTPair. # noqa: E501 + + The JWT Refresh Token. Used to get new JWT Access Token if old one has expired. # noqa: E501 + + :return: The refresh_token of this JWTPair. # noqa: E501 + :rtype: str + """ + return self._refresh_token + + @refresh_token.setter + def refresh_token(self, refresh_token): + """Sets the refresh_token of this JWTPair. + + The JWT Refresh Token. Used to get new JWT Access Token if old one has expired. # noqa: E501 + + :param refresh_token: The refresh_token of this JWTPair. # noqa: E501 + :type: str + """ + + self._refresh_token = refresh_token + + @property + def token(self): + """Gets the token of this JWTPair. # noqa: E501 + + The JWT Access Token. Used to perform API calls. # noqa: E501 + + :return: The token of this JWTPair. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this JWTPair. + + The JWT Access Token. Used to perform API calls. # noqa: E501 + + :param token: The token of this JWTPair. # noqa: E501 + :type: str + """ + + self._token = token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(JWTPair, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, JWTPair): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/jwt_settings.py b/tb_rest_client/models/models_pe/jwt_settings.py new file mode 100644 index 00000000..bf286c3e --- /dev/null +++ b/tb_rest_client/models/models_pe/jwt_settings.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class JWTSettings(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'token_expiration_time': 'int', + 'refresh_token_exp_time': 'int', + 'token_issuer': 'str', + 'token_signing_key': 'str' + } + + attribute_map = { + 'token_expiration_time': 'tokenExpirationTime', + 'refresh_token_exp_time': 'refreshTokenExpTime', + 'token_issuer': 'tokenIssuer', + 'token_signing_key': 'tokenSigningKey' + } + + def __init__(self, token_expiration_time=None, refresh_token_exp_time=None, token_issuer=None, token_signing_key=None): # noqa: E501 + """JWTSettings - a model defined in Swagger""" # noqa: E501 + self._token_expiration_time = None + self._refresh_token_exp_time = None + self._token_issuer = None + self._token_signing_key = None + self.discriminator = None + if token_expiration_time is not None: + self.token_expiration_time = token_expiration_time + if refresh_token_exp_time is not None: + self.refresh_token_exp_time = refresh_token_exp_time + if token_issuer is not None: + self.token_issuer = token_issuer + if token_signing_key is not None: + self.token_signing_key = token_signing_key + + @property + def token_expiration_time(self): + """Gets the token_expiration_time of this JWTSettings. # noqa: E501 + + The JWT will expire after seconds. # noqa: E501 + + :return: The token_expiration_time of this JWTSettings. # noqa: E501 + :rtype: int + """ + return self._token_expiration_time + + @token_expiration_time.setter + def token_expiration_time(self, token_expiration_time): + """Sets the token_expiration_time of this JWTSettings. + + The JWT will expire after seconds. # noqa: E501 + + :param token_expiration_time: The token_expiration_time of this JWTSettings. # noqa: E501 + :type: int + """ + + self._token_expiration_time = token_expiration_time + + @property + def refresh_token_exp_time(self): + """Gets the refresh_token_exp_time of this JWTSettings. # noqa: E501 + + The JWT can be refreshed during seconds. # noqa: E501 + + :return: The refresh_token_exp_time of this JWTSettings. # noqa: E501 + :rtype: int + """ + return self._refresh_token_exp_time + + @refresh_token_exp_time.setter + def refresh_token_exp_time(self, refresh_token_exp_time): + """Sets the refresh_token_exp_time of this JWTSettings. + + The JWT can be refreshed during seconds. # noqa: E501 + + :param refresh_token_exp_time: The refresh_token_exp_time of this JWTSettings. # noqa: E501 + :type: int + """ + + self._refresh_token_exp_time = refresh_token_exp_time + + @property + def token_issuer(self): + """Gets the token_issuer of this JWTSettings. # noqa: E501 + + The JWT issuer. # noqa: E501 + + :return: The token_issuer of this JWTSettings. # noqa: E501 + :rtype: str + """ + return self._token_issuer + + @token_issuer.setter + def token_issuer(self, token_issuer): + """Sets the token_issuer of this JWTSettings. + + The JWT issuer. # noqa: E501 + + :param token_issuer: The token_issuer of this JWTSettings. # noqa: E501 + :type: str + """ + + self._token_issuer = token_issuer + + @property + def token_signing_key(self): + """Gets the token_signing_key of this JWTSettings. # noqa: E501 + + The JWT key is used to sing token. Base64 encoded. # noqa: E501 + + :return: The token_signing_key of this JWTSettings. # noqa: E501 + :rtype: str + """ + return self._token_signing_key + + @token_signing_key.setter + def token_signing_key(self, token_signing_key): + """Sets the token_signing_key of this JWTSettings. + + The JWT key is used to sing token. Base64 encoded. # noqa: E501 + + :param token_signing_key: The token_signing_key of this JWTSettings. # noqa: E501 + :type: str + """ + + self._token_signing_key = token_signing_key + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(JWTSettings, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, JWTSettings): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/key_filter.py b/tb_rest_client/models/models_pe/key_filter.py index 6aa5a544..bf465429 100644 --- a/tb_rest_client/models/models_pe/key_filter.py +++ b/tb_rest_client/models/models_pe/key_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class KeyFilter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/key_filter_predicate.py b/tb_rest_client/models/models_pe/key_filter_predicate.py index 4a6b91c9..f3a3533f 100644 --- a/tb_rest_client/models/models_pe/key_filter_predicate.py +++ b/tb_rest_client/models/models_pe/key_filter_predicate.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class KeyFilterPredicate(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/last_visited_dashboard_info.py b/tb_rest_client/models/models_pe/last_visited_dashboard_info.py new file mode 100644 index 00000000..abfbd8ad --- /dev/null +++ b/tb_rest_client/models/models_pe/last_visited_dashboard_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class LastVisitedDashboardInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'title': 'str', + 'starred': 'bool', + 'last_visited': 'int' + } + + attribute_map = { + 'id': 'id', + 'title': 'title', + 'starred': 'starred', + 'last_visited': 'lastVisited' + } + + def __init__(self, id=None, title=None, starred=None, last_visited=None): # noqa: E501 + """LastVisitedDashboardInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._title = None + self._starred = None + self._last_visited = None + self.discriminator = None + if id is not None: + self.id = id + if title is not None: + self.title = title + if starred is not None: + self.starred = starred + if last_visited is not None: + self.last_visited = last_visited + + @property + def id(self): + """Gets the id of this LastVisitedDashboardInfo. # noqa: E501 + + JSON object with Dashboard id. # noqa: E501 + + :return: The id of this LastVisitedDashboardInfo. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this LastVisitedDashboardInfo. + + JSON object with Dashboard id. # noqa: E501 + + :param id: The id of this LastVisitedDashboardInfo. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def title(self): + """Gets the title of this LastVisitedDashboardInfo. # noqa: E501 + + Title of the dashboard. # noqa: E501 + + :return: The title of this LastVisitedDashboardInfo. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this LastVisitedDashboardInfo. + + Title of the dashboard. # noqa: E501 + + :param title: The title of this LastVisitedDashboardInfo. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def starred(self): + """Gets the starred of this LastVisitedDashboardInfo. # noqa: E501 + + Starred flag # noqa: E501 + + :return: The starred of this LastVisitedDashboardInfo. # noqa: E501 + :rtype: bool + """ + return self._starred + + @starred.setter + def starred(self, starred): + """Sets the starred of this LastVisitedDashboardInfo. + + Starred flag # noqa: E501 + + :param starred: The starred of this LastVisitedDashboardInfo. # noqa: E501 + :type: bool + """ + + self._starred = starred + + @property + def last_visited(self): + """Gets the last_visited of this LastVisitedDashboardInfo. # noqa: E501 + + Last visit timestamp # noqa: E501 + + :return: The last_visited of this LastVisitedDashboardInfo. # noqa: E501 + :rtype: int + """ + return self._last_visited + + @last_visited.setter + def last_visited(self, last_visited): + """Sets the last_visited of this LastVisitedDashboardInfo. + + Last visit timestamp # noqa: E501 + + :param last_visited: The last_visited of this LastVisitedDashboardInfo. # noqa: E501 + :type: int + """ + + self._last_visited = last_visited + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LastVisitedDashboardInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LastVisitedDashboardInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/license_usage_info.py b/tb_rest_client/models/models_pe/license_usage_info.py new file mode 100644 index 00000000..92332917 --- /dev/null +++ b/tb_rest_client/models/models_pe/license_usage_info.py @@ -0,0 +1,318 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class LicenseUsageInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'assets_count': 'int', + 'dashboards_count': 'int', + 'development': 'bool', + 'devices_count': 'int', + 'integrations_count': 'int', + 'max_assets': 'int', + 'max_devices': 'int', + 'plan': 'str', + 'white_labeling_enabled': 'bool' + } + + attribute_map = { + 'assets_count': 'assetsCount', + 'dashboards_count': 'dashboardsCount', + 'development': 'development', + 'devices_count': 'devicesCount', + 'integrations_count': 'integrationsCount', + 'max_assets': 'maxAssets', + 'max_devices': 'maxDevices', + 'plan': 'plan', + 'white_labeling_enabled': 'whiteLabelingEnabled' + } + + def __init__(self, assets_count=None, dashboards_count=None, development=None, devices_count=None, integrations_count=None, max_assets=None, max_devices=None, plan=None, white_labeling_enabled=None): # noqa: E501 + """LicenseUsageInfo - a model defined in Swagger""" # noqa: E501 + self._assets_count = None + self._dashboards_count = None + self._development = None + self._devices_count = None + self._integrations_count = None + self._max_assets = None + self._max_devices = None + self._plan = None + self._white_labeling_enabled = None + self.discriminator = None + if assets_count is not None: + self.assets_count = assets_count + if dashboards_count is not None: + self.dashboards_count = dashboards_count + if development is not None: + self.development = development + if devices_count is not None: + self.devices_count = devices_count + if integrations_count is not None: + self.integrations_count = integrations_count + if max_assets is not None: + self.max_assets = max_assets + if max_devices is not None: + self.max_devices = max_devices + if plan is not None: + self.plan = plan + if white_labeling_enabled is not None: + self.white_labeling_enabled = white_labeling_enabled + + @property + def assets_count(self): + """Gets the assets_count of this LicenseUsageInfo. # noqa: E501 + + + :return: The assets_count of this LicenseUsageInfo. # noqa: E501 + :rtype: int + """ + return self._assets_count + + @assets_count.setter + def assets_count(self, assets_count): + """Sets the assets_count of this LicenseUsageInfo. + + + :param assets_count: The assets_count of this LicenseUsageInfo. # noqa: E501 + :type: int + """ + + self._assets_count = assets_count + + @property + def dashboards_count(self): + """Gets the dashboards_count of this LicenseUsageInfo. # noqa: E501 + + + :return: The dashboards_count of this LicenseUsageInfo. # noqa: E501 + :rtype: int + """ + return self._dashboards_count + + @dashboards_count.setter + def dashboards_count(self, dashboards_count): + """Sets the dashboards_count of this LicenseUsageInfo. + + + :param dashboards_count: The dashboards_count of this LicenseUsageInfo. # noqa: E501 + :type: int + """ + + self._dashboards_count = dashboards_count + + @property + def development(self): + """Gets the development of this LicenseUsageInfo. # noqa: E501 + + + :return: The development of this LicenseUsageInfo. # noqa: E501 + :rtype: bool + """ + return self._development + + @development.setter + def development(self, development): + """Sets the development of this LicenseUsageInfo. + + + :param development: The development of this LicenseUsageInfo. # noqa: E501 + :type: bool + """ + + self._development = development + + @property + def devices_count(self): + """Gets the devices_count of this LicenseUsageInfo. # noqa: E501 + + + :return: The devices_count of this LicenseUsageInfo. # noqa: E501 + :rtype: int + """ + return self._devices_count + + @devices_count.setter + def devices_count(self, devices_count): + """Sets the devices_count of this LicenseUsageInfo. + + + :param devices_count: The devices_count of this LicenseUsageInfo. # noqa: E501 + :type: int + """ + + self._devices_count = devices_count + + @property + def integrations_count(self): + """Gets the integrations_count of this LicenseUsageInfo. # noqa: E501 + + + :return: The integrations_count of this LicenseUsageInfo. # noqa: E501 + :rtype: int + """ + return self._integrations_count + + @integrations_count.setter + def integrations_count(self, integrations_count): + """Sets the integrations_count of this LicenseUsageInfo. + + + :param integrations_count: The integrations_count of this LicenseUsageInfo. # noqa: E501 + :type: int + """ + + self._integrations_count = integrations_count + + @property + def max_assets(self): + """Gets the max_assets of this LicenseUsageInfo. # noqa: E501 + + + :return: The max_assets of this LicenseUsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_assets + + @max_assets.setter + def max_assets(self, max_assets): + """Sets the max_assets of this LicenseUsageInfo. + + + :param max_assets: The max_assets of this LicenseUsageInfo. # noqa: E501 + :type: int + """ + + self._max_assets = max_assets + + @property + def max_devices(self): + """Gets the max_devices of this LicenseUsageInfo. # noqa: E501 + + + :return: The max_devices of this LicenseUsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_devices + + @max_devices.setter + def max_devices(self, max_devices): + """Sets the max_devices of this LicenseUsageInfo. + + + :param max_devices: The max_devices of this LicenseUsageInfo. # noqa: E501 + :type: int + """ + + self._max_devices = max_devices + + @property + def plan(self): + """Gets the plan of this LicenseUsageInfo. # noqa: E501 + + + :return: The plan of this LicenseUsageInfo. # noqa: E501 + :rtype: str + """ + return self._plan + + @plan.setter + def plan(self, plan): + """Sets the plan of this LicenseUsageInfo. + + + :param plan: The plan of this LicenseUsageInfo. # noqa: E501 + :type: str + """ + + self._plan = plan + + @property + def white_labeling_enabled(self): + """Gets the white_labeling_enabled of this LicenseUsageInfo. # noqa: E501 + + + :return: The white_labeling_enabled of this LicenseUsageInfo. # noqa: E501 + :rtype: bool + """ + return self._white_labeling_enabled + + @white_labeling_enabled.setter + def white_labeling_enabled(self, white_labeling_enabled): + """Sets the white_labeling_enabled of this LicenseUsageInfo. + + + :param white_labeling_enabled: The white_labeling_enabled of this LicenseUsageInfo. # noqa: E501 + :type: bool + """ + + self._white_labeling_enabled = white_labeling_enabled + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LicenseUsageInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LicenseUsageInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/life_cycle_event_filter.py b/tb_rest_client/models/models_pe/life_cycle_event_filter.py index c28c9f50..8bc70ed8 100644 --- a/tb_rest_client/models/models_pe/life_cycle_event_filter.py +++ b/tb_rest_client/models/models_pe/life_cycle_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .event_filter import EventFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.event_filter import EventFilter # noqa: F401,E501 class LifeCycleEventFilter(EventFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -29,6 +29,7 @@ class LifeCycleEventFilter(EventFilter): and the value is json key in definition. """ swagger_types = { + 'not_empty': 'bool', 'event_type': 'str', 'server': 'str', 'event': 'str', @@ -39,6 +40,7 @@ class LifeCycleEventFilter(EventFilter): swagger_types.update(EventFilter.swagger_types) attribute_map = { + 'not_empty': 'notEmpty', 'event_type': 'eventType', 'server': 'server', 'event': 'event', @@ -48,14 +50,17 @@ class LifeCycleEventFilter(EventFilter): if hasattr(EventFilter, "attribute_map"): attribute_map.update(EventFilter.attribute_map) - def __init__(self, event_type=None, server=None, event=None, status=None, error_str=None, *args, **kwargs): # noqa: E501 + def __init__(self, not_empty=None, event_type=None, server=None, event=None, status=None, error_str=None, *args, **kwargs): # noqa: E501 """LifeCycleEventFilter - a model defined in Swagger""" # noqa: E501 + self._not_empty = None self._event_type = None self._server = None self._event = None self._status = None self._error_str = None self.discriminator = None + if not_empty is not None: + self.not_empty = not_empty self.event_type = event_type if server is not None: self.server = server @@ -67,6 +72,27 @@ def __init__(self, event_type=None, server=None, event=None, status=None, error_ self.error_str = error_str EventFilter.__init__(self, *args, **kwargs) + @property + def not_empty(self): + """Gets the not_empty of this LifeCycleEventFilter. # noqa: E501 + + + :return: The not_empty of this LifeCycleEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this LifeCycleEventFilter. + + + :param not_empty: The not_empty of this LifeCycleEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + @property def event_type(self): """Gets the event_type of this LifeCycleEventFilter. # noqa: E501 @@ -89,7 +115,7 @@ def event_type(self, event_type): """ if event_type is None: raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 - allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "STATS"] # noqa: E501 + allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "RAW_DATA", "STATS"] # noqa: E501 if event_type not in allowed_values: raise ValueError( "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/login_request.py b/tb_rest_client/models/models_pe/login_request.py index 6e62cd14..d81884a8 100644 --- a/tb_rest_client/models/models_pe/login_request.py +++ b/tb_rest_client/models/models_pe/login_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LoginRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/login_response.py b/tb_rest_client/models/models_pe/login_response.py index f5a02fce..4b5a5aa5 100644 --- a/tb_rest_client/models/models_pe/login_response.py +++ b/tb_rest_client/models/models_pe/login_response.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LoginResponse(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/login_white_labeling_params.py b/tb_rest_client/models/models_pe/login_white_labeling_params.py index dfe16038..bf7ff17f 100644 --- a/tb_rest_client/models/models_pe/login_white_labeling_params.py +++ b/tb_rest_client/models/models_pe/login_white_labeling_params.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LoginWhiteLabelingParams(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/lw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_pe/lw_m2_m_bootstrap_server_credential.py index 03c1a870..182f1575 100644 --- a/tb_rest_client/models/models_pe/lw_m2_m_bootstrap_server_credential.py +++ b/tb_rest_client/models/models_pe/lw_m2_m_bootstrap_server_credential.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LwM2MBootstrapServerCredential(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/lw_m2_m_server_security_config_default.py b/tb_rest_client/models/models_pe/lw_m2_m_server_security_config_default.py index 6243c34e..e544f24e 100644 --- a/tb_rest_client/models/models_pe/lw_m2_m_server_security_config_default.py +++ b/tb_rest_client/models/models_pe/lw_m2_m_server_security_config_default.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LwM2MServerSecurityConfigDefault(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/lw_m2m_instance.py b/tb_rest_client/models/models_pe/lw_m2m_instance.py index 2bd9e741..4505783f 100644 --- a/tb_rest_client/models/models_pe/lw_m2m_instance.py +++ b/tb_rest_client/models/models_pe/lw_m2m_instance.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LwM2mInstance(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/lw_m2m_object.py b/tb_rest_client/models/models_pe/lw_m2m_object.py index 1d127c61..41bff1f0 100644 --- a/tb_rest_client/models/models_pe/lw_m2m_object.py +++ b/tb_rest_client/models/models_pe/lw_m2m_object.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LwM2mObject(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/lw_m2m_resource_observe.py b/tb_rest_client/models/models_pe/lw_m2m_resource_observe.py index 2d3dee3a..b5231b94 100644 --- a/tb_rest_client/models/models_pe/lw_m2m_resource_observe.py +++ b/tb_rest_client/models/models_pe/lw_m2m_resource_observe.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class LwM2mResourceObserve(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/lwm2m_device_profile_transport_configuration.py b/tb_rest_client/models/models_pe/lwm2m_device_profile_transport_configuration.py index 32bbaa5c..93dd0e61 100644 --- a/tb_rest_client/models/models_pe/lwm2m_device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_pe/lwm2m_device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 class Lwm2mDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/lwm2m_device_transport_configuration.py b/tb_rest_client/models/models_pe/lwm2m_device_transport_configuration.py index 3aaf96dc..b57ebc77 100644 --- a/tb_rest_client/models/models_pe/lwm2m_device_transport_configuration.py +++ b/tb_rest_client/models/models_pe/lwm2m_device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 class Lwm2mDeviceTransportConfiguration(DeviceTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/mapping.py b/tb_rest_client/models/models_pe/mapping.py index 10131af5..86cd75d6 100644 --- a/tb_rest_client/models/models_pe/mapping.py +++ b/tb_rest_client/models/models_pe/mapping.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Mapping(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/merged_group_permission_info.py b/tb_rest_client/models/models_pe/merged_group_permission_info.py index 8d77265b..b86a24f6 100644 --- a/tb_rest_client/models/models_pe/merged_group_permission_info.py +++ b/tb_rest_client/models/models_pe/merged_group_permission_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class MergedGroupPermissionInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -65,7 +65,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this MergedGroupPermissionInfo. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/merged_group_type_permission_info.py b/tb_rest_client/models/models_pe/merged_group_type_permission_info.py index 42edfdf4..415a1208 100644 --- a/tb_rest_client/models/models_pe/merged_group_type_permission_info.py +++ b/tb_rest_client/models/models_pe/merged_group_type_permission_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class MergedGroupTypePermissionInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/merged_user_permissions.py b/tb_rest_client/models/models_pe/merged_user_permissions.py index a3d0af57..27f3beb2 100644 --- a/tb_rest_client/models/models_pe/merged_user_permissions.py +++ b/tb_rest_client/models/models_pe/merged_user_permissions.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class MergedUserPermissions(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/mqtt_device_profile_transport_configuration.py b/tb_rest_client/models/models_pe/mqtt_device_profile_transport_configuration.py index 2c017218..81716abb 100644 --- a/tb_rest_client/models/models_pe/mqtt_device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_pe/mqtt_device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class MqttDeviceProfileTransportConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,35 +28,71 @@ class MqttDeviceProfileTransportConfiguration(object): and the value is json key in definition. """ swagger_types = { + 'device_attributes_subscribe_topic': 'str', 'device_attributes_topic': 'str', 'device_telemetry_topic': 'str', 'send_ack_on_validation_exception': 'bool', + 'sparkplug': 'bool', + 'sparkplug_attributes_metric_names': 'list[str]', 'transport_payload_type_configuration': 'TransportPayloadTypeConfiguration' } attribute_map = { + 'device_attributes_subscribe_topic': 'deviceAttributesSubscribeTopic', 'device_attributes_topic': 'deviceAttributesTopic', 'device_telemetry_topic': 'deviceTelemetryTopic', 'send_ack_on_validation_exception': 'sendAckOnValidationException', + 'sparkplug': 'sparkplug', + 'sparkplug_attributes_metric_names': 'sparkplugAttributesMetricNames', 'transport_payload_type_configuration': 'transportPayloadTypeConfiguration' } - def __init__(self, device_attributes_topic=None, device_telemetry_topic=None, send_ack_on_validation_exception=None, transport_payload_type_configuration=None): # noqa: E501 + def __init__(self, device_attributes_subscribe_topic=None, device_attributes_topic=None, device_telemetry_topic=None, send_ack_on_validation_exception=None, sparkplug=None, sparkplug_attributes_metric_names=None, transport_payload_type_configuration=None): # noqa: E501 """MqttDeviceProfileTransportConfiguration - a model defined in Swagger""" # noqa: E501 + self._device_attributes_subscribe_topic = None self._device_attributes_topic = None self._device_telemetry_topic = None self._send_ack_on_validation_exception = None + self._sparkplug = None + self._sparkplug_attributes_metric_names = None self._transport_payload_type_configuration = None self.discriminator = None + if device_attributes_subscribe_topic is not None: + self.device_attributes_subscribe_topic = device_attributes_subscribe_topic if device_attributes_topic is not None: self.device_attributes_topic = device_attributes_topic if device_telemetry_topic is not None: self.device_telemetry_topic = device_telemetry_topic if send_ack_on_validation_exception is not None: self.send_ack_on_validation_exception = send_ack_on_validation_exception + if sparkplug is not None: + self.sparkplug = sparkplug + if sparkplug_attributes_metric_names is not None: + self.sparkplug_attributes_metric_names = sparkplug_attributes_metric_names if transport_payload_type_configuration is not None: self.transport_payload_type_configuration = transport_payload_type_configuration + @property + def device_attributes_subscribe_topic(self): + """Gets the device_attributes_subscribe_topic of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + + + :return: The device_attributes_subscribe_topic of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :rtype: str + """ + return self._device_attributes_subscribe_topic + + @device_attributes_subscribe_topic.setter + def device_attributes_subscribe_topic(self, device_attributes_subscribe_topic): + """Sets the device_attributes_subscribe_topic of this MqttDeviceProfileTransportConfiguration. + + + :param device_attributes_subscribe_topic: The device_attributes_subscribe_topic of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :type: str + """ + + self._device_attributes_subscribe_topic = device_attributes_subscribe_topic + @property def device_attributes_topic(self): """Gets the device_attributes_topic of this MqttDeviceProfileTransportConfiguration. # noqa: E501 @@ -120,6 +156,48 @@ def send_ack_on_validation_exception(self, send_ack_on_validation_exception): self._send_ack_on_validation_exception = send_ack_on_validation_exception + @property + def sparkplug(self): + """Gets the sparkplug of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + + + :return: The sparkplug of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :rtype: bool + """ + return self._sparkplug + + @sparkplug.setter + def sparkplug(self, sparkplug): + """Sets the sparkplug of this MqttDeviceProfileTransportConfiguration. + + + :param sparkplug: The sparkplug of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :type: bool + """ + + self._sparkplug = sparkplug + + @property + def sparkplug_attributes_metric_names(self): + """Gets the sparkplug_attributes_metric_names of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + + + :return: The sparkplug_attributes_metric_names of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :rtype: list[str] + """ + return self._sparkplug_attributes_metric_names + + @sparkplug_attributes_metric_names.setter + def sparkplug_attributes_metric_names(self, sparkplug_attributes_metric_names): + """Sets the sparkplug_attributes_metric_names of this MqttDeviceProfileTransportConfiguration. + + + :param sparkplug_attributes_metric_names: The sparkplug_attributes_metric_names of this MqttDeviceProfileTransportConfiguration. # noqa: E501 + :type: list[str] + """ + + self._sparkplug_attributes_metric_names = sparkplug_attributes_metric_names + @property def transport_payload_type_configuration(self): """Gets the transport_payload_type_configuration of this MqttDeviceProfileTransportConfiguration. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/mqtt_device_transport_configuration.py b/tb_rest_client/models/models_pe/mqtt_device_transport_configuration.py index 97743222..7bc64dc7 100644 --- a/tb_rest_client/models/models_pe/mqtt_device_transport_configuration.py +++ b/tb_rest_client/models/models_pe/mqtt_device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 class MqttDeviceTransportConfiguration(DeviceTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/new_platform_version_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/new_platform_version_notification_rule_trigger_config.py new file mode 100644 index 00000000..1dee1466 --- /dev/null +++ b/tb_rest_client/models/models_pe/new_platform_version_notification_rule_trigger_config.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NewPlatformVersionNotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'trigger_type': 'str' + } + + attribute_map = { + 'trigger_type': 'triggerType' + } + + def __init__(self, trigger_type=None): # noqa: E501 + """NewPlatformVersionNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._trigger_type = None + self.discriminator = None + if trigger_type is not None: + self.trigger_type = trigger_type + + @property + def trigger_type(self): + """Gets the trigger_type of this NewPlatformVersionNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this NewPlatformVersionNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this NewPlatformVersionNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this NewPlatformVersionNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NewPlatformVersionNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NewPlatformVersionNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/no_sec_lw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_pe/no_sec_lw_m2_m_bootstrap_server_credential.py index 336faa39..7937bb51 100644 --- a/tb_rest_client/models/models_pe/no_sec_lw_m2_m_bootstrap_server_credential.py +++ b/tb_rest_client/models/models_pe/no_sec_lw_m2_m_bootstrap_server_credential.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class NoSecLwM2MBootstrapServerCredential(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/node_connection_info.py b/tb_rest_client/models/models_pe/node_connection_info.py index 350386a7..5aa5ef7f 100644 --- a/tb_rest_client/models/models_pe/node_connection_info.py +++ b/tb_rest_client/models/models_pe/node_connection_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class NodeConnectionInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/notification.py b/tb_rest_client/models/models_pe/notification.py new file mode 100644 index 00000000..a87bb22f --- /dev/null +++ b/tb_rest_client/models/models_pe/notification.py @@ -0,0 +1,356 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Notification(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'JsonNode', + 'created_time': 'int', + 'id': 'NotificationId', + 'info': 'NotificationInfo', + 'recipient_id': 'UserId', + 'request_id': 'NotificationRequestId', + 'status': 'str', + 'subject': 'str', + 'text': 'str', + 'type': 'str' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'created_time': 'createdTime', + 'id': 'id', + 'info': 'info', + 'recipient_id': 'recipientId', + 'request_id': 'requestId', + 'status': 'status', + 'subject': 'subject', + 'text': 'text', + 'type': 'type' + } + + def __init__(self, additional_config=None, created_time=None, id=None, info=None, recipient_id=None, request_id=None, status=None, subject=None, text=None, type=None): # noqa: E501 + """Notification - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._created_time = None + self._id = None + self._info = None + self._recipient_id = None + self._request_id = None + self._status = None + self._subject = None + self._text = None + self._type = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if created_time is not None: + self.created_time = created_time + if id is not None: + self.id = id + if info is not None: + self.info = info + if recipient_id is not None: + self.recipient_id = recipient_id + if request_id is not None: + self.request_id = request_id + if status is not None: + self.status = status + if subject is not None: + self.subject = subject + if text is not None: + self.text = text + if type is not None: + self.type = type + + @property + def additional_config(self): + """Gets the additional_config of this Notification. # noqa: E501 + + + :return: The additional_config of this Notification. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this Notification. + + + :param additional_config: The additional_config of this Notification. # noqa: E501 + :type: JsonNode + """ + + self._additional_config = additional_config + + @property + def created_time(self): + """Gets the created_time of this Notification. # noqa: E501 + + + :return: The created_time of this Notification. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this Notification. + + + :param created_time: The created_time of this Notification. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this Notification. # noqa: E501 + + + :return: The id of this Notification. # noqa: E501 + :rtype: NotificationId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Notification. + + + :param id: The id of this Notification. # noqa: E501 + :type: NotificationId + """ + + self._id = id + + @property + def info(self): + """Gets the info of this Notification. # noqa: E501 + + + :return: The info of this Notification. # noqa: E501 + :rtype: NotificationInfo + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this Notification. + + + :param info: The info of this Notification. # noqa: E501 + :type: NotificationInfo + """ + + self._info = info + + @property + def recipient_id(self): + """Gets the recipient_id of this Notification. # noqa: E501 + + + :return: The recipient_id of this Notification. # noqa: E501 + :rtype: UserId + """ + return self._recipient_id + + @recipient_id.setter + def recipient_id(self, recipient_id): + """Sets the recipient_id of this Notification. + + + :param recipient_id: The recipient_id of this Notification. # noqa: E501 + :type: UserId + """ + + self._recipient_id = recipient_id + + @property + def request_id(self): + """Gets the request_id of this Notification. # noqa: E501 + + + :return: The request_id of this Notification. # noqa: E501 + :rtype: NotificationRequestId + """ + return self._request_id + + @request_id.setter + def request_id(self, request_id): + """Sets the request_id of this Notification. + + + :param request_id: The request_id of this Notification. # noqa: E501 + :type: NotificationRequestId + """ + + self._request_id = request_id + + @property + def status(self): + """Gets the status of this Notification. # noqa: E501 + + + :return: The status of this Notification. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Notification. + + + :param status: The status of this Notification. # noqa: E501 + :type: str + """ + allowed_values = ["READ", "SENT"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def subject(self): + """Gets the subject of this Notification. # noqa: E501 + + + :return: The subject of this Notification. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this Notification. + + + :param subject: The subject of this Notification. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def text(self): + """Gets the text of this Notification. # noqa: E501 + + + :return: The text of this Notification. # noqa: E501 + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """Sets the text of this Notification. + + + :param text: The text of this Notification. # noqa: E501 + :type: str + """ + + self._text = text + + @property + def type(self): + """Gets the type of this Notification. # noqa: E501 + + + :return: The type of this Notification. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Notification. + + + :param type: The type of this Notification. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "GENERAL", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", "RULE_NODE"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Notification, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Notification): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_delivery_method_config.py b/tb_rest_client/models/models_pe/notification_delivery_method_config.py new file mode 100644 index 00000000..e37e763f --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_delivery_method_config.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationDeliveryMethodConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """NotificationDeliveryMethodConfig - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationDeliveryMethodConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationDeliveryMethodConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_id.py b/tb_rest_client/models/models_pe/notification_id.py new file mode 100644 index 00000000..dd7d71e6 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_id.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """NotificationId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this NotificationId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this NotificationId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this NotificationId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this NotificationId. # noqa: E501 + + + :return: The entity_type of this NotificationId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this NotificationId. + + + :param entity_type: The entity_type of this NotificationId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_info.py b/tb_rest_client/models/models_pe/notification_info.py new file mode 100644 index 00000000..79343cfa --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_info.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'state_entity_id': 'EntityId' + } + + attribute_map = { + 'state_entity_id': 'stateEntityId' + } + + def __init__(self, state_entity_id=None): # noqa: E501 + """NotificationInfo - a model defined in Swagger""" # noqa: E501 + self._state_entity_id = None + self.discriminator = None + if state_entity_id is not None: + self.state_entity_id = state_entity_id + + @property + def state_entity_id(self): + """Gets the state_entity_id of this NotificationInfo. # noqa: E501 + + + :return: The state_entity_id of this NotificationInfo. # noqa: E501 + :rtype: EntityId + """ + return self._state_entity_id + + @state_entity_id.setter + def state_entity_id(self, state_entity_id): + """Sets the state_entity_id of this NotificationInfo. + + + :param state_entity_id: The state_entity_id of this NotificationInfo. # noqa: E501 + :type: EntityId + """ + + self._state_entity_id = state_entity_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_request.py b/tb_rest_client/models/models_pe/notification_request.py new file mode 100644 index 00000000..c4c0ea84 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_request.py @@ -0,0 +1,402 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'NotificationRequestConfig', + 'created_time': 'int', + 'id': 'NotificationRequestId', + 'info': 'NotificationInfo', + 'originator_entity_id': 'EntityId', + 'rule_id': 'NotificationRuleId', + 'stats': 'NotificationRequestStats', + 'status': 'str', + 'targets': 'list[str]', + 'template': 'NotificationTemplate', + 'template_id': 'NotificationTemplateId', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'created_time': 'createdTime', + 'id': 'id', + 'info': 'info', + 'originator_entity_id': 'originatorEntityId', + 'rule_id': 'ruleId', + 'stats': 'stats', + 'status': 'status', + 'targets': 'targets', + 'template': 'template', + 'template_id': 'templateId', + 'tenant_id': 'tenantId' + } + + def __init__(self, additional_config=None, created_time=None, id=None, info=None, originator_entity_id=None, rule_id=None, stats=None, status=None, targets=None, template=None, template_id=None, tenant_id=None): # noqa: E501 + """NotificationRequest - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._created_time = None + self._id = None + self._info = None + self._originator_entity_id = None + self._rule_id = None + self._stats = None + self._status = None + self._targets = None + self._template = None + self._template_id = None + self._tenant_id = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if created_time is not None: + self.created_time = created_time + if id is not None: + self.id = id + if info is not None: + self.info = info + if originator_entity_id is not None: + self.originator_entity_id = originator_entity_id + if rule_id is not None: + self.rule_id = rule_id + if stats is not None: + self.stats = stats + if status is not None: + self.status = status + if targets is not None: + self.targets = targets + if template is not None: + self.template = template + if template_id is not None: + self.template_id = template_id + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def additional_config(self): + """Gets the additional_config of this NotificationRequest. # noqa: E501 + + + :return: The additional_config of this NotificationRequest. # noqa: E501 + :rtype: NotificationRequestConfig + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this NotificationRequest. + + + :param additional_config: The additional_config of this NotificationRequest. # noqa: E501 + :type: NotificationRequestConfig + """ + + self._additional_config = additional_config + + @property + def created_time(self): + """Gets the created_time of this NotificationRequest. # noqa: E501 + + + :return: The created_time of this NotificationRequest. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationRequest. + + + :param created_time: The created_time of this NotificationRequest. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this NotificationRequest. # noqa: E501 + + + :return: The id of this NotificationRequest. # noqa: E501 + :rtype: NotificationRequestId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRequest. + + + :param id: The id of this NotificationRequest. # noqa: E501 + :type: NotificationRequestId + """ + + self._id = id + + @property + def info(self): + """Gets the info of this NotificationRequest. # noqa: E501 + + + :return: The info of this NotificationRequest. # noqa: E501 + :rtype: NotificationInfo + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this NotificationRequest. + + + :param info: The info of this NotificationRequest. # noqa: E501 + :type: NotificationInfo + """ + + self._info = info + + @property + def originator_entity_id(self): + """Gets the originator_entity_id of this NotificationRequest. # noqa: E501 + + + :return: The originator_entity_id of this NotificationRequest. # noqa: E501 + :rtype: EntityId + """ + return self._originator_entity_id + + @originator_entity_id.setter + def originator_entity_id(self, originator_entity_id): + """Sets the originator_entity_id of this NotificationRequest. + + + :param originator_entity_id: The originator_entity_id of this NotificationRequest. # noqa: E501 + :type: EntityId + """ + + self._originator_entity_id = originator_entity_id + + @property + def rule_id(self): + """Gets the rule_id of this NotificationRequest. # noqa: E501 + + + :return: The rule_id of this NotificationRequest. # noqa: E501 + :rtype: NotificationRuleId + """ + return self._rule_id + + @rule_id.setter + def rule_id(self, rule_id): + """Sets the rule_id of this NotificationRequest. + + + :param rule_id: The rule_id of this NotificationRequest. # noqa: E501 + :type: NotificationRuleId + """ + + self._rule_id = rule_id + + @property + def stats(self): + """Gets the stats of this NotificationRequest. # noqa: E501 + + + :return: The stats of this NotificationRequest. # noqa: E501 + :rtype: NotificationRequestStats + """ + return self._stats + + @stats.setter + def stats(self, stats): + """Sets the stats of this NotificationRequest. + + + :param stats: The stats of this NotificationRequest. # noqa: E501 + :type: NotificationRequestStats + """ + + self._stats = stats + + @property + def status(self): + """Gets the status of this NotificationRequest. # noqa: E501 + + + :return: The status of this NotificationRequest. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this NotificationRequest. + + + :param status: The status of this NotificationRequest. # noqa: E501 + :type: str + """ + allowed_values = ["PROCESSING", "SCHEDULED", "SENT"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def targets(self): + """Gets the targets of this NotificationRequest. # noqa: E501 + + + :return: The targets of this NotificationRequest. # noqa: E501 + :rtype: list[str] + """ + return self._targets + + @targets.setter + def targets(self, targets): + """Sets the targets of this NotificationRequest. + + + :param targets: The targets of this NotificationRequest. # noqa: E501 + :type: list[str] + """ + + self._targets = targets + + @property + def template(self): + """Gets the template of this NotificationRequest. # noqa: E501 + + + :return: The template of this NotificationRequest. # noqa: E501 + :rtype: NotificationTemplate + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this NotificationRequest. + + + :param template: The template of this NotificationRequest. # noqa: E501 + :type: NotificationTemplate + """ + + self._template = template + + @property + def template_id(self): + """Gets the template_id of this NotificationRequest. # noqa: E501 + + + :return: The template_id of this NotificationRequest. # noqa: E501 + :rtype: NotificationTemplateId + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this NotificationRequest. + + + :param template_id: The template_id of this NotificationRequest. # noqa: E501 + :type: NotificationTemplateId + """ + + self._template_id = template_id + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationRequest. # noqa: E501 + + + :return: The tenant_id of this NotificationRequest. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationRequest. + + + :param tenant_id: The tenant_id of this NotificationRequest. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_request_config.py b/tb_rest_client/models/models_pe/notification_request_config.py new file mode 100644 index 00000000..14781ff4 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_request_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequestConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'sending_delay_in_sec': 'int' + } + + attribute_map = { + 'sending_delay_in_sec': 'sendingDelayInSec' + } + + def __init__(self, sending_delay_in_sec=None): # noqa: E501 + """NotificationRequestConfig - a model defined in Swagger""" # noqa: E501 + self._sending_delay_in_sec = None + self.discriminator = None + if sending_delay_in_sec is not None: + self.sending_delay_in_sec = sending_delay_in_sec + + @property + def sending_delay_in_sec(self): + """Gets the sending_delay_in_sec of this NotificationRequestConfig. # noqa: E501 + + + :return: The sending_delay_in_sec of this NotificationRequestConfig. # noqa: E501 + :rtype: int + """ + return self._sending_delay_in_sec + + @sending_delay_in_sec.setter + def sending_delay_in_sec(self, sending_delay_in_sec): + """Sets the sending_delay_in_sec of this NotificationRequestConfig. + + + :param sending_delay_in_sec: The sending_delay_in_sec of this NotificationRequestConfig. # noqa: E501 + :type: int + """ + + self._sending_delay_in_sec = sending_delay_in_sec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequestConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequestConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_request_id.py b/tb_rest_client/models/models_pe/notification_request_id.py new file mode 100644 index 00000000..f8f2c800 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_request_id.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequestId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """NotificationRequestId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this NotificationRequestId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this NotificationRequestId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRequestId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this NotificationRequestId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this NotificationRequestId. # noqa: E501 + + + :return: The entity_type of this NotificationRequestId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this NotificationRequestId. + + + :param entity_type: The entity_type of this NotificationRequestId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequestId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequestId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_request_info.py b/tb_rest_client/models/models_pe/notification_request_info.py new file mode 100644 index 00000000..2fc6b3a6 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_request_info.py @@ -0,0 +1,461 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequestInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'NotificationRequestConfig', + 'created_time': 'int', + 'delivery_methods': 'list[str]', + 'id': 'NotificationRequestId', + 'info': 'NotificationInfo', + 'originator_entity_id': 'EntityId', + 'rule_id': 'NotificationRuleId', + 'stats': 'NotificationRequestStats', + 'status': 'str', + 'targets': 'list[str]', + 'template': 'NotificationTemplate', + 'template_id': 'NotificationTemplateId', + 'template_name': 'str', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'created_time': 'createdTime', + 'delivery_methods': 'deliveryMethods', + 'id': 'id', + 'info': 'info', + 'originator_entity_id': 'originatorEntityId', + 'rule_id': 'ruleId', + 'stats': 'stats', + 'status': 'status', + 'targets': 'targets', + 'template': 'template', + 'template_id': 'templateId', + 'template_name': 'templateName', + 'tenant_id': 'tenantId' + } + + def __init__(self, additional_config=None, created_time=None, delivery_methods=None, id=None, info=None, originator_entity_id=None, rule_id=None, stats=None, status=None, targets=None, template=None, template_id=None, template_name=None, tenant_id=None): # noqa: E501 + """NotificationRequestInfo - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._created_time = None + self._delivery_methods = None + self._id = None + self._info = None + self._originator_entity_id = None + self._rule_id = None + self._stats = None + self._status = None + self._targets = None + self._template = None + self._template_id = None + self._template_name = None + self._tenant_id = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if created_time is not None: + self.created_time = created_time + if delivery_methods is not None: + self.delivery_methods = delivery_methods + if id is not None: + self.id = id + if info is not None: + self.info = info + if originator_entity_id is not None: + self.originator_entity_id = originator_entity_id + if rule_id is not None: + self.rule_id = rule_id + if stats is not None: + self.stats = stats + if status is not None: + self.status = status + if targets is not None: + self.targets = targets + if template is not None: + self.template = template + if template_id is not None: + self.template_id = template_id + if template_name is not None: + self.template_name = template_name + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def additional_config(self): + """Gets the additional_config of this NotificationRequestInfo. # noqa: E501 + + + :return: The additional_config of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationRequestConfig + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this NotificationRequestInfo. + + + :param additional_config: The additional_config of this NotificationRequestInfo. # noqa: E501 + :type: NotificationRequestConfig + """ + + self._additional_config = additional_config + + @property + def created_time(self): + """Gets the created_time of this NotificationRequestInfo. # noqa: E501 + + + :return: The created_time of this NotificationRequestInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationRequestInfo. + + + :param created_time: The created_time of this NotificationRequestInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def delivery_methods(self): + """Gets the delivery_methods of this NotificationRequestInfo. # noqa: E501 + + + :return: The delivery_methods of this NotificationRequestInfo. # noqa: E501 + :rtype: list[str] + """ + return self._delivery_methods + + @delivery_methods.setter + def delivery_methods(self, delivery_methods): + """Sets the delivery_methods of this NotificationRequestInfo. + + + :param delivery_methods: The delivery_methods of this NotificationRequestInfo. # noqa: E501 + :type: list[str] + """ + allowed_values = ["EMAIL", "SLACK", "SMS", "WEB"] # noqa: E501 + if not set(delivery_methods).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `delivery_methods` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(delivery_methods) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._delivery_methods = delivery_methods + + @property + def id(self): + """Gets the id of this NotificationRequestInfo. # noqa: E501 + + + :return: The id of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationRequestId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRequestInfo. + + + :param id: The id of this NotificationRequestInfo. # noqa: E501 + :type: NotificationRequestId + """ + + self._id = id + + @property + def info(self): + """Gets the info of this NotificationRequestInfo. # noqa: E501 + + + :return: The info of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationInfo + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this NotificationRequestInfo. + + + :param info: The info of this NotificationRequestInfo. # noqa: E501 + :type: NotificationInfo + """ + + self._info = info + + @property + def originator_entity_id(self): + """Gets the originator_entity_id of this NotificationRequestInfo. # noqa: E501 + + + :return: The originator_entity_id of this NotificationRequestInfo. # noqa: E501 + :rtype: EntityId + """ + return self._originator_entity_id + + @originator_entity_id.setter + def originator_entity_id(self, originator_entity_id): + """Sets the originator_entity_id of this NotificationRequestInfo. + + + :param originator_entity_id: The originator_entity_id of this NotificationRequestInfo. # noqa: E501 + :type: EntityId + """ + + self._originator_entity_id = originator_entity_id + + @property + def rule_id(self): + """Gets the rule_id of this NotificationRequestInfo. # noqa: E501 + + + :return: The rule_id of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationRuleId + """ + return self._rule_id + + @rule_id.setter + def rule_id(self, rule_id): + """Sets the rule_id of this NotificationRequestInfo. + + + :param rule_id: The rule_id of this NotificationRequestInfo. # noqa: E501 + :type: NotificationRuleId + """ + + self._rule_id = rule_id + + @property + def stats(self): + """Gets the stats of this NotificationRequestInfo. # noqa: E501 + + + :return: The stats of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationRequestStats + """ + return self._stats + + @stats.setter + def stats(self, stats): + """Sets the stats of this NotificationRequestInfo. + + + :param stats: The stats of this NotificationRequestInfo. # noqa: E501 + :type: NotificationRequestStats + """ + + self._stats = stats + + @property + def status(self): + """Gets the status of this NotificationRequestInfo. # noqa: E501 + + + :return: The status of this NotificationRequestInfo. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this NotificationRequestInfo. + + + :param status: The status of this NotificationRequestInfo. # noqa: E501 + :type: str + """ + allowed_values = ["PROCESSING", "SCHEDULED", "SENT"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def targets(self): + """Gets the targets of this NotificationRequestInfo. # noqa: E501 + + + :return: The targets of this NotificationRequestInfo. # noqa: E501 + :rtype: list[str] + """ + return self._targets + + @targets.setter + def targets(self, targets): + """Sets the targets of this NotificationRequestInfo. + + + :param targets: The targets of this NotificationRequestInfo. # noqa: E501 + :type: list[str] + """ + + self._targets = targets + + @property + def template(self): + """Gets the template of this NotificationRequestInfo. # noqa: E501 + + + :return: The template of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationTemplate + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this NotificationRequestInfo. + + + :param template: The template of this NotificationRequestInfo. # noqa: E501 + :type: NotificationTemplate + """ + + self._template = template + + @property + def template_id(self): + """Gets the template_id of this NotificationRequestInfo. # noqa: E501 + + + :return: The template_id of this NotificationRequestInfo. # noqa: E501 + :rtype: NotificationTemplateId + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this NotificationRequestInfo. + + + :param template_id: The template_id of this NotificationRequestInfo. # noqa: E501 + :type: NotificationTemplateId + """ + + self._template_id = template_id + + @property + def template_name(self): + """Gets the template_name of this NotificationRequestInfo. # noqa: E501 + + + :return: The template_name of this NotificationRequestInfo. # noqa: E501 + :rtype: str + """ + return self._template_name + + @template_name.setter + def template_name(self, template_name): + """Sets the template_name of this NotificationRequestInfo. + + + :param template_name: The template_name of this NotificationRequestInfo. # noqa: E501 + :type: str + """ + + self._template_name = template_name + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationRequestInfo. # noqa: E501 + + + :return: The tenant_id of this NotificationRequestInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationRequestInfo. + + + :param tenant_id: The tenant_id of this NotificationRequestInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequestInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequestInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_request_preview.py b/tb_rest_client/models/models_pe/notification_request_preview.py new file mode 100644 index 00000000..68985a5a --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_request_preview.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequestPreview(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'processed_templates': 'dict(str, DeliveryMethodNotificationTemplate)', + 'recipients_count_by_target': 'dict(str, int)', + 'recipients_preview': 'list[str]', + 'total_recipients_count': 'int' + } + + attribute_map = { + 'processed_templates': 'processedTemplates', + 'recipients_count_by_target': 'recipientsCountByTarget', + 'recipients_preview': 'recipientsPreview', + 'total_recipients_count': 'totalRecipientsCount' + } + + def __init__(self, processed_templates=None, recipients_count_by_target=None, recipients_preview=None, total_recipients_count=None): # noqa: E501 + """NotificationRequestPreview - a model defined in Swagger""" # noqa: E501 + self._processed_templates = None + self._recipients_count_by_target = None + self._recipients_preview = None + self._total_recipients_count = None + self.discriminator = None + if processed_templates is not None: + self.processed_templates = processed_templates + if recipients_count_by_target is not None: + self.recipients_count_by_target = recipients_count_by_target + if recipients_preview is not None: + self.recipients_preview = recipients_preview + if total_recipients_count is not None: + self.total_recipients_count = total_recipients_count + + @property + def processed_templates(self): + """Gets the processed_templates of this NotificationRequestPreview. # noqa: E501 + + + :return: The processed_templates of this NotificationRequestPreview. # noqa: E501 + :rtype: dict(str, DeliveryMethodNotificationTemplate) + """ + return self._processed_templates + + @processed_templates.setter + def processed_templates(self, processed_templates): + """Sets the processed_templates of this NotificationRequestPreview. + + + :param processed_templates: The processed_templates of this NotificationRequestPreview. # noqa: E501 + :type: dict(str, DeliveryMethodNotificationTemplate) + """ + + self._processed_templates = processed_templates + + @property + def recipients_count_by_target(self): + """Gets the recipients_count_by_target of this NotificationRequestPreview. # noqa: E501 + + + :return: The recipients_count_by_target of this NotificationRequestPreview. # noqa: E501 + :rtype: dict(str, int) + """ + return self._recipients_count_by_target + + @recipients_count_by_target.setter + def recipients_count_by_target(self, recipients_count_by_target): + """Sets the recipients_count_by_target of this NotificationRequestPreview. + + + :param recipients_count_by_target: The recipients_count_by_target of this NotificationRequestPreview. # noqa: E501 + :type: dict(str, int) + """ + + self._recipients_count_by_target = recipients_count_by_target + + @property + def recipients_preview(self): + """Gets the recipients_preview of this NotificationRequestPreview. # noqa: E501 + + + :return: The recipients_preview of this NotificationRequestPreview. # noqa: E501 + :rtype: list[str] + """ + return self._recipients_preview + + @recipients_preview.setter + def recipients_preview(self, recipients_preview): + """Sets the recipients_preview of this NotificationRequestPreview. + + + :param recipients_preview: The recipients_preview of this NotificationRequestPreview. # noqa: E501 + :type: list[str] + """ + + self._recipients_preview = recipients_preview + + @property + def total_recipients_count(self): + """Gets the total_recipients_count of this NotificationRequestPreview. # noqa: E501 + + + :return: The total_recipients_count of this NotificationRequestPreview. # noqa: E501 + :rtype: int + """ + return self._total_recipients_count + + @total_recipients_count.setter + def total_recipients_count(self, total_recipients_count): + """Sets the total_recipients_count of this NotificationRequestPreview. + + + :param total_recipients_count: The total_recipients_count of this NotificationRequestPreview. # noqa: E501 + :type: int + """ + + self._total_recipients_count = total_recipients_count + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequestPreview, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequestPreview): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_request_stats.py b/tb_rest_client/models/models_pe/notification_request_stats.py new file mode 100644 index 00000000..ea801025 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_request_stats.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRequestStats(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'error': 'str', + 'errors': 'dict(str, object)', + 'sent': 'dict(str, AtomicInteger)' + } + + attribute_map = { + 'error': 'error', + 'errors': 'errors', + 'sent': 'sent' + } + + def __init__(self, error=None, errors=None, sent=None): # noqa: E501 + """NotificationRequestStats - a model defined in Swagger""" # noqa: E501 + self._error = None + self._errors = None + self._sent = None + self.discriminator = None + if error is not None: + self.error = error + if errors is not None: + self.errors = errors + if sent is not None: + self.sent = sent + + @property + def error(self): + """Gets the error of this NotificationRequestStats. # noqa: E501 + + + :return: The error of this NotificationRequestStats. # noqa: E501 + :rtype: str + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this NotificationRequestStats. + + + :param error: The error of this NotificationRequestStats. # noqa: E501 + :type: str + """ + + self._error = error + + @property + def errors(self): + """Gets the errors of this NotificationRequestStats. # noqa: E501 + + + :return: The errors of this NotificationRequestStats. # noqa: E501 + :rtype: dict(str, object) + """ + return self._errors + + @errors.setter + def errors(self, errors): + """Sets the errors of this NotificationRequestStats. + + + :param errors: The errors of this NotificationRequestStats. # noqa: E501 + :type: dict(str, object) + """ + + self._errors = errors + + @property + def sent(self): + """Gets the sent of this NotificationRequestStats. # noqa: E501 + + + :return: The sent of this NotificationRequestStats. # noqa: E501 + :rtype: dict(str, AtomicInteger) + """ + return self._sent + + @sent.setter + def sent(self, sent): + """Sets the sent of this NotificationRequestStats. + + + :param sent: The sent of this NotificationRequestStats. # noqa: E501 + :type: dict(str, AtomicInteger) + """ + + self._sent = sent + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRequestStats, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRequestStats): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_rule.py b/tb_rest_client/models/models_pe/notification_rule.py new file mode 100644 index 00000000..62c6945f --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_rule.py @@ -0,0 +1,329 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRule(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'NotificationRuleConfig', + 'created_time': 'int', + 'id': 'NotificationRuleId', + 'name': 'str', + 'recipients_config': 'NotificationRuleRecipientsConfig', + 'template_id': 'NotificationTemplateId', + 'tenant_id': 'TenantId', + 'trigger_config': 'NotificationRuleTriggerConfig', + 'trigger_type': 'str' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'created_time': 'createdTime', + 'id': 'id', + 'name': 'name', + 'recipients_config': 'recipientsConfig', + 'template_id': 'templateId', + 'tenant_id': 'tenantId', + 'trigger_config': 'triggerConfig', + 'trigger_type': 'triggerType' + } + + def __init__(self, additional_config=None, created_time=None, id=None, name=None, recipients_config=None, template_id=None, tenant_id=None, trigger_config=None, trigger_type=None): # noqa: E501 + """NotificationRule - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._created_time = None + self._id = None + self._name = None + self._recipients_config = None + self._template_id = None + self._tenant_id = None + self._trigger_config = None + self._trigger_type = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if created_time is not None: + self.created_time = created_time + if id is not None: + self.id = id + self.name = name + self.recipients_config = recipients_config + self.template_id = template_id + if tenant_id is not None: + self.tenant_id = tenant_id + self.trigger_config = trigger_config + self.trigger_type = trigger_type + + @property + def additional_config(self): + """Gets the additional_config of this NotificationRule. # noqa: E501 + + + :return: The additional_config of this NotificationRule. # noqa: E501 + :rtype: NotificationRuleConfig + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this NotificationRule. + + + :param additional_config: The additional_config of this NotificationRule. # noqa: E501 + :type: NotificationRuleConfig + """ + + self._additional_config = additional_config + + @property + def created_time(self): + """Gets the created_time of this NotificationRule. # noqa: E501 + + + :return: The created_time of this NotificationRule. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationRule. + + + :param created_time: The created_time of this NotificationRule. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this NotificationRule. # noqa: E501 + + + :return: The id of this NotificationRule. # noqa: E501 + :rtype: NotificationRuleId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRule. + + + :param id: The id of this NotificationRule. # noqa: E501 + :type: NotificationRuleId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this NotificationRule. # noqa: E501 + + + :return: The name of this NotificationRule. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this NotificationRule. + + + :param name: The name of this NotificationRule. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def recipients_config(self): + """Gets the recipients_config of this NotificationRule. # noqa: E501 + + + :return: The recipients_config of this NotificationRule. # noqa: E501 + :rtype: NotificationRuleRecipientsConfig + """ + return self._recipients_config + + @recipients_config.setter + def recipients_config(self, recipients_config): + """Sets the recipients_config of this NotificationRule. + + + :param recipients_config: The recipients_config of this NotificationRule. # noqa: E501 + :type: NotificationRuleRecipientsConfig + """ + if recipients_config is None: + raise ValueError("Invalid value for `recipients_config`, must not be `None`") # noqa: E501 + + self._recipients_config = recipients_config + + @property + def template_id(self): + """Gets the template_id of this NotificationRule. # noqa: E501 + + + :return: The template_id of this NotificationRule. # noqa: E501 + :rtype: NotificationTemplateId + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this NotificationRule. + + + :param template_id: The template_id of this NotificationRule. # noqa: E501 + :type: NotificationTemplateId + """ + if template_id is None: + raise ValueError("Invalid value for `template_id`, must not be `None`") # noqa: E501 + + self._template_id = template_id + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationRule. # noqa: E501 + + + :return: The tenant_id of this NotificationRule. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationRule. + + + :param tenant_id: The tenant_id of this NotificationRule. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def trigger_config(self): + """Gets the trigger_config of this NotificationRule. # noqa: E501 + + + :return: The trigger_config of this NotificationRule. # noqa: E501 + :rtype: NotificationRuleTriggerConfig + """ + return self._trigger_config + + @trigger_config.setter + def trigger_config(self, trigger_config): + """Sets the trigger_config of this NotificationRule. + + + :param trigger_config: The trigger_config of this NotificationRule. # noqa: E501 + :type: NotificationRuleTriggerConfig + """ + if trigger_config is None: + raise ValueError("Invalid value for `trigger_config`, must not be `None`") # noqa: E501 + + self._trigger_config = trigger_config + + @property + def trigger_type(self): + """Gets the trigger_type of this NotificationRule. # noqa: E501 + + + :return: The trigger_type of this NotificationRule. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this NotificationRule. + + + :param trigger_type: The trigger_type of this NotificationRule. # noqa: E501 + :type: str + """ + if trigger_type is None: + raise ValueError("Invalid value for `trigger_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_rule_config.py b/tb_rest_client/models/models_pe/notification_rule_config.py new file mode 100644 index 00000000..409752f1 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_rule_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRuleConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str' + } + + attribute_map = { + 'description': 'description' + } + + def __init__(self, description=None): # noqa: E501 + """NotificationRuleConfig - a model defined in Swagger""" # noqa: E501 + self._description = None + self.discriminator = None + if description is not None: + self.description = description + + @property + def description(self): + """Gets the description of this NotificationRuleConfig. # noqa: E501 + + + :return: The description of this NotificationRuleConfig. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this NotificationRuleConfig. + + + :param description: The description of this NotificationRuleConfig. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRuleConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRuleConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_rule_id.py b/tb_rest_client/models/models_pe/notification_rule_id.py new file mode 100644 index 00000000..aaa5851e --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_rule_id.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRuleId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """NotificationRuleId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this NotificationRuleId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this NotificationRuleId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRuleId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this NotificationRuleId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this NotificationRuleId. # noqa: E501 + + + :return: The entity_type of this NotificationRuleId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this NotificationRuleId. + + + :param entity_type: The entity_type of this NotificationRuleId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRuleId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRuleId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_rule_info.py b/tb_rest_client/models/models_pe/notification_rule_info.py new file mode 100644 index 00000000..109ce264 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_rule_info.py @@ -0,0 +1,388 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRuleInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'NotificationRuleConfig', + 'created_time': 'int', + 'delivery_methods': 'list[str]', + 'id': 'NotificationRuleId', + 'name': 'str', + 'recipients_config': 'NotificationRuleRecipientsConfig', + 'template_id': 'NotificationTemplateId', + 'template_name': 'str', + 'tenant_id': 'TenantId', + 'trigger_config': 'NotificationRuleTriggerConfig', + 'trigger_type': 'str' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'created_time': 'createdTime', + 'delivery_methods': 'deliveryMethods', + 'id': 'id', + 'name': 'name', + 'recipients_config': 'recipientsConfig', + 'template_id': 'templateId', + 'template_name': 'templateName', + 'tenant_id': 'tenantId', + 'trigger_config': 'triggerConfig', + 'trigger_type': 'triggerType' + } + + def __init__(self, additional_config=None, created_time=None, delivery_methods=None, id=None, name=None, recipients_config=None, template_id=None, template_name=None, tenant_id=None, trigger_config=None, trigger_type=None): # noqa: E501 + """NotificationRuleInfo - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._created_time = None + self._delivery_methods = None + self._id = None + self._name = None + self._recipients_config = None + self._template_id = None + self._template_name = None + self._tenant_id = None + self._trigger_config = None + self._trigger_type = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if created_time is not None: + self.created_time = created_time + if delivery_methods is not None: + self.delivery_methods = delivery_methods + if id is not None: + self.id = id + self.name = name + self.recipients_config = recipients_config + self.template_id = template_id + if template_name is not None: + self.template_name = template_name + if tenant_id is not None: + self.tenant_id = tenant_id + self.trigger_config = trigger_config + self.trigger_type = trigger_type + + @property + def additional_config(self): + """Gets the additional_config of this NotificationRuleInfo. # noqa: E501 + + + :return: The additional_config of this NotificationRuleInfo. # noqa: E501 + :rtype: NotificationRuleConfig + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this NotificationRuleInfo. + + + :param additional_config: The additional_config of this NotificationRuleInfo. # noqa: E501 + :type: NotificationRuleConfig + """ + + self._additional_config = additional_config + + @property + def created_time(self): + """Gets the created_time of this NotificationRuleInfo. # noqa: E501 + + + :return: The created_time of this NotificationRuleInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationRuleInfo. + + + :param created_time: The created_time of this NotificationRuleInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def delivery_methods(self): + """Gets the delivery_methods of this NotificationRuleInfo. # noqa: E501 + + + :return: The delivery_methods of this NotificationRuleInfo. # noqa: E501 + :rtype: list[str] + """ + return self._delivery_methods + + @delivery_methods.setter + def delivery_methods(self, delivery_methods): + """Sets the delivery_methods of this NotificationRuleInfo. + + + :param delivery_methods: The delivery_methods of this NotificationRuleInfo. # noqa: E501 + :type: list[str] + """ + allowed_values = ["EMAIL", "SLACK", "SMS", "WEB"] # noqa: E501 + if not set(delivery_methods).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `delivery_methods` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(delivery_methods) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._delivery_methods = delivery_methods + + @property + def id(self): + """Gets the id of this NotificationRuleInfo. # noqa: E501 + + + :return: The id of this NotificationRuleInfo. # noqa: E501 + :rtype: NotificationRuleId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationRuleInfo. + + + :param id: The id of this NotificationRuleInfo. # noqa: E501 + :type: NotificationRuleId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this NotificationRuleInfo. # noqa: E501 + + + :return: The name of this NotificationRuleInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this NotificationRuleInfo. + + + :param name: The name of this NotificationRuleInfo. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def recipients_config(self): + """Gets the recipients_config of this NotificationRuleInfo. # noqa: E501 + + + :return: The recipients_config of this NotificationRuleInfo. # noqa: E501 + :rtype: NotificationRuleRecipientsConfig + """ + return self._recipients_config + + @recipients_config.setter + def recipients_config(self, recipients_config): + """Sets the recipients_config of this NotificationRuleInfo. + + + :param recipients_config: The recipients_config of this NotificationRuleInfo. # noqa: E501 + :type: NotificationRuleRecipientsConfig + """ + if recipients_config is None: + raise ValueError("Invalid value for `recipients_config`, must not be `None`") # noqa: E501 + + self._recipients_config = recipients_config + + @property + def template_id(self): + """Gets the template_id of this NotificationRuleInfo. # noqa: E501 + + + :return: The template_id of this NotificationRuleInfo. # noqa: E501 + :rtype: NotificationTemplateId + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this NotificationRuleInfo. + + + :param template_id: The template_id of this NotificationRuleInfo. # noqa: E501 + :type: NotificationTemplateId + """ + if template_id is None: + raise ValueError("Invalid value for `template_id`, must not be `None`") # noqa: E501 + + self._template_id = template_id + + @property + def template_name(self): + """Gets the template_name of this NotificationRuleInfo. # noqa: E501 + + + :return: The template_name of this NotificationRuleInfo. # noqa: E501 + :rtype: str + """ + return self._template_name + + @template_name.setter + def template_name(self, template_name): + """Sets the template_name of this NotificationRuleInfo. + + + :param template_name: The template_name of this NotificationRuleInfo. # noqa: E501 + :type: str + """ + + self._template_name = template_name + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationRuleInfo. # noqa: E501 + + + :return: The tenant_id of this NotificationRuleInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationRuleInfo. + + + :param tenant_id: The tenant_id of this NotificationRuleInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def trigger_config(self): + """Gets the trigger_config of this NotificationRuleInfo. # noqa: E501 + + + :return: The trigger_config of this NotificationRuleInfo. # noqa: E501 + :rtype: NotificationRuleTriggerConfig + """ + return self._trigger_config + + @trigger_config.setter + def trigger_config(self, trigger_config): + """Sets the trigger_config of this NotificationRuleInfo. + + + :param trigger_config: The trigger_config of this NotificationRuleInfo. # noqa: E501 + :type: NotificationRuleTriggerConfig + """ + if trigger_config is None: + raise ValueError("Invalid value for `trigger_config`, must not be `None`") # noqa: E501 + + self._trigger_config = trigger_config + + @property + def trigger_type(self): + """Gets the trigger_type of this NotificationRuleInfo. # noqa: E501 + + + :return: The trigger_type of this NotificationRuleInfo. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this NotificationRuleInfo. + + + :param trigger_type: The trigger_type of this NotificationRuleInfo. # noqa: E501 + :type: str + """ + if trigger_type is None: + raise ValueError("Invalid value for `trigger_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRuleInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRuleInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_rule_recipients_config.py b/tb_rest_client/models/models_pe/notification_rule_recipients_config.py new file mode 100644 index 00000000..c628d1cd --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_rule_recipients_config.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRuleRecipientsConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'trigger_type': 'str' + } + + attribute_map = { + 'trigger_type': 'triggerType' + } + + def __init__(self, trigger_type=None): # noqa: E501 + """NotificationRuleRecipientsConfig - a model defined in Swagger""" # noqa: E501 + self._trigger_type = None + self.discriminator = None + self.trigger_type = trigger_type + + @property + def trigger_type(self): + """Gets the trigger_type of this NotificationRuleRecipientsConfig. # noqa: E501 + + + :return: The trigger_type of this NotificationRuleRecipientsConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this NotificationRuleRecipientsConfig. + + + :param trigger_type: The trigger_type of this NotificationRuleRecipientsConfig. # noqa: E501 + :type: str + """ + if trigger_type is None: + raise ValueError("Invalid value for `trigger_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRuleRecipientsConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRuleRecipientsConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/notification_rule_trigger_config.py new file mode 100644 index 00000000..e4f6a423 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_rule_trigger_config.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationRuleTriggerConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'trigger_type': 'str' + } + + attribute_map = { + 'trigger_type': 'triggerType' + } + + def __init__(self, trigger_type=None): # noqa: E501 + """NotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._trigger_type = None + self.discriminator = None + if trigger_type is not None: + self.trigger_type = trigger_type + + @property + def trigger_type(self): + """Gets the trigger_type of this NotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this NotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this NotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this NotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_settings.py b/tb_rest_client/models/models_pe/notification_settings.py new file mode 100644 index 00000000..2dea7a35 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_settings.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationSettings(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'delivery_methods_configs': 'dict(str, NotificationDeliveryMethodConfig)' + } + + attribute_map = { + 'delivery_methods_configs': 'deliveryMethodsConfigs' + } + + def __init__(self, delivery_methods_configs=None): # noqa: E501 + """NotificationSettings - a model defined in Swagger""" # noqa: E501 + self._delivery_methods_configs = None + self.discriminator = None + self.delivery_methods_configs = delivery_methods_configs + + @property + def delivery_methods_configs(self): + """Gets the delivery_methods_configs of this NotificationSettings. # noqa: E501 + + + :return: The delivery_methods_configs of this NotificationSettings. # noqa: E501 + :rtype: dict(str, NotificationDeliveryMethodConfig) + """ + return self._delivery_methods_configs + + @delivery_methods_configs.setter + def delivery_methods_configs(self, delivery_methods_configs): + """Sets the delivery_methods_configs of this NotificationSettings. + + + :param delivery_methods_configs: The delivery_methods_configs of this NotificationSettings. # noqa: E501 + :type: dict(str, NotificationDeliveryMethodConfig) + """ + if delivery_methods_configs is None: + raise ValueError("Invalid value for `delivery_methods_configs`, must not be `None`") # noqa: E501 + + self._delivery_methods_configs = delivery_methods_configs + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationSettings, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationSettings): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_target.py b/tb_rest_client/models/models_pe/notification_target.py new file mode 100644 index 00000000..7a8a7ced --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_target.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTarget(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'configuration': 'NotificationTargetConfig', + 'created_time': 'int', + 'id': 'NotificationTargetId', + 'name': 'str', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'configuration': 'configuration', + 'created_time': 'createdTime', + 'id': 'id', + 'name': 'name', + 'tenant_id': 'tenantId' + } + + def __init__(self, configuration=None, created_time=None, id=None, name=None, tenant_id=None): # noqa: E501 + """NotificationTarget - a model defined in Swagger""" # noqa: E501 + self._configuration = None + self._created_time = None + self._id = None + self._name = None + self._tenant_id = None + self.discriminator = None + self.configuration = configuration + if created_time is not None: + self.created_time = created_time + if id is not None: + self.id = id + self.name = name + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def configuration(self): + """Gets the configuration of this NotificationTarget. # noqa: E501 + + + :return: The configuration of this NotificationTarget. # noqa: E501 + :rtype: NotificationTargetConfig + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this NotificationTarget. + + + :param configuration: The configuration of this NotificationTarget. # noqa: E501 + :type: NotificationTargetConfig + """ + if configuration is None: + raise ValueError("Invalid value for `configuration`, must not be `None`") # noqa: E501 + + self._configuration = configuration + + @property + def created_time(self): + """Gets the created_time of this NotificationTarget. # noqa: E501 + + + :return: The created_time of this NotificationTarget. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationTarget. + + + :param created_time: The created_time of this NotificationTarget. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this NotificationTarget. # noqa: E501 + + + :return: The id of this NotificationTarget. # noqa: E501 + :rtype: NotificationTargetId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationTarget. + + + :param id: The id of this NotificationTarget. # noqa: E501 + :type: NotificationTargetId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this NotificationTarget. # noqa: E501 + + + :return: The name of this NotificationTarget. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this NotificationTarget. + + + :param name: The name of this NotificationTarget. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationTarget. # noqa: E501 + + + :return: The tenant_id of this NotificationTarget. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationTarget. + + + :param tenant_id: The tenant_id of this NotificationTarget. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTarget, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTarget): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_target_config.py b/tb_rest_client/models/models_pe/notification_target_config.py new file mode 100644 index 00000000..fd6584e6 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_target_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTargetConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str' + } + + attribute_map = { + 'description': 'description' + } + + def __init__(self, description=None): # noqa: E501 + """NotificationTargetConfig - a model defined in Swagger""" # noqa: E501 + self._description = None + self.discriminator = None + if description is not None: + self.description = description + + @property + def description(self): + """Gets the description of this NotificationTargetConfig. # noqa: E501 + + + :return: The description of this NotificationTargetConfig. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this NotificationTargetConfig. + + + :param description: The description of this NotificationTargetConfig. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTargetConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTargetConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_target_id.py b/tb_rest_client/models/models_pe/notification_target_id.py new file mode 100644 index 00000000..50679bd2 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_target_id.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTargetId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """NotificationTargetId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this NotificationTargetId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this NotificationTargetId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationTargetId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this NotificationTargetId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this NotificationTargetId. # noqa: E501 + + + :return: The entity_type of this NotificationTargetId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this NotificationTargetId. + + + :param entity_type: The entity_type of this NotificationTargetId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTargetId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTargetId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_template.py b/tb_rest_client/models/models_pe/notification_template.py new file mode 100644 index 00000000..2f133e6b --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_template.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'configuration': 'NotificationTemplateConfig', + 'created_time': 'int', + 'id': 'NotificationTemplateId', + 'name': 'str', + 'notification_type': 'str', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'configuration': 'configuration', + 'created_time': 'createdTime', + 'id': 'id', + 'name': 'name', + 'notification_type': 'notificationType', + 'tenant_id': 'tenantId' + } + + def __init__(self, configuration=None, created_time=None, id=None, name=None, notification_type=None, tenant_id=None): # noqa: E501 + """NotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._configuration = None + self._created_time = None + self._id = None + self._name = None + self._notification_type = None + self._tenant_id = None + self.discriminator = None + self.configuration = configuration + if created_time is not None: + self.created_time = created_time + if id is not None: + self.id = id + if name is not None: + self.name = name + self.notification_type = notification_type + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def configuration(self): + """Gets the configuration of this NotificationTemplate. # noqa: E501 + + + :return: The configuration of this NotificationTemplate. # noqa: E501 + :rtype: NotificationTemplateConfig + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this NotificationTemplate. + + + :param configuration: The configuration of this NotificationTemplate. # noqa: E501 + :type: NotificationTemplateConfig + """ + if configuration is None: + raise ValueError("Invalid value for `configuration`, must not be `None`") # noqa: E501 + + self._configuration = configuration + + @property + def created_time(self): + """Gets the created_time of this NotificationTemplate. # noqa: E501 + + + :return: The created_time of this NotificationTemplate. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this NotificationTemplate. + + + :param created_time: The created_time of this NotificationTemplate. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this NotificationTemplate. # noqa: E501 + + + :return: The id of this NotificationTemplate. # noqa: E501 + :rtype: NotificationTemplateId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationTemplate. + + + :param id: The id of this NotificationTemplate. # noqa: E501 + :type: NotificationTemplateId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this NotificationTemplate. # noqa: E501 + + + :return: The name of this NotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this NotificationTemplate. + + + :param name: The name of this NotificationTemplate. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def notification_type(self): + """Gets the notification_type of this NotificationTemplate. # noqa: E501 + + + :return: The notification_type of this NotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._notification_type + + @notification_type.setter + def notification_type(self, notification_type): + """Sets the notification_type of this NotificationTemplate. + + + :param notification_type: The notification_type of this NotificationTemplate. # noqa: E501 + :type: str + """ + if notification_type is None: + raise ValueError("Invalid value for `notification_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "GENERAL", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", "RULE_NODE"] # noqa: E501 + if notification_type not in allowed_values: + raise ValueError( + "Invalid value for `notification_type` ({0}), must be one of {1}" # noqa: E501 + .format(notification_type, allowed_values) + ) + + self._notification_type = notification_type + + @property + def tenant_id(self): + """Gets the tenant_id of this NotificationTemplate. # noqa: E501 + + + :return: The tenant_id of this NotificationTemplate. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this NotificationTemplate. + + + :param tenant_id: The tenant_id of this NotificationTemplate. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_template_config.py b/tb_rest_client/models/models_pe/notification_template_config.py new file mode 100644 index 00000000..99790100 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_template_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTemplateConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'delivery_methods_templates': 'dict(str, DeliveryMethodNotificationTemplate)' + } + + attribute_map = { + 'delivery_methods_templates': 'deliveryMethodsTemplates' + } + + def __init__(self, delivery_methods_templates=None): # noqa: E501 + """NotificationTemplateConfig - a model defined in Swagger""" # noqa: E501 + self._delivery_methods_templates = None + self.discriminator = None + if delivery_methods_templates is not None: + self.delivery_methods_templates = delivery_methods_templates + + @property + def delivery_methods_templates(self): + """Gets the delivery_methods_templates of this NotificationTemplateConfig. # noqa: E501 + + + :return: The delivery_methods_templates of this NotificationTemplateConfig. # noqa: E501 + :rtype: dict(str, DeliveryMethodNotificationTemplate) + """ + return self._delivery_methods_templates + + @delivery_methods_templates.setter + def delivery_methods_templates(self, delivery_methods_templates): + """Sets the delivery_methods_templates of this NotificationTemplateConfig. + + + :param delivery_methods_templates: The delivery_methods_templates of this NotificationTemplateConfig. # noqa: E501 + :type: dict(str, DeliveryMethodNotificationTemplate) + """ + + self._delivery_methods_templates = delivery_methods_templates + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTemplateConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTemplateConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/notification_template_id.py b/tb_rest_client/models/models_pe/notification_template_id.py new file mode 100644 index 00000000..b477f8b2 --- /dev/null +++ b/tb_rest_client/models/models_pe/notification_template_id.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class NotificationTemplateId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'entity_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'entity_type': 'entityType' + } + + def __init__(self, id=None, entity_type=None): # noqa: E501 + """NotificationTemplateId - a model defined in Swagger""" # noqa: E501 + self._id = None + self._entity_type = None + self.discriminator = None + self.id = id + self.entity_type = entity_type + + @property + def id(self): + """Gets the id of this NotificationTemplateId. # noqa: E501 + + ID of the entity, time-based UUID v1 # noqa: E501 + + :return: The id of this NotificationTemplateId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationTemplateId. + + ID of the entity, time-based UUID v1 # noqa: E501 + + :param id: The id of this NotificationTemplateId. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def entity_type(self): + """Gets the entity_type of this NotificationTemplateId. # noqa: E501 + + + :return: The entity_type of this NotificationTemplateId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this NotificationTemplateId. + + + :param entity_type: The entity_type of this NotificationTemplateId. # noqa: E501 + :type: str + """ + if entity_type is None: + raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationTemplateId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationTemplateId): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/numeric_filter_predicate.py b/tb_rest_client/models/models_pe/numeric_filter_predicate.py index 9b6d4ea5..fff6bd94 100644 --- a/tb_rest_client/models/models_pe/numeric_filter_predicate.py +++ b/tb_rest_client/models/models_pe/numeric_filter_predicate.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 +from tb_rest_client.models.models_pe.key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 class NumericFilterPredicate(KeyFilterPredicate): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/o_auth2_basic_mapper_config.py b/tb_rest_client/models/models_pe/o_auth2_basic_mapper_config.py index 938d0f8b..0286862e 100644 --- a/tb_rest_client/models/models_pe/o_auth2_basic_mapper_config.py +++ b/tb_rest_client/models/models_pe/o_auth2_basic_mapper_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2BasicMapperConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/o_auth2_client_info.py b/tb_rest_client/models/models_pe/o_auth2_client_info.py index c7d61d36..46d14486 100644 --- a/tb_rest_client/models/models_pe/o_auth2_client_info.py +++ b/tb_rest_client/models/models_pe/o_auth2_client_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2ClientInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/o_auth2_client_registration_template.py b/tb_rest_client/models/models_pe/o_auth2_client_registration_template.py index 2c776164..6f1aaf86 100644 --- a/tb_rest_client/models/models_pe/o_auth2_client_registration_template.py +++ b/tb_rest_client/models/models_pe/o_auth2_client_registration_template.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2ClientRegistrationTemplate(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/o_auth2_client_registration_template_id.py b/tb_rest_client/models/models_pe/o_auth2_client_registration_template_id.py index 08f069f8..89bc26e5 100644 --- a/tb_rest_client/models/models_pe/o_auth2_client_registration_template_id.py +++ b/tb_rest_client/models/models_pe/o_auth2_client_registration_template_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2ClientRegistrationTemplateId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/o_auth2_custom_mapper_config.py b/tb_rest_client/models/models_pe/o_auth2_custom_mapper_config.py index 8482ea1a..737d1dc9 100644 --- a/tb_rest_client/models/models_pe/o_auth2_custom_mapper_config.py +++ b/tb_rest_client/models/models_pe/o_auth2_custom_mapper_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2CustomMapperConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/o_auth2_domain_info.py b/tb_rest_client/models/models_pe/o_auth2_domain_info.py index 794f3b20..53c70667 100644 --- a/tb_rest_client/models/models_pe/o_auth2_domain_info.py +++ b/tb_rest_client/models/models_pe/o_auth2_domain_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2DomainInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/o_auth2_info.py b/tb_rest_client/models/models_pe/o_auth2_info.py index e23e3309..8a0c2820 100644 --- a/tb_rest_client/models/models_pe/o_auth2_info.py +++ b/tb_rest_client/models/models_pe/o_auth2_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2Info(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/o_auth2_mapper_config.py b/tb_rest_client/models/models_pe/o_auth2_mapper_config.py index 5826bf4e..1b64ddb3 100644 --- a/tb_rest_client/models/models_pe/o_auth2_mapper_config.py +++ b/tb_rest_client/models/models_pe/o_auth2_mapper_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2MapperConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/o_auth2_mobile_info.py b/tb_rest_client/models/models_pe/o_auth2_mobile_info.py index 1ec831d1..355f6a6a 100644 --- a/tb_rest_client/models/models_pe/o_auth2_mobile_info.py +++ b/tb_rest_client/models/models_pe/o_auth2_mobile_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2MobileInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/o_auth2_params_info.py b/tb_rest_client/models/models_pe/o_auth2_params_info.py index c8f7f224..d760c113 100644 --- a/tb_rest_client/models/models_pe/o_auth2_params_info.py +++ b/tb_rest_client/models/models_pe/o_auth2_params_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2ParamsInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/o_auth2_registration_info.py b/tb_rest_client/models/models_pe/o_auth2_registration_info.py index 2b26230b..f40a3df9 100644 --- a/tb_rest_client/models/models_pe/o_auth2_registration_info.py +++ b/tb_rest_client/models/models_pe/o_auth2_registration_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OAuth2RegistrationInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/object_attributes.py b/tb_rest_client/models/models_pe/object_attributes.py index c3983662..521b5ab4 100644 --- a/tb_rest_client/models/models_pe/object_attributes.py +++ b/tb_rest_client/models/models_pe/object_attributes.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ObjectAttributes(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/object_node.py b/tb_rest_client/models/models_pe/object_node.py index 8618c043..0a377ac8 100644 --- a/tb_rest_client/models/models_pe/object_node.py +++ b/tb_rest_client/models/models_pe/object_node.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ObjectNode(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/originator_entity_owner_users_filter.py b/tb_rest_client/models/models_pe/originator_entity_owner_users_filter.py new file mode 100644 index 00000000..5b95c563 --- /dev/null +++ b/tb_rest_client/models/models_pe/originator_entity_owner_users_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class OriginatorEntityOwnerUsersFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """OriginatorEntityOwnerUsersFilter - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OriginatorEntityOwnerUsersFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OriginatorEntityOwnerUsersFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/ota_package.py b/tb_rest_client/models/models_pe/ota_package.py index fa5196a0..fa41f9cc 100644 --- a/tb_rest_client/models/models_pe/ota_package.py +++ b/tb_rest_client/models/models_pe/ota_package.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OtaPackage(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/ota_package_id.py b/tb_rest_client/models/models_pe/ota_package_id.py index 9a3fb266..8851d9f3 100644 --- a/tb_rest_client/models/models_pe/ota_package_id.py +++ b/tb_rest_client/models/models_pe/ota_package_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OtaPackageId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/ota_package_info.py b/tb_rest_client/models/models_pe/ota_package_info.py index 9e90735d..0c65e60c 100644 --- a/tb_rest_client/models/models_pe/ota_package_info.py +++ b/tb_rest_client/models/models_pe/ota_package_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OtaPackageInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/ota_package_ota_package_id_body.py b/tb_rest_client/models/models_pe/ota_package_ota_package_id_body.py index 1c0819c4..804da8a1 100644 --- a/tb_rest_client/models/models_pe/ota_package_ota_package_id_body.py +++ b/tb_rest_client/models/models_pe/ota_package_ota_package_id_body.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OtaPackageOtaPackageIdBody(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/other_configuration.py b/tb_rest_client/models/models_pe/other_configuration.py index 0003a70c..be97a3d9 100644 --- a/tb_rest_client/models/models_pe/other_configuration.py +++ b/tb_rest_client/models/models_pe/other_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class OtherConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_alarm_comment_info.py b/tb_rest_client/models/models_pe/page_data_alarm_comment_info.py new file mode 100644 index 00000000..95525584 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_alarm_comment_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataAlarmCommentInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[AlarmCommentInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataAlarmCommentInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataAlarmCommentInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataAlarmCommentInfo. # noqa: E501 + :rtype: list[AlarmCommentInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAlarmCommentInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataAlarmCommentInfo. # noqa: E501 + :type: list[AlarmCommentInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAlarmCommentInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataAlarmCommentInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAlarmCommentInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataAlarmCommentInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAlarmCommentInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataAlarmCommentInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAlarmCommentInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataAlarmCommentInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataAlarmCommentInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataAlarmCommentInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAlarmCommentInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataAlarmCommentInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataAlarmCommentInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataAlarmCommentInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_alarm_data.py b/tb_rest_client/models/models_pe/page_data_alarm_data.py index 38a165fa..e4c63ecd 100644 --- a/tb_rest_client/models/models_pe/page_data_alarm_data.py +++ b/tb_rest_client/models/models_pe/page_data_alarm_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataAlarmData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_alarm_info.py b/tb_rest_client/models/models_pe/page_data_alarm_info.py new file mode 100644 index 00000000..b2e96d89 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_alarm_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataAlarmInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[AlarmInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataAlarmInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataAlarmInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataAlarmInfo. # noqa: E501 + :rtype: list[AlarmInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAlarmInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataAlarmInfo. # noqa: E501 + :type: list[AlarmInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAlarmInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataAlarmInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAlarmInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataAlarmInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAlarmInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataAlarmInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAlarmInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataAlarmInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataAlarmInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataAlarmInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAlarmInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataAlarmInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataAlarmInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataAlarmInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_asset.py b/tb_rest_client/models/models_pe/page_data_asset.py new file mode 100644 index 00000000..266fd386 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_asset.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataAsset(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[Asset]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataAsset - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataAsset. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataAsset. # noqa: E501 + :rtype: list[Asset] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAsset. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataAsset. # noqa: E501 + :type: list[Asset] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAsset. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataAsset. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAsset. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataAsset. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAsset. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataAsset. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAsset. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataAsset. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataAsset. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataAsset. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAsset. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataAsset. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataAsset, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataAsset): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_asset_info.py b/tb_rest_client/models/models_pe/page_data_asset_info.py new file mode 100644 index 00000000..7b71a3f3 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_asset_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataAssetInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[AssetInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataAssetInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataAssetInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataAssetInfo. # noqa: E501 + :rtype: list[AssetInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAssetInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataAssetInfo. # noqa: E501 + :type: list[AssetInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAssetInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataAssetInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAssetInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataAssetInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAssetInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataAssetInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAssetInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataAssetInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataAssetInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataAssetInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAssetInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataAssetInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataAssetInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataAssetInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_asset_profile.py b/tb_rest_client/models/models_pe/page_data_asset_profile.py new file mode 100644 index 00000000..ca3bd402 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_asset_profile.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataAssetProfile(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[AssetProfile]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataAssetProfile - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataAssetProfile. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataAssetProfile. # noqa: E501 + :rtype: list[AssetProfile] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAssetProfile. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataAssetProfile. # noqa: E501 + :type: list[AssetProfile] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAssetProfile. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataAssetProfile. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAssetProfile. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataAssetProfile. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAssetProfile. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataAssetProfile. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAssetProfile. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataAssetProfile. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataAssetProfile. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataAssetProfile. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAssetProfile. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataAssetProfile. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataAssetProfile, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataAssetProfile): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_asset_profile_info.py b/tb_rest_client/models/models_pe/page_data_asset_profile_info.py new file mode 100644 index 00000000..3d0d0efa --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_asset_profile_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataAssetProfileInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[AssetProfileInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataAssetProfileInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataAssetProfileInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataAssetProfileInfo. # noqa: E501 + :rtype: list[AssetProfileInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAssetProfileInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataAssetProfileInfo. # noqa: E501 + :type: list[AssetProfileInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAssetProfileInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataAssetProfileInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAssetProfileInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataAssetProfileInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAssetProfileInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataAssetProfileInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAssetProfileInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataAssetProfileInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataAssetProfileInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataAssetProfileInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAssetProfileInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataAssetProfileInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataAssetProfileInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataAssetProfileInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_audit_log.py b/tb_rest_client/models/models_pe/page_data_audit_log.py index 735ea7ca..62c1b59a 100644 --- a/tb_rest_client/models/models_pe/page_data_audit_log.py +++ b/tb_rest_client/models/models_pe/page_data_audit_log.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataAuditLog(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_blob_entity_with_customer_info.py b/tb_rest_client/models/models_pe/page_data_blob_entity_with_customer_info.py index b7e7b41a..f08989cc 100644 --- a/tb_rest_client/models/models_pe/page_data_blob_entity_with_customer_info.py +++ b/tb_rest_client/models/models_pe/page_data_blob_entity_with_customer_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataBlobEntityWithCustomerInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_contact_basedobject.py b/tb_rest_client/models/models_pe/page_data_contact_basedobject.py index 7fa36270..1ff75e66 100644 --- a/tb_rest_client/models/models_pe/page_data_contact_basedobject.py +++ b/tb_rest_client/models/models_pe/page_data_contact_basedobject.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataContactBasedobject(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_converter.py b/tb_rest_client/models/models_pe/page_data_converter.py index 07cd444c..b09e97e9 100644 --- a/tb_rest_client/models/models_pe/page_data_converter.py +++ b/tb_rest_client/models/models_pe/page_data_converter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataConverter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_customer.py b/tb_rest_client/models/models_pe/page_data_customer.py new file mode 100644 index 00000000..0a7cf564 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_customer.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataCustomer(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[Customer]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataCustomer - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataCustomer. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataCustomer. # noqa: E501 + :rtype: list[Customer] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataCustomer. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataCustomer. # noqa: E501 + :type: list[Customer] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataCustomer. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataCustomer. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataCustomer. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataCustomer. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataCustomer. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataCustomer. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataCustomer. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataCustomer. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataCustomer. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataCustomer. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataCustomer. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataCustomer. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataCustomer, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataCustomer): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_customer_info.py b/tb_rest_client/models/models_pe/page_data_customer_info.py new file mode 100644 index 00000000..0f14ef02 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_customer_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataCustomerInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[CustomerInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataCustomerInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataCustomerInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataCustomerInfo. # noqa: E501 + :rtype: list[CustomerInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataCustomerInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataCustomerInfo. # noqa: E501 + :type: list[CustomerInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataCustomerInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataCustomerInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataCustomerInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataCustomerInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataCustomerInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataCustomerInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataCustomerInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataCustomerInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataCustomerInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataCustomerInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataCustomerInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataCustomerInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataCustomerInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataCustomerInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_dashboard_info.py b/tb_rest_client/models/models_pe/page_data_dashboard_info.py new file mode 100644 index 00000000..8532f283 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_dashboard_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataDashboardInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[DashboardInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataDashboardInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataDashboardInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataDashboardInfo. # noqa: E501 + :rtype: list[DashboardInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataDashboardInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataDashboardInfo. # noqa: E501 + :type: list[DashboardInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataDashboardInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataDashboardInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataDashboardInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataDashboardInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataDashboardInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataDashboardInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataDashboardInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataDashboardInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataDashboardInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataDashboardInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataDashboardInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataDashboardInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataDashboardInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataDashboardInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_device.py b/tb_rest_client/models/models_pe/page_data_device.py new file mode 100644 index 00000000..fefe00c1 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_device.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataDevice(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[Device]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataDevice - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataDevice. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataDevice. # noqa: E501 + :rtype: list[Device] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataDevice. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataDevice. # noqa: E501 + :type: list[Device] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataDevice. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataDevice. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataDevice. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataDevice. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataDevice. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataDevice. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataDevice. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataDevice. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataDevice. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataDevice. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataDevice. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataDevice. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataDevice, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataDevice): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_device_info.py b/tb_rest_client/models/models_pe/page_data_device_info.py new file mode 100644 index 00000000..80b382b4 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_device_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataDeviceInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[DeviceInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataDeviceInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataDeviceInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataDeviceInfo. # noqa: E501 + :rtype: list[DeviceInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataDeviceInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataDeviceInfo. # noqa: E501 + :type: list[DeviceInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataDeviceInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataDeviceInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataDeviceInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataDeviceInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataDeviceInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataDeviceInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataDeviceInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataDeviceInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataDeviceInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataDeviceInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataDeviceInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataDeviceInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataDeviceInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataDeviceInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_device_profile.py b/tb_rest_client/models/models_pe/page_data_device_profile.py new file mode 100644 index 00000000..66930ad5 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_device_profile.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataDeviceProfile(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[DeviceProfile]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataDeviceProfile - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataDeviceProfile. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataDeviceProfile. # noqa: E501 + :rtype: list[DeviceProfile] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataDeviceProfile. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataDeviceProfile. # noqa: E501 + :type: list[DeviceProfile] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataDeviceProfile. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataDeviceProfile. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataDeviceProfile. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataDeviceProfile. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataDeviceProfile. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataDeviceProfile. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataDeviceProfile. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataDeviceProfile. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataDeviceProfile. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataDeviceProfile. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataDeviceProfile. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataDeviceProfile. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataDeviceProfile, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataDeviceProfile): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_device_profile_info.py b/tb_rest_client/models/models_pe/page_data_device_profile_info.py new file mode 100644 index 00000000..9c40a5be --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_device_profile_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataDeviceProfileInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[DeviceProfileInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataDeviceProfileInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataDeviceProfileInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataDeviceProfileInfo. # noqa: E501 + :rtype: list[DeviceProfileInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataDeviceProfileInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataDeviceProfileInfo. # noqa: E501 + :type: list[DeviceProfileInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataDeviceProfileInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataDeviceProfileInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataDeviceProfileInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataDeviceProfileInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataDeviceProfileInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataDeviceProfileInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataDeviceProfileInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataDeviceProfileInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataDeviceProfileInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataDeviceProfileInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataDeviceProfileInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataDeviceProfileInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataDeviceProfileInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataDeviceProfileInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_edge.py b/tb_rest_client/models/models_pe/page_data_edge.py index 6ef3aecb..a02653a4 100644 --- a/tb_rest_client/models/models_pe/page_data_edge.py +++ b/tb_rest_client/models/models_pe/page_data_edge.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEdge(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_edge_event.py b/tb_rest_client/models/models_pe/page_data_edge_event.py index 55d5eb88..0f783d20 100644 --- a/tb_rest_client/models/models_pe/page_data_edge_event.py +++ b/tb_rest_client/models/models_pe/page_data_edge_event.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEdgeEvent(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_edge_info.py b/tb_rest_client/models/models_pe/page_data_edge_info.py new file mode 100644 index 00000000..f2fc6148 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_edge_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataEdgeInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[EdgeInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataEdgeInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataEdgeInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataEdgeInfo. # noqa: E501 + :rtype: list[EdgeInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEdgeInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataEdgeInfo. # noqa: E501 + :type: list[EdgeInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEdgeInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataEdgeInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEdgeInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataEdgeInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEdgeInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataEdgeInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEdgeInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataEdgeInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataEdgeInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataEdgeInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEdgeInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataEdgeInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataEdgeInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataEdgeInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_entity_data.py b/tb_rest_client/models/models_pe/page_data_entity_data.py index c7795d77..bf724b92 100644 --- a/tb_rest_client/models/models_pe/page_data_entity_data.py +++ b/tb_rest_client/models/models_pe/page_data_entity_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEntityData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_entity_group.py b/tb_rest_client/models/models_pe/page_data_entity_group.py index c962b6d8..321ea142 100644 --- a/tb_rest_client/models/models_pe/page_data_entity_group.py +++ b/tb_rest_client/models/models_pe/page_data_entity_group.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEntityGroup(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_entity_group_info.py b/tb_rest_client/models/models_pe/page_data_entity_group_info.py index dacffb82..851f0d9a 100644 --- a/tb_rest_client/models/models_pe/page_data_entity_group_info.py +++ b/tb_rest_client/models/models_pe/page_data_entity_group_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEntityGroupInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_entity_info.py b/tb_rest_client/models/models_pe/page_data_entity_info.py index d0f70731..26fb6fc3 100644 --- a/tb_rest_client/models/models_pe/page_data_entity_info.py +++ b/tb_rest_client/models/models_pe/page_data_entity_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEntityInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_entity_version.py b/tb_rest_client/models/models_pe/page_data_entity_version.py index c965d522..12d9faf6 100644 --- a/tb_rest_client/models/models_pe/page_data_entity_version.py +++ b/tb_rest_client/models/models_pe/page_data_entity_version.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataEntityVersion(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_entity_view.py b/tb_rest_client/models/models_pe/page_data_entity_view.py new file mode 100644 index 00000000..ce438149 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_entity_view.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataEntityView(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[EntityView]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataEntityView - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataEntityView. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataEntityView. # noqa: E501 + :rtype: list[EntityView] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEntityView. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataEntityView. # noqa: E501 + :type: list[EntityView] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEntityView. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataEntityView. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEntityView. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataEntityView. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEntityView. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataEntityView. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEntityView. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataEntityView. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataEntityView. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataEntityView. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEntityView. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataEntityView. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataEntityView, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataEntityView): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_entity_view_info.py b/tb_rest_client/models/models_pe/page_data_entity_view_info.py new file mode 100644 index 00000000..3e5999d8 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_entity_view_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataEntityViewInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[EntityViewInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataEntityViewInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataEntityViewInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataEntityViewInfo. # noqa: E501 + :rtype: list[EntityViewInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEntityViewInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataEntityViewInfo. # noqa: E501 + :type: list[EntityViewInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEntityViewInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataEntityViewInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEntityViewInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataEntityViewInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEntityViewInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataEntityViewInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEntityViewInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataEntityViewInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataEntityViewInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataEntityViewInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEntityViewInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataEntityViewInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataEntityViewInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataEntityViewInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_event.py b/tb_rest_client/models/models_pe/page_data_event.py index 19ce5875..53e9cc19 100644 --- a/tb_rest_client/models/models_pe/page_data_event.py +++ b/tb_rest_client/models/models_pe/page_data_event.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.4.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_pe/page_data_event_info.py b/tb_rest_client/models/models_pe/page_data_event_info.py new file mode 100644 index 00000000..28285701 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_event_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataEventInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[EventInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataEventInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataEventInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataEventInfo. # noqa: E501 + :rtype: list[EventInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEventInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataEventInfo. # noqa: E501 + :type: list[EventInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEventInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataEventInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEventInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataEventInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEventInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataEventInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEventInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataEventInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataEventInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataEventInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEventInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataEventInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataEventInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataEventInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_integration.py b/tb_rest_client/models/models_pe/page_data_integration.py index 85025f0f..09368e91 100644 --- a/tb_rest_client/models/models_pe/page_data_integration.py +++ b/tb_rest_client/models/models_pe/page_data_integration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataIntegration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_integration_info.py b/tb_rest_client/models/models_pe/page_data_integration_info.py new file mode 100644 index 00000000..8cda05df --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_integration_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataIntegrationInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[IntegrationInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataIntegrationInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataIntegrationInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataIntegrationInfo. # noqa: E501 + :rtype: list[IntegrationInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataIntegrationInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataIntegrationInfo. # noqa: E501 + :type: list[IntegrationInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataIntegrationInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataIntegrationInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataIntegrationInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataIntegrationInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataIntegrationInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataIntegrationInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataIntegrationInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataIntegrationInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataIntegrationInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataIntegrationInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataIntegrationInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataIntegrationInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataIntegrationInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataIntegrationInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_notification.py b/tb_rest_client/models/models_pe/page_data_notification.py new file mode 100644 index 00000000..3dd33e25 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_notification.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataNotification(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[Notification]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataNotification - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataNotification. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataNotification. # noqa: E501 + :rtype: list[Notification] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataNotification. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataNotification. # noqa: E501 + :type: list[Notification] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataNotification. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataNotification. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataNotification. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataNotification. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataNotification. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataNotification. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataNotification. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataNotification. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataNotification. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataNotification. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataNotification. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataNotification. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataNotification, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataNotification): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_notification_request_info.py b/tb_rest_client/models/models_pe/page_data_notification_request_info.py new file mode 100644 index 00000000..9259e49d --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_notification_request_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataNotificationRequestInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[NotificationRequestInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataNotificationRequestInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataNotificationRequestInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataNotificationRequestInfo. # noqa: E501 + :rtype: list[NotificationRequestInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataNotificationRequestInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataNotificationRequestInfo. # noqa: E501 + :type: list[NotificationRequestInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataNotificationRequestInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataNotificationRequestInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataNotificationRequestInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataNotificationRequestInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataNotificationRequestInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataNotificationRequestInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataNotificationRequestInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataNotificationRequestInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataNotificationRequestInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataNotificationRequestInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataNotificationRequestInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataNotificationRequestInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataNotificationRequestInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataNotificationRequestInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_notification_rule_info.py b/tb_rest_client/models/models_pe/page_data_notification_rule_info.py new file mode 100644 index 00000000..050789dc --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_notification_rule_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataNotificationRuleInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[NotificationRuleInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataNotificationRuleInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataNotificationRuleInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataNotificationRuleInfo. # noqa: E501 + :rtype: list[NotificationRuleInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataNotificationRuleInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataNotificationRuleInfo. # noqa: E501 + :type: list[NotificationRuleInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataNotificationRuleInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataNotificationRuleInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataNotificationRuleInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataNotificationRuleInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataNotificationRuleInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataNotificationRuleInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataNotificationRuleInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataNotificationRuleInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataNotificationRuleInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataNotificationRuleInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataNotificationRuleInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataNotificationRuleInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataNotificationRuleInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataNotificationRuleInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_notification_target.py b/tb_rest_client/models/models_pe/page_data_notification_target.py new file mode 100644 index 00000000..64518bcb --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_notification_target.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataNotificationTarget(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[NotificationTarget]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataNotificationTarget - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataNotificationTarget. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataNotificationTarget. # noqa: E501 + :rtype: list[NotificationTarget] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataNotificationTarget. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataNotificationTarget. # noqa: E501 + :type: list[NotificationTarget] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataNotificationTarget. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataNotificationTarget. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataNotificationTarget. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataNotificationTarget. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataNotificationTarget. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataNotificationTarget. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataNotificationTarget. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataNotificationTarget. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataNotificationTarget. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataNotificationTarget. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataNotificationTarget. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataNotificationTarget. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataNotificationTarget, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataNotificationTarget): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_notification_template.py b/tb_rest_client/models/models_pe/page_data_notification_template.py new file mode 100644 index 00000000..23d9cb95 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_notification_template.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataNotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[NotificationTemplate]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataNotificationTemplate. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataNotificationTemplate. # noqa: E501 + :rtype: list[NotificationTemplate] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataNotificationTemplate. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataNotificationTemplate. # noqa: E501 + :type: list[NotificationTemplate] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataNotificationTemplate. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataNotificationTemplate. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataNotificationTemplate. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataNotificationTemplate. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataNotificationTemplate. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataNotificationTemplate. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataNotificationTemplate. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataNotificationTemplate. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataNotificationTemplate. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataNotificationTemplate. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_ota_package_info.py b/tb_rest_client/models/models_pe/page_data_ota_package_info.py index eb78e01d..2e326672 100644 --- a/tb_rest_client/models/models_pe/page_data_ota_package_info.py +++ b/tb_rest_client/models/models_pe/page_data_ota_package_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataOtaPackageInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_queue.py b/tb_rest_client/models/models_pe/page_data_queue.py index 39866e71..ee542603 100644 --- a/tb_rest_client/models/models_pe/page_data_queue.py +++ b/tb_rest_client/models/models_pe/page_data_queue.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataQueue(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_role.py b/tb_rest_client/models/models_pe/page_data_role.py index f0e46617..bca4fabf 100644 --- a/tb_rest_client/models/models_pe/page_data_role.py +++ b/tb_rest_client/models/models_pe/page_data_role.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataRole(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_rule_chain.py b/tb_rest_client/models/models_pe/page_data_rule_chain.py index f3887b1a..0b9f1455 100644 --- a/tb_rest_client/models/models_pe/page_data_rule_chain.py +++ b/tb_rest_client/models/models_pe/page_data_rule_chain.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataRuleChain(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_scheduler_event_info.py b/tb_rest_client/models/models_pe/page_data_scheduler_event_info.py index a3b847fc..5fe9c83b 100644 --- a/tb_rest_client/models/models_pe/page_data_scheduler_event_info.py +++ b/tb_rest_client/models/models_pe/page_data_scheduler_event_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataSchedulerEventInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_short_entity_view.py b/tb_rest_client/models/models_pe/page_data_short_entity_view.py index 5e979baa..8fd1e1e7 100644 --- a/tb_rest_client/models/models_pe/page_data_short_entity_view.py +++ b/tb_rest_client/models/models_pe/page_data_short_entity_view.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataShortEntityView(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_tb_resource_info.py b/tb_rest_client/models/models_pe/page_data_tb_resource_info.py index 8c9880fe..49f901e4 100644 --- a/tb_rest_client/models/models_pe/page_data_tb_resource_info.py +++ b/tb_rest_client/models/models_pe/page_data_tb_resource_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataTbResourceInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_tenant.py b/tb_rest_client/models/models_pe/page_data_tenant.py index e6f98c7d..92959537 100644 --- a/tb_rest_client/models/models_pe/page_data_tenant.py +++ b/tb_rest_client/models/models_pe/page_data_tenant.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataTenant(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_tenant_info.py b/tb_rest_client/models/models_pe/page_data_tenant_info.py index b145084c..620fff0c 100644 --- a/tb_rest_client/models/models_pe/page_data_tenant_info.py +++ b/tb_rest_client/models/models_pe/page_data_tenant_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataTenantInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_tenant_profile.py b/tb_rest_client/models/models_pe/page_data_tenant_profile.py index 49f56b3c..736eee32 100644 --- a/tb_rest_client/models/models_pe/page_data_tenant_profile.py +++ b/tb_rest_client/models/models_pe/page_data_tenant_profile.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataTenantProfile(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/page_data_user.py b/tb_rest_client/models/models_pe/page_data_user.py new file mode 100644 index 00000000..7de9507f --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_user.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataUser(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[User]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataUser - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataUser. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataUser. # noqa: E501 + :rtype: list[User] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataUser. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataUser. # noqa: E501 + :type: list[User] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataUser. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataUser. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataUser. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataUser. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataUser. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataUser. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataUser. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataUser. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataUser. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataUser. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataUser. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataUser. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataUser, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataUser): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_user_email_info.py b/tb_rest_client/models/models_pe/page_data_user_email_info.py new file mode 100644 index 00000000..07eb09eb --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_user_email_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataUserEmailInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[UserEmailInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataUserEmailInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataUserEmailInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataUserEmailInfo. # noqa: E501 + :rtype: list[UserEmailInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataUserEmailInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataUserEmailInfo. # noqa: E501 + :type: list[UserEmailInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataUserEmailInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataUserEmailInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataUserEmailInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataUserEmailInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataUserEmailInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataUserEmailInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataUserEmailInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataUserEmailInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataUserEmailInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataUserEmailInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataUserEmailInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataUserEmailInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataUserEmailInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataUserEmailInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_user_info.py b/tb_rest_client/models/models_pe/page_data_user_info.py new file mode 100644 index 00000000..7bbc81af --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_user_info.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class PageDataUserInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[UserInfo]', + 'total_pages': 'int', + 'total_elements': 'int', + 'has_next': 'bool' + } + + attribute_map = { + 'data': 'data', + 'total_pages': 'totalPages', + 'total_elements': 'totalElements', + 'has_next': 'hasNext' + } + + def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 + """PageDataUserInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._total_pages = None + self._total_elements = None + self._has_next = None + self.discriminator = None + if data is not None: + self.data = data + if total_pages is not None: + self.total_pages = total_pages + if total_elements is not None: + self.total_elements = total_elements + if has_next is not None: + self.has_next = has_next + + @property + def data(self): + """Gets the data of this PageDataUserInfo. # noqa: E501 + + Array of the entities # noqa: E501 + + :return: The data of this PageDataUserInfo. # noqa: E501 + :rtype: list[UserInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataUserInfo. + + Array of the entities # noqa: E501 + + :param data: The data of this PageDataUserInfo. # noqa: E501 + :type: list[UserInfo] + """ + + self._data = data + + @property + def total_pages(self): + """Gets the total_pages of this PageDataUserInfo. # noqa: E501 + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :return: The total_pages of this PageDataUserInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataUserInfo. + + Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 + + :param total_pages: The total_pages of this PageDataUserInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def total_elements(self): + """Gets the total_elements of this PageDataUserInfo. # noqa: E501 + + Total number of elements in all available pages # noqa: E501 + + :return: The total_elements of this PageDataUserInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataUserInfo. + + Total number of elements in all available pages # noqa: E501 + + :param total_elements: The total_elements of this PageDataUserInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def has_next(self): + """Gets the has_next of this PageDataUserInfo. # noqa: E501 + + 'false' value indicates the end of the result set # noqa: E501 + + :return: The has_next of this PageDataUserInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataUserInfo. + + 'false' value indicates the end of the result set # noqa: E501 + + :param has_next: The has_next of this PageDataUserInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PageDataUserInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDataUserInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_widgets_bundle.py b/tb_rest_client/models/models_pe/page_data_widgets_bundle.py index 4dd62249..221e8d28 100644 --- a/tb_rest_client/models/models_pe/page_data_widgets_bundle.py +++ b/tb_rest_client/models/models_pe/page_data_widgets_bundle.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PageDataWidgetsBundle(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/palette.py b/tb_rest_client/models/models_pe/palette.py index 61be8e51..c43cc011 100644 --- a/tb_rest_client/models/models_pe/palette.py +++ b/tb_rest_client/models/models_pe/palette.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Palette(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/palette_settings.py b/tb_rest_client/models/models_pe/palette_settings.py index d3c94fcd..46b092e8 100644 --- a/tb_rest_client/models/models_pe/palette_settings.py +++ b/tb_rest_client/models/models_pe/palette_settings.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PaletteSettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/platform_two_fa_settings.py b/tb_rest_client/models/models_pe/platform_two_fa_settings.py index 3b853874..6ef0ef43 100644 --- a/tb_rest_client/models/models_pe/platform_two_fa_settings.py +++ b/tb_rest_client/models/models_pe/platform_two_fa_settings.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PlatformTwoFaSettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/platform_users_notification_target_config.py b/tb_rest_client/models/models_pe/platform_users_notification_target_config.py new file mode 100644 index 00000000..1a0b46da --- /dev/null +++ b/tb_rest_client/models/models_pe/platform_users_notification_target_config.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.notification_target_config import NotificationTargetConfig # noqa: F401,E501 + +class PlatformUsersNotificationTargetConfig(NotificationTargetConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'users_filter': 'UsersFilter' + } + if hasattr(NotificationTargetConfig, "swagger_types"): + swagger_types.update(NotificationTargetConfig.swagger_types) + + attribute_map = { + 'description': 'description', + 'users_filter': 'usersFilter' + } + if hasattr(NotificationTargetConfig, "attribute_map"): + attribute_map.update(NotificationTargetConfig.attribute_map) + + def __init__(self, description=None, users_filter=None, *args, **kwargs): # noqa: E501 + """PlatformUsersNotificationTargetConfig - a model defined in Swagger""" # noqa: E501 + self._description = None + self._users_filter = None + self.discriminator = None + if description is not None: + self.description = description + self.users_filter = users_filter + NotificationTargetConfig.__init__(self, *args, **kwargs) + + @property + def description(self): + """Gets the description of this PlatformUsersNotificationTargetConfig. # noqa: E501 + + + :return: The description of this PlatformUsersNotificationTargetConfig. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this PlatformUsersNotificationTargetConfig. + + + :param description: The description of this PlatformUsersNotificationTargetConfig. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def users_filter(self): + """Gets the users_filter of this PlatformUsersNotificationTargetConfig. # noqa: E501 + + + :return: The users_filter of this PlatformUsersNotificationTargetConfig. # noqa: E501 + :rtype: UsersFilter + """ + return self._users_filter + + @users_filter.setter + def users_filter(self, users_filter): + """Sets the users_filter of this PlatformUsersNotificationTargetConfig. + + + :param users_filter: The users_filter of this PlatformUsersNotificationTargetConfig. # noqa: E501 + :type: UsersFilter + """ + if users_filter is None: + raise ValueError("Invalid value for `users_filter`, must not be `None`") # noqa: E501 + + self._users_filter = users_filter + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PlatformUsersNotificationTargetConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PlatformUsersNotificationTargetConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/power_saving_configuration.py b/tb_rest_client/models/models_pe/power_saving_configuration.py index 2bc0ed44..2eb8e764 100644 --- a/tb_rest_client/models/models_pe/power_saving_configuration.py +++ b/tb_rest_client/models/models_pe/power_saving_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class PowerSavingConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/processing_strategy.py b/tb_rest_client/models/models_pe/processing_strategy.py index f06fc513..1c33d4ae 100644 --- a/tb_rest_client/models/models_pe/processing_strategy.py +++ b/tb_rest_client/models/models_pe/processing_strategy.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ProcessingStrategy(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/proto_transport_payload_configuration.py b/tb_rest_client/models/models_pe/proto_transport_payload_configuration.py index f3b085c1..ac7ed658 100644 --- a/tb_rest_client/models/models_pe/proto_transport_payload_configuration.py +++ b/tb_rest_client/models/models_pe/proto_transport_payload_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .transport_payload_type_configuration import TransportPayloadTypeConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.transport_payload_type_configuration import TransportPayloadTypeConfiguration # noqa: F401,E501 class ProtoTransportPayloadConfiguration(TransportPayloadTypeConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/psk_lw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_pe/psk_lw_m2_m_bootstrap_server_credential.py index 4cd34a42..44cb9e1d 100644 --- a/tb_rest_client/models/models_pe/psk_lw_m2_m_bootstrap_server_credential.py +++ b/tb_rest_client/models/models_pe/psk_lw_m2_m_bootstrap_server_credential.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.4.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_pe/psklw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_pe/psklw_m2_m_bootstrap_server_credential.py new file mode 100644 index 00000000..7795e762 --- /dev/null +++ b/tb_rest_client/models/models_pe/psklw_m2_m_bootstrap_server_credential.py @@ -0,0 +1,426 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.lw_m2_m_bootstrap_server_credential import LwM2MBootstrapServerCredential # noqa: F401,E501 + +class PSKLwM2MBootstrapServerCredential(LwM2MBootstrapServerCredential): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'short_server_id': 'int', + 'bootstrap_server_is': 'bool', + 'host': 'str', + 'port': 'int', + 'client_hold_off_time': 'int', + 'server_public_key': 'str', + 'server_certificate': 'str', + 'bootstrap_server_account_timeout': 'int', + 'lifetime': 'int', + 'default_min_period': 'int', + 'notif_if_disabled': 'bool', + 'binding': 'str' + } + if hasattr(LwM2MBootstrapServerCredential, "swagger_types"): + swagger_types.update(LwM2MBootstrapServerCredential.swagger_types) + + attribute_map = { + 'short_server_id': 'shortServerId', + 'bootstrap_server_is': 'bootstrapServerIs', + 'host': 'host', + 'port': 'port', + 'client_hold_off_time': 'clientHoldOffTime', + 'server_public_key': 'serverPublicKey', + 'server_certificate': 'serverCertificate', + 'bootstrap_server_account_timeout': 'bootstrapServerAccountTimeout', + 'lifetime': 'lifetime', + 'default_min_period': 'defaultMinPeriod', + 'notif_if_disabled': 'notifIfDisabled', + 'binding': 'binding' + } + if hasattr(LwM2MBootstrapServerCredential, "attribute_map"): + attribute_map.update(LwM2MBootstrapServerCredential.attribute_map) + + def __init__(self, short_server_id=None, bootstrap_server_is=None, host=None, port=None, client_hold_off_time=None, server_public_key=None, server_certificate=None, bootstrap_server_account_timeout=None, lifetime=None, default_min_period=None, notif_if_disabled=None, binding=None, *args, **kwargs): # noqa: E501 + """PSKLwM2MBootstrapServerCredential - a model defined in Swagger""" # noqa: E501 + self._short_server_id = None + self._bootstrap_server_is = None + self._host = None + self._port = None + self._client_hold_off_time = None + self._server_public_key = None + self._server_certificate = None + self._bootstrap_server_account_timeout = None + self._lifetime = None + self._default_min_period = None + self._notif_if_disabled = None + self._binding = None + self.discriminator = None + if short_server_id is not None: + self.short_server_id = short_server_id + if bootstrap_server_is is not None: + self.bootstrap_server_is = bootstrap_server_is + if host is not None: + self.host = host + if port is not None: + self.port = port + if client_hold_off_time is not None: + self.client_hold_off_time = client_hold_off_time + if server_public_key is not None: + self.server_public_key = server_public_key + if server_certificate is not None: + self.server_certificate = server_certificate + if bootstrap_server_account_timeout is not None: + self.bootstrap_server_account_timeout = bootstrap_server_account_timeout + if lifetime is not None: + self.lifetime = lifetime + if default_min_period is not None: + self.default_min_period = default_min_period + if notif_if_disabled is not None: + self.notif_if_disabled = notif_if_disabled + if binding is not None: + self.binding = binding + LwM2MBootstrapServerCredential.__init__(self, *args, **kwargs) + + @property + def short_server_id(self): + """Gets the short_server_id of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:0 and ID:65535 values MUST NOT be used for identifying the LwM2M Server. # noqa: E501 + + :return: The short_server_id of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._short_server_id + + @short_server_id.setter + def short_server_id(self, short_server_id): + """Sets the short_server_id of this PSKLwM2MBootstrapServerCredential. + + Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:0 and ID:65535 values MUST NOT be used for identifying the LwM2M Server. # noqa: E501 + + :param short_server_id: The short_server_id of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._short_server_id = short_server_id + + @property + def bootstrap_server_is(self): + """Gets the bootstrap_server_is of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified. # noqa: E501 + + :return: The bootstrap_server_is of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: bool + """ + return self._bootstrap_server_is + + @bootstrap_server_is.setter + def bootstrap_server_is(self, bootstrap_server_is): + """Sets the bootstrap_server_is of this PSKLwM2MBootstrapServerCredential. + + Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified. # noqa: E501 + + :param bootstrap_server_is: The bootstrap_server_is of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: bool + """ + + self._bootstrap_server_is = bootstrap_server_is + + @property + def host(self): + """Gets the host of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + Host for 'No Security' mode # noqa: E501 + + :return: The host of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: str + """ + return self._host + + @host.setter + def host(self, host): + """Sets the host of this PSKLwM2MBootstrapServerCredential. + + Host for 'No Security' mode # noqa: E501 + + :param host: The host of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: str + """ + + self._host = host + + @property + def port(self): + """Gets the port of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server # noqa: E501 + + :return: The port of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this PSKLwM2MBootstrapServerCredential. + + Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server # noqa: E501 + + :param port: The port of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._port = port + + @property + def client_hold_off_time(self): + """Gets the client_hold_off_time of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.) # noqa: E501 + + :return: The client_hold_off_time of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._client_hold_off_time + + @client_hold_off_time.setter + def client_hold_off_time(self, client_hold_off_time): + """Sets the client_hold_off_time of this PSKLwM2MBootstrapServerCredential. + + Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.) # noqa: E501 + + :param client_hold_off_time: The client_hold_off_time of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._client_hold_off_time = client_hold_off_time + + @property + def server_public_key(self): + """Gets the server_public_key of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded # noqa: E501 + + :return: The server_public_key of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: str + """ + return self._server_public_key + + @server_public_key.setter + def server_public_key(self, server_public_key): + """Sets the server_public_key of this PSKLwM2MBootstrapServerCredential. + + Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded # noqa: E501 + + :param server_public_key: The server_public_key of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: str + """ + + self._server_public_key = server_public_key + + @property + def server_certificate(self): + """Gets the server_certificate of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded # noqa: E501 + + :return: The server_certificate of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: str + """ + return self._server_certificate + + @server_certificate.setter + def server_certificate(self, server_certificate): + """Sets the server_certificate of this PSKLwM2MBootstrapServerCredential. + + Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded # noqa: E501 + + :param server_certificate: The server_certificate of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: str + """ + + self._server_certificate = server_certificate + + @property + def bootstrap_server_account_timeout(self): + """Gets the bootstrap_server_account_timeout of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.) # noqa: E501 + + :return: The bootstrap_server_account_timeout of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._bootstrap_server_account_timeout + + @bootstrap_server_account_timeout.setter + def bootstrap_server_account_timeout(self, bootstrap_server_account_timeout): + """Sets the bootstrap_server_account_timeout of this PSKLwM2MBootstrapServerCredential. + + Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.) # noqa: E501 + + :param bootstrap_server_account_timeout: The bootstrap_server_account_timeout of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._bootstrap_server_account_timeout = bootstrap_server_account_timeout + + @property + def lifetime(self): + """Gets the lifetime of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + Specify the lifetime of the registration in seconds. # noqa: E501 + + :return: The lifetime of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._lifetime + + @lifetime.setter + def lifetime(self, lifetime): + """Sets the lifetime of this PSKLwM2MBootstrapServerCredential. + + Specify the lifetime of the registration in seconds. # noqa: E501 + + :param lifetime: The lifetime of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._lifetime = lifetime + + @property + def default_min_period(self): + """Gets the default_min_period of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0. # noqa: E501 + + :return: The default_min_period of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._default_min_period + + @default_min_period.setter + def default_min_period(self, default_min_period): + """Sets the default_min_period of this PSKLwM2MBootstrapServerCredential. + + The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0. # noqa: E501 + + :param default_min_period: The default_min_period of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._default_min_period = default_min_period + + @property + def notif_if_disabled(self): + """Gets the notif_if_disabled of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true. # noqa: E501 + + :return: The notif_if_disabled of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: bool + """ + return self._notif_if_disabled + + @notif_if_disabled.setter + def notif_if_disabled(self, notif_if_disabled): + """Sets the notif_if_disabled of this PSKLwM2MBootstrapServerCredential. + + If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true. # noqa: E501 + + :param notif_if_disabled: The notif_if_disabled of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: bool + """ + + self._notif_if_disabled = notif_if_disabled + + @property + def binding(self): + """Gets the binding of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + + This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode. # noqa: E501 + + :return: The binding of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: str + """ + return self._binding + + @binding.setter + def binding(self, binding): + """Sets the binding of this PSKLwM2MBootstrapServerCredential. + + This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode. # noqa: E501 + + :param binding: The binding of this PSKLwM2MBootstrapServerCredential. # noqa: E501 + :type: str + """ + + self._binding = binding + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PSKLwM2MBootstrapServerCredential, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PSKLwM2MBootstrapServerCredential): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/queue.py b/tb_rest_client/models/models_pe/queue.py index d660883d..45c449e5 100644 --- a/tb_rest_client/models/models_pe/queue.py +++ b/tb_rest_client/models/models_pe/queue.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Queue(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/queue_id.py b/tb_rest_client/models/models_pe/queue_id.py index a9adcfab..7fc5375c 100644 --- a/tb_rest_client/models/models_pe/queue_id.py +++ b/tb_rest_client/models/models_pe/queue_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class QueueId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -90,7 +90,7 @@ def entity_type(self, entity_type): """ if entity_type is None: raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/raw_data_event_filter.py b/tb_rest_client/models/models_pe/raw_data_event_filter.py new file mode 100644 index 00000000..c3ef1199 --- /dev/null +++ b/tb_rest_client/models/models_pe/raw_data_event_filter.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.event_filter import EventFilter # noqa: F401,E501 + +class RawDataEventFilter(EventFilter): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'not_empty': 'bool', + 'event_type': 'str', + 'server': 'str', + 'uuid': 'str', + 'message_type': 'str', + 'message': 'str' + } + if hasattr(EventFilter, "swagger_types"): + swagger_types.update(EventFilter.swagger_types) + + attribute_map = { + 'not_empty': 'notEmpty', + 'event_type': 'eventType', + 'server': 'server', + 'uuid': 'uuid', + 'message_type': 'messageType', + 'message': 'message' + } + if hasattr(EventFilter, "attribute_map"): + attribute_map.update(EventFilter.attribute_map) + + def __init__(self, not_empty=None, event_type=None, server=None, uuid=None, message_type=None, message=None, *args, **kwargs): # noqa: E501 + """RawDataEventFilter - a model defined in Swagger""" # noqa: E501 + self._not_empty = None + self._event_type = None + self._server = None + self._uuid = None + self._message_type = None + self._message = None + self.discriminator = None + if not_empty is not None: + self.not_empty = not_empty + self.event_type = event_type + if server is not None: + self.server = server + if uuid is not None: + self.uuid = uuid + if message_type is not None: + self.message_type = message_type + if message is not None: + self.message = message + EventFilter.__init__(self, *args, **kwargs) + + @property + def not_empty(self): + """Gets the not_empty of this RawDataEventFilter. # noqa: E501 + + + :return: The not_empty of this RawDataEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this RawDataEventFilter. + + + :param not_empty: The not_empty of this RawDataEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + + @property + def event_type(self): + """Gets the event_type of this RawDataEventFilter. # noqa: E501 + + String value representing the event type # noqa: E501 + + :return: The event_type of this RawDataEventFilter. # noqa: E501 + :rtype: str + """ + return self._event_type + + @event_type.setter + def event_type(self, event_type): + """Sets the event_type of this RawDataEventFilter. + + String value representing the event type # noqa: E501 + + :param event_type: The event_type of this RawDataEventFilter. # noqa: E501 + :type: str + """ + if event_type is None: + raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 + allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "RAW_DATA", "STATS"] # noqa: E501 + if event_type not in allowed_values: + raise ValueError( + "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 + .format(event_type, allowed_values) + ) + + self._event_type = event_type + + @property + def server(self): + """Gets the server of this RawDataEventFilter. # noqa: E501 + + String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + + :return: The server of this RawDataEventFilter. # noqa: E501 + :rtype: str + """ + return self._server + + @server.setter + def server(self, server): + """Sets the server of this RawDataEventFilter. + + String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + + :param server: The server of this RawDataEventFilter. # noqa: E501 + :type: str + """ + + self._server = server + + @property + def uuid(self): + """Gets the uuid of this RawDataEventFilter. # noqa: E501 + + String value representing the uuid # noqa: E501 + + :return: The uuid of this RawDataEventFilter. # noqa: E501 + :rtype: str + """ + return self._uuid + + @uuid.setter + def uuid(self, uuid): + """Sets the uuid of this RawDataEventFilter. + + String value representing the uuid # noqa: E501 + + :param uuid: The uuid of this RawDataEventFilter. # noqa: E501 + :type: str + """ + + self._uuid = uuid + + @property + def message_type(self): + """Gets the message_type of this RawDataEventFilter. # noqa: E501 + + String value representing the message type # noqa: E501 + + :return: The message_type of this RawDataEventFilter. # noqa: E501 + :rtype: str + """ + return self._message_type + + @message_type.setter + def message_type(self, message_type): + """Sets the message_type of this RawDataEventFilter. + + String value representing the message type # noqa: E501 + + :param message_type: The message_type of this RawDataEventFilter. # noqa: E501 + :type: str + """ + + self._message_type = message_type + + @property + def message(self): + """Gets the message of this RawDataEventFilter. # noqa: E501 + + String value representing the message # noqa: E501 + + :return: The message of this RawDataEventFilter. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this RawDataEventFilter. + + String value representing the message # noqa: E501 + + :param message: The message of this RawDataEventFilter. # noqa: E501 + :type: str + """ + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RawDataEventFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RawDataEventFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/relation_entity_type_filter.py b/tb_rest_client/models/models_pe/relation_entity_type_filter.py index 1dd25a61..80bf14b3 100644 --- a/tb_rest_client/models/models_pe/relation_entity_type_filter.py +++ b/tb_rest_client/models/models_pe/relation_entity_type_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RelationEntityTypeFilter(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -90,7 +90,7 @@ def entity_types(self, entity_types): :param entity_types: The entity_types of this RelationEntityTypeFilter. # noqa: E501 :type: list[str] """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if not set(entity_types).issubset(set(allowed_values)): raise ValueError( "Invalid values for `entity_types` [{0}], must be a subset of [{1}]" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/relations_query_filter.py b/tb_rest_client/models/models_pe/relations_query_filter.py index 139a71ed..bf7326b4 100644 --- a/tb_rest_client/models/models_pe/relations_query_filter.py +++ b/tb_rest_client/models/models_pe/relations_query_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class RelationsQueryFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -212,7 +212,7 @@ def multi_root_entities_type(self, multi_root_entities_type): :param multi_root_entities_type: The multi_root_entities_type of this RelationsQueryFilter. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if multi_root_entities_type not in allowed_values: raise ValueError( "Invalid value for `multi_root_entities_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/relations_search_parameters.py b/tb_rest_client/models/models_pe/relations_search_parameters.py index e1f3a1cc..6d642c45 100644 --- a/tb_rest_client/models/models_pe/relations_search_parameters.py +++ b/tb_rest_client/models/models_pe/relations_search_parameters.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RelationsSearchParameters(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -110,7 +110,7 @@ def root_type(self, root_type): :param root_type: The root_type of this RelationsSearchParameters. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if root_type not in allowed_values: raise ValueError( "Invalid value for `root_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/repeating_alarm_condition_spec.py b/tb_rest_client/models/models_pe/repeating_alarm_condition_spec.py index 4c057c60..42ed9ea6 100644 --- a/tb_rest_client/models/models_pe/repeating_alarm_condition_spec.py +++ b/tb_rest_client/models/models_pe/repeating_alarm_condition_spec.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 +from tb_rest_client.models.models_pe.alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 class RepeatingAlarmConditionSpec(AlarmConditionSpec): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/report_config.py b/tb_rest_client/models/models_pe/report_config.py index 0a3ee345..a6a49987 100644 --- a/tb_rest_client/models/models_pe/report_config.py +++ b/tb_rest_client/models/models_pe/report_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ReportConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/repository_settings.py b/tb_rest_client/models/models_pe/repository_settings.py index 2831df2b..36f63fee 100644 --- a/tb_rest_client/models/models_pe/repository_settings.py +++ b/tb_rest_client/models/models_pe/repository_settings.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RepositorySettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -34,7 +34,9 @@ class RepositorySettings(object): 'private_key': 'str', 'private_key_file_name': 'str', 'private_key_password': 'str', + 'read_only': 'bool', 'repository_uri': 'str', + 'show_merge_commits': 'bool', 'username': 'str' } @@ -45,11 +47,13 @@ class RepositorySettings(object): 'private_key': 'privateKey', 'private_key_file_name': 'privateKeyFileName', 'private_key_password': 'privateKeyPassword', + 'read_only': 'readOnly', 'repository_uri': 'repositoryUri', + 'show_merge_commits': 'showMergeCommits', 'username': 'username' } - def __init__(self, auth_method=None, default_branch=None, password=None, private_key=None, private_key_file_name=None, private_key_password=None, repository_uri=None, username=None): # noqa: E501 + def __init__(self, auth_method=None, default_branch=None, password=None, private_key=None, private_key_file_name=None, private_key_password=None, read_only=None, repository_uri=None, show_merge_commits=None, username=None): # noqa: E501 """RepositorySettings - a model defined in Swagger""" # noqa: E501 self._auth_method = None self._default_branch = None @@ -57,7 +61,9 @@ def __init__(self, auth_method=None, default_branch=None, password=None, private self._private_key = None self._private_key_file_name = None self._private_key_password = None + self._read_only = None self._repository_uri = None + self._show_merge_commits = None self._username = None self.discriminator = None if auth_method is not None: @@ -72,8 +78,12 @@ def __init__(self, auth_method=None, default_branch=None, password=None, private self.private_key_file_name = private_key_file_name if private_key_password is not None: self.private_key_password = private_key_password + if read_only is not None: + self.read_only = read_only if repository_uri is not None: self.repository_uri = repository_uri + if show_merge_commits is not None: + self.show_merge_commits = show_merge_commits if username is not None: self.username = username @@ -209,6 +219,27 @@ def private_key_password(self, private_key_password): self._private_key_password = private_key_password + @property + def read_only(self): + """Gets the read_only of this RepositorySettings. # noqa: E501 + + + :return: The read_only of this RepositorySettings. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this RepositorySettings. + + + :param read_only: The read_only of this RepositorySettings. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + @property def repository_uri(self): """Gets the repository_uri of this RepositorySettings. # noqa: E501 @@ -230,6 +261,27 @@ def repository_uri(self, repository_uri): self._repository_uri = repository_uri + @property + def show_merge_commits(self): + """Gets the show_merge_commits of this RepositorySettings. # noqa: E501 + + + :return: The show_merge_commits of this RepositorySettings. # noqa: E501 + :rtype: bool + """ + return self._show_merge_commits + + @show_merge_commits.setter + def show_merge_commits(self, show_merge_commits): + """Sets the show_merge_commits of this RepositorySettings. + + + :param show_merge_commits: The show_merge_commits of this RepositorySettings. # noqa: E501 + :type: bool + """ + + self._show_merge_commits = show_merge_commits + @property def username(self): """Gets the username of this RepositorySettings. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/repository_settings_info.py b/tb_rest_client/models/models_pe/repository_settings_info.py new file mode 100644 index 00000000..186d5820 --- /dev/null +++ b/tb_rest_client/models/models_pe/repository_settings_info.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class RepositorySettingsInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'configured': 'bool', + 'read_only': 'bool' + } + + attribute_map = { + 'configured': 'configured', + 'read_only': 'readOnly' + } + + def __init__(self, configured=None, read_only=None): # noqa: E501 + """RepositorySettingsInfo - a model defined in Swagger""" # noqa: E501 + self._configured = None + self._read_only = None + self.discriminator = None + if configured is not None: + self.configured = configured + if read_only is not None: + self.read_only = read_only + + @property + def configured(self): + """Gets the configured of this RepositorySettingsInfo. # noqa: E501 + + + :return: The configured of this RepositorySettingsInfo. # noqa: E501 + :rtype: bool + """ + return self._configured + + @configured.setter + def configured(self, configured): + """Sets the configured of this RepositorySettingsInfo. + + + :param configured: The configured of this RepositorySettingsInfo. # noqa: E501 + :type: bool + """ + + self._configured = configured + + @property + def read_only(self): + """Gets the read_only of this RepositorySettingsInfo. # noqa: E501 + + + :return: The read_only of this RepositorySettingsInfo. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this RepositorySettingsInfo. + + + :param read_only: The read_only of this RepositorySettingsInfo. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RepositorySettingsInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepositorySettingsInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/reset_password_email_request.py b/tb_rest_client/models/models_pe/reset_password_email_request.py index 1972651e..219779f3 100644 --- a/tb_rest_client/models/models_pe/reset_password_email_request.py +++ b/tb_rest_client/models/models_pe/reset_password_email_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ResetPasswordEmailRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/reset_password_request.py b/tb_rest_client/models/models_pe/reset_password_request.py index 02212bdc..1108a7dd 100644 --- a/tb_rest_client/models/models_pe/reset_password_request.py +++ b/tb_rest_client/models/models_pe/reset_password_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ResetPasswordRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/resource.py b/tb_rest_client/models/models_pe/resource.py index 8e103a04..c02b6660 100644 --- a/tb_rest_client/models/models_pe/resource.py +++ b/tb_rest_client/models/models_pe/resource.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Resource(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/response_entity.py b/tb_rest_client/models/models_pe/response_entity.py index a264e585..7f1bc67d 100644 --- a/tb_rest_client/models/models_pe/response_entity.py +++ b/tb_rest_client/models/models_pe/response_entity.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ResponseEntity(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/role.py b/tb_rest_client/models/models_pe/role.py index 604bb92a..62264640 100644 --- a/tb_rest_client/models/models_pe/role.py +++ b/tb_rest_client/models/models_pe/role.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Role(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,7 +28,6 @@ class Role(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'RoleId', 'id': 'RoleId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -41,7 +40,6 @@ class Role(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -53,9 +51,8 @@ class Role(object): 'additional_info': 'additionalInfo' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, name=None, type=None, permissions=None, additional_info=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, name=None, type=None, permissions=None, additional_info=None): # noqa: E501 """Role - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -66,8 +63,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, self._permissions = None self._additional_info = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -84,27 +79,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if additional_info is not None: self.additional_info = additional_info - @property - def external_id(self): - """Gets the external_id of this Role. # noqa: E501 - - - :return: The external_id of this Role. # noqa: E501 - :rtype: RoleId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this Role. - - - :param external_id: The external_id of this Role. # noqa: E501 - :type: RoleId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this Role. # noqa: E501 @@ -167,6 +141,8 @@ def tenant_id(self, tenant_id): :param tenant_id: The tenant_id of this Role. # noqa: E501 :type: TenantId """ + if tenant_id is None: + raise ValueError("Invalid value for `tenant_id`, must not be `None`") # noqa: E501 self._tenant_id = tenant_id diff --git a/tb_rest_client/models/models_pe/role_id.py b/tb_rest_client/models/models_pe/role_id.py index ac303d65..d02dea2b 100644 --- a/tb_rest_client/models/models_pe/role_id.py +++ b/tb_rest_client/models/models_pe/role_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RoleId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -90,7 +90,7 @@ def entity_type(self, entity_type): """ if entity_type is None: raise ValueError("Invalid value for `entity_type`, must not be `None`") # noqa: E501 - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/rpc.py b/tb_rest_client/models/models_pe/rpc.py index 64216545..19cf0736 100644 --- a/tb_rest_client/models/models_pe/rpc.py +++ b/tb_rest_client/models/models_pe/rpc.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Rpc(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/rpc_id.py b/tb_rest_client/models/models_pe/rpc_id.py index 947705ee..f3f700f7 100644 --- a/tb_rest_client/models/models_pe/rpc_id.py +++ b/tb_rest_client/models/models_pe/rpc_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RpcId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/rpk_lw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_pe/rpk_lw_m2_m_bootstrap_server_credential.py index c08f684f..62779dc1 100644 --- a/tb_rest_client/models/models_pe/rpk_lw_m2_m_bootstrap_server_credential.py +++ b/tb_rest_client/models/models_pe/rpk_lw_m2_m_bootstrap_server_credential.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.4.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/models/models_pe/rpklw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_pe/rpklw_m2_m_bootstrap_server_credential.py new file mode 100644 index 00000000..d76f6be6 --- /dev/null +++ b/tb_rest_client/models/models_pe/rpklw_m2_m_bootstrap_server_credential.py @@ -0,0 +1,420 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class RPKLwM2MBootstrapServerCredential(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'short_server_id': 'int', + 'bootstrap_server_is': 'bool', + 'host': 'str', + 'port': 'int', + 'client_hold_off_time': 'int', + 'server_public_key': 'str', + 'server_certificate': 'str', + 'bootstrap_server_account_timeout': 'int', + 'lifetime': 'int', + 'default_min_period': 'int', + 'notif_if_disabled': 'bool', + 'binding': 'str' + } + + attribute_map = { + 'short_server_id': 'shortServerId', + 'bootstrap_server_is': 'bootstrapServerIs', + 'host': 'host', + 'port': 'port', + 'client_hold_off_time': 'clientHoldOffTime', + 'server_public_key': 'serverPublicKey', + 'server_certificate': 'serverCertificate', + 'bootstrap_server_account_timeout': 'bootstrapServerAccountTimeout', + 'lifetime': 'lifetime', + 'default_min_period': 'defaultMinPeriod', + 'notif_if_disabled': 'notifIfDisabled', + 'binding': 'binding' + } + + def __init__(self, short_server_id=None, bootstrap_server_is=None, host=None, port=None, client_hold_off_time=None, server_public_key=None, server_certificate=None, bootstrap_server_account_timeout=None, lifetime=None, default_min_period=None, notif_if_disabled=None, binding=None): # noqa: E501 + """RPKLwM2MBootstrapServerCredential - a model defined in Swagger""" # noqa: E501 + self._short_server_id = None + self._bootstrap_server_is = None + self._host = None + self._port = None + self._client_hold_off_time = None + self._server_public_key = None + self._server_certificate = None + self._bootstrap_server_account_timeout = None + self._lifetime = None + self._default_min_period = None + self._notif_if_disabled = None + self._binding = None + self.discriminator = None + if short_server_id is not None: + self.short_server_id = short_server_id + if bootstrap_server_is is not None: + self.bootstrap_server_is = bootstrap_server_is + if host is not None: + self.host = host + if port is not None: + self.port = port + if client_hold_off_time is not None: + self.client_hold_off_time = client_hold_off_time + if server_public_key is not None: + self.server_public_key = server_public_key + if server_certificate is not None: + self.server_certificate = server_certificate + if bootstrap_server_account_timeout is not None: + self.bootstrap_server_account_timeout = bootstrap_server_account_timeout + if lifetime is not None: + self.lifetime = lifetime + if default_min_period is not None: + self.default_min_period = default_min_period + if notif_if_disabled is not None: + self.notif_if_disabled = notif_if_disabled + if binding is not None: + self.binding = binding + + @property + def short_server_id(self): + """Gets the short_server_id of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:0 and ID:65535 values MUST NOT be used for identifying the LwM2M Server. # noqa: E501 + + :return: The short_server_id of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._short_server_id + + @short_server_id.setter + def short_server_id(self, short_server_id): + """Sets the short_server_id of this RPKLwM2MBootstrapServerCredential. + + Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:0 and ID:65535 values MUST NOT be used for identifying the LwM2M Server. # noqa: E501 + + :param short_server_id: The short_server_id of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._short_server_id = short_server_id + + @property + def bootstrap_server_is(self): + """Gets the bootstrap_server_is of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified. # noqa: E501 + + :return: The bootstrap_server_is of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: bool + """ + return self._bootstrap_server_is + + @bootstrap_server_is.setter + def bootstrap_server_is(self, bootstrap_server_is): + """Sets the bootstrap_server_is of this RPKLwM2MBootstrapServerCredential. + + Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified. # noqa: E501 + + :param bootstrap_server_is: The bootstrap_server_is of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: bool + """ + + self._bootstrap_server_is = bootstrap_server_is + + @property + def host(self): + """Gets the host of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + Host for 'No Security' mode # noqa: E501 + + :return: The host of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: str + """ + return self._host + + @host.setter + def host(self, host): + """Sets the host of this RPKLwM2MBootstrapServerCredential. + + Host for 'No Security' mode # noqa: E501 + + :param host: The host of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: str + """ + + self._host = host + + @property + def port(self): + """Gets the port of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server # noqa: E501 + + :return: The port of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this RPKLwM2MBootstrapServerCredential. + + Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server # noqa: E501 + + :param port: The port of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._port = port + + @property + def client_hold_off_time(self): + """Gets the client_hold_off_time of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.) # noqa: E501 + + :return: The client_hold_off_time of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._client_hold_off_time + + @client_hold_off_time.setter + def client_hold_off_time(self, client_hold_off_time): + """Sets the client_hold_off_time of this RPKLwM2MBootstrapServerCredential. + + Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.) # noqa: E501 + + :param client_hold_off_time: The client_hold_off_time of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._client_hold_off_time = client_hold_off_time + + @property + def server_public_key(self): + """Gets the server_public_key of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded # noqa: E501 + + :return: The server_public_key of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: str + """ + return self._server_public_key + + @server_public_key.setter + def server_public_key(self, server_public_key): + """Sets the server_public_key of this RPKLwM2MBootstrapServerCredential. + + Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded # noqa: E501 + + :param server_public_key: The server_public_key of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: str + """ + + self._server_public_key = server_public_key + + @property + def server_certificate(self): + """Gets the server_certificate of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded # noqa: E501 + + :return: The server_certificate of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: str + """ + return self._server_certificate + + @server_certificate.setter + def server_certificate(self, server_certificate): + """Sets the server_certificate of this RPKLwM2MBootstrapServerCredential. + + Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded # noqa: E501 + + :param server_certificate: The server_certificate of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: str + """ + + self._server_certificate = server_certificate + + @property + def bootstrap_server_account_timeout(self): + """Gets the bootstrap_server_account_timeout of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.) # noqa: E501 + + :return: The bootstrap_server_account_timeout of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._bootstrap_server_account_timeout + + @bootstrap_server_account_timeout.setter + def bootstrap_server_account_timeout(self, bootstrap_server_account_timeout): + """Sets the bootstrap_server_account_timeout of this RPKLwM2MBootstrapServerCredential. + + Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.) # noqa: E501 + + :param bootstrap_server_account_timeout: The bootstrap_server_account_timeout of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._bootstrap_server_account_timeout = bootstrap_server_account_timeout + + @property + def lifetime(self): + """Gets the lifetime of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + Specify the lifetime of the registration in seconds. # noqa: E501 + + :return: The lifetime of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._lifetime + + @lifetime.setter + def lifetime(self, lifetime): + """Sets the lifetime of this RPKLwM2MBootstrapServerCredential. + + Specify the lifetime of the registration in seconds. # noqa: E501 + + :param lifetime: The lifetime of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._lifetime = lifetime + + @property + def default_min_period(self): + """Gets the default_min_period of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0. # noqa: E501 + + :return: The default_min_period of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: int + """ + return self._default_min_period + + @default_min_period.setter + def default_min_period(self, default_min_period): + """Sets the default_min_period of this RPKLwM2MBootstrapServerCredential. + + The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0. # noqa: E501 + + :param default_min_period: The default_min_period of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: int + """ + + self._default_min_period = default_min_period + + @property + def notif_if_disabled(self): + """Gets the notif_if_disabled of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true. # noqa: E501 + + :return: The notif_if_disabled of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: bool + """ + return self._notif_if_disabled + + @notif_if_disabled.setter + def notif_if_disabled(self, notif_if_disabled): + """Sets the notif_if_disabled of this RPKLwM2MBootstrapServerCredential. + + If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true. # noqa: E501 + + :param notif_if_disabled: The notif_if_disabled of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: bool + """ + + self._notif_if_disabled = notif_if_disabled + + @property + def binding(self): + """Gets the binding of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + + This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode. # noqa: E501 + + :return: The binding of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :rtype: str + """ + return self._binding + + @binding.setter + def binding(self, binding): + """Sets the binding of this RPKLwM2MBootstrapServerCredential. + + This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode. # noqa: E501 + + :param binding: The binding of this RPKLwM2MBootstrapServerCredential. # noqa: E501 + :type: str + """ + + self._binding = binding + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RPKLwM2MBootstrapServerCredential, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RPKLwM2MBootstrapServerCredential): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/rule_chain.py b/tb_rest_client/models/models_pe/rule_chain.py index e773e130..b57c666d 100644 --- a/tb_rest_client/models/models_pe/rule_chain.py +++ b/tb_rest_client/models/models_pe/rule_chain.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChain(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -29,7 +29,6 @@ class RuleChain(object): """ swagger_types = { 'additional_info': 'JsonNode', - 'external_id': 'RuleChainId', 'id': 'RuleChainId', 'created_time': 'int', 'tenant_id': 'TenantId', @@ -43,7 +42,6 @@ class RuleChain(object): attribute_map = { 'additional_info': 'additionalInfo', - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', 'tenant_id': 'tenantId', @@ -55,10 +53,9 @@ class RuleChain(object): 'configuration': 'configuration' } - def __init__(self, additional_info=None, external_id=None, id=None, created_time=None, tenant_id=None, name=None, type=None, first_rule_node_id=None, root=None, debug_mode=None, configuration=None): # noqa: E501 + def __init__(self, additional_info=None, id=None, created_time=None, tenant_id=None, name=None, type=None, first_rule_node_id=None, root=None, debug_mode=None, configuration=None): # noqa: E501 """RuleChain - a model defined in Swagger""" # noqa: E501 self._additional_info = None - self._external_id = None self._id = None self._created_time = None self._tenant_id = None @@ -71,8 +68,6 @@ def __init__(self, additional_info=None, external_id=None, id=None, created_time self.discriminator = None if additional_info is not None: self.additional_info = additional_info - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -111,27 +106,6 @@ def additional_info(self, additional_info): self._additional_info = additional_info - @property - def external_id(self): - """Gets the external_id of this RuleChain. # noqa: E501 - - - :return: The external_id of this RuleChain. # noqa: E501 - :rtype: RuleChainId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this RuleChain. - - - :param external_id: The external_id of this RuleChain. # noqa: E501 - :type: RuleChainId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this RuleChain. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/rule_chain_connection_info.py b/tb_rest_client/models/models_pe/rule_chain_connection_info.py index 6420171f..1171692a 100644 --- a/tb_rest_client/models/models_pe/rule_chain_connection_info.py +++ b/tb_rest_client/models/models_pe/rule_chain_connection_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainConnectionInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/rule_chain_data.py b/tb_rest_client/models/models_pe/rule_chain_data.py index e96c687b..d9d36476 100644 --- a/tb_rest_client/models/models_pe/rule_chain_data.py +++ b/tb_rest_client/models/models_pe/rule_chain_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/rule_chain_debug_event_filter.py b/tb_rest_client/models/models_pe/rule_chain_debug_event_filter.py new file mode 100644 index 00000000..bd81b980 --- /dev/null +++ b/tb_rest_client/models/models_pe/rule_chain_debug_event_filter.py @@ -0,0 +1,261 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.event_filter import EventFilter # noqa: F401,E501 + +class RuleChainDebugEventFilter(EventFilter): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'error': 'bool', + 'not_empty': 'bool', + 'event_type': 'str', + 'server': 'str', + 'message': 'str', + 'error_str': 'str' + } + if hasattr(EventFilter, "swagger_types"): + swagger_types.update(EventFilter.swagger_types) + + attribute_map = { + 'error': 'error', + 'not_empty': 'notEmpty', + 'event_type': 'eventType', + 'server': 'server', + 'message': 'message', + 'error_str': 'errorStr' + } + if hasattr(EventFilter, "attribute_map"): + attribute_map.update(EventFilter.attribute_map) + + def __init__(self, error=None, not_empty=None, event_type=None, server=None, message=None, error_str=None, *args, **kwargs): # noqa: E501 + """RuleChainDebugEventFilter - a model defined in Swagger""" # noqa: E501 + self._error = None + self._not_empty = None + self._event_type = None + self._server = None + self._message = None + self._error_str = None + self.discriminator = None + if error is not None: + self.error = error + if not_empty is not None: + self.not_empty = not_empty + self.event_type = event_type + if server is not None: + self.server = server + if message is not None: + self.message = message + if error_str is not None: + self.error_str = error_str + EventFilter.__init__(self, *args, **kwargs) + + @property + def error(self): + """Gets the error of this RuleChainDebugEventFilter. # noqa: E501 + + + :return: The error of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: bool + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this RuleChainDebugEventFilter. + + + :param error: The error of this RuleChainDebugEventFilter. # noqa: E501 + :type: bool + """ + + self._error = error + + @property + def not_empty(self): + """Gets the not_empty of this RuleChainDebugEventFilter. # noqa: E501 + + + :return: The not_empty of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this RuleChainDebugEventFilter. + + + :param not_empty: The not_empty of this RuleChainDebugEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + + @property + def event_type(self): + """Gets the event_type of this RuleChainDebugEventFilter. # noqa: E501 + + String value representing the event type # noqa: E501 + + :return: The event_type of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._event_type + + @event_type.setter + def event_type(self, event_type): + """Sets the event_type of this RuleChainDebugEventFilter. + + String value representing the event type # noqa: E501 + + :param event_type: The event_type of this RuleChainDebugEventFilter. # noqa: E501 + :type: str + """ + if event_type is None: + raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 + allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "RAW_DATA", "STATS"] # noqa: E501 + if event_type not in allowed_values: + raise ValueError( + "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 + .format(event_type, allowed_values) + ) + + self._event_type = event_type + + @property + def server(self): + """Gets the server of this RuleChainDebugEventFilter. # noqa: E501 + + String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + + :return: The server of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._server + + @server.setter + def server(self, server): + """Sets the server of this RuleChainDebugEventFilter. + + String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + + :param server: The server of this RuleChainDebugEventFilter. # noqa: E501 + :type: str + """ + + self._server = server + + @property + def message(self): + """Gets the message of this RuleChainDebugEventFilter. # noqa: E501 + + String value representing the message # noqa: E501 + + :return: The message of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this RuleChainDebugEventFilter. + + String value representing the message # noqa: E501 + + :param message: The message of this RuleChainDebugEventFilter. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def error_str(self): + """Gets the error_str of this RuleChainDebugEventFilter. # noqa: E501 + + The case insensitive 'contains' filter based on error message # noqa: E501 + + :return: The error_str of this RuleChainDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._error_str + + @error_str.setter + def error_str(self, error_str): + """Sets the error_str of this RuleChainDebugEventFilter. + + The case insensitive 'contains' filter based on error message # noqa: E501 + + :param error_str: The error_str of this RuleChainDebugEventFilter. # noqa: E501 + :type: str + """ + + self._error_str = error_str + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RuleChainDebugEventFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleChainDebugEventFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/rule_chain_export_data.py b/tb_rest_client/models/models_pe/rule_chain_export_data.py index 1491ac22..a2f8566d 100644 --- a/tb_rest_client/models/models_pe/rule_chain_export_data.py +++ b/tb_rest_client/models/models_pe/rule_chain_export_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 class RuleChainExportData(EntityExportDataobject): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -128,7 +128,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this RuleChainExportData. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/rule_chain_id.py b/tb_rest_client/models/models_pe/rule_chain_id.py index fa63a415..3f58c182 100644 --- a/tb_rest_client/models/models_pe/rule_chain_id.py +++ b/tb_rest_client/models/models_pe/rule_chain_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/rule_chain_import_result.py b/tb_rest_client/models/models_pe/rule_chain_import_result.py index c0d2fcfb..8dba5f2d 100644 --- a/tb_rest_client/models/models_pe/rule_chain_import_result.py +++ b/tb_rest_client/models/models_pe/rule_chain_import_result.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainImportResult(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/rule_chain_meta_data.py b/tb_rest_client/models/models_pe/rule_chain_meta_data.py index 4e7b0f9d..f23ecf89 100644 --- a/tb_rest_client/models/models_pe/rule_chain_meta_data.py +++ b/tb_rest_client/models/models_pe/rule_chain_meta_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainMetaData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/rule_chain_output_labels_usage.py b/tb_rest_client/models/models_pe/rule_chain_output_labels_usage.py index 6508aa88..bd7eea74 100644 --- a/tb_rest_client/models/models_pe/rule_chain_output_labels_usage.py +++ b/tb_rest_client/models/models_pe/rule_chain_output_labels_usage.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleChainOutputLabelsUsage(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/rule_engine_component_lifecycle_event_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/rule_engine_component_lifecycle_event_notification_rule_trigger_config.py new file mode 100644 index 00000000..3f412581 --- /dev/null +++ b/tb_rest_client/models/models_pe/rule_engine_component_lifecycle_event_notification_rule_trigger_config.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 + +class RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'only_rule_chain_lifecycle_failures': 'bool', + 'only_rule_node_lifecycle_failures': 'bool', + 'rule_chain_events': 'list[str]', + 'rule_chains': 'list[str]', + 'rule_node_events': 'list[str]', + 'track_rule_node_events': 'bool', + 'trigger_type': 'str' + } + if hasattr(NotificationRuleTriggerConfig, "swagger_types"): + swagger_types.update(NotificationRuleTriggerConfig.swagger_types) + + attribute_map = { + 'only_rule_chain_lifecycle_failures': 'onlyRuleChainLifecycleFailures', + 'only_rule_node_lifecycle_failures': 'onlyRuleNodeLifecycleFailures', + 'rule_chain_events': 'ruleChainEvents', + 'rule_chains': 'ruleChains', + 'rule_node_events': 'ruleNodeEvents', + 'track_rule_node_events': 'trackRuleNodeEvents', + 'trigger_type': 'triggerType' + } + if hasattr(NotificationRuleTriggerConfig, "attribute_map"): + attribute_map.update(NotificationRuleTriggerConfig.attribute_map) + + def __init__(self, only_rule_chain_lifecycle_failures=None, only_rule_node_lifecycle_failures=None, rule_chain_events=None, rule_chains=None, rule_node_events=None, track_rule_node_events=None, trigger_type=None, *args, **kwargs): # noqa: E501 + """RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 + self._only_rule_chain_lifecycle_failures = None + self._only_rule_node_lifecycle_failures = None + self._rule_chain_events = None + self._rule_chains = None + self._rule_node_events = None + self._track_rule_node_events = None + self._trigger_type = None + self.discriminator = None + if only_rule_chain_lifecycle_failures is not None: + self.only_rule_chain_lifecycle_failures = only_rule_chain_lifecycle_failures + if only_rule_node_lifecycle_failures is not None: + self.only_rule_node_lifecycle_failures = only_rule_node_lifecycle_failures + if rule_chain_events is not None: + self.rule_chain_events = rule_chain_events + if rule_chains is not None: + self.rule_chains = rule_chains + if rule_node_events is not None: + self.rule_node_events = rule_node_events + if track_rule_node_events is not None: + self.track_rule_node_events = track_rule_node_events + if trigger_type is not None: + self.trigger_type = trigger_type + NotificationRuleTriggerConfig.__init__(self, *args, **kwargs) + + @property + def only_rule_chain_lifecycle_failures(self): + """Gets the only_rule_chain_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The only_rule_chain_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._only_rule_chain_lifecycle_failures + + @only_rule_chain_lifecycle_failures.setter + def only_rule_chain_lifecycle_failures(self, only_rule_chain_lifecycle_failures): + """Sets the only_rule_chain_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param only_rule_chain_lifecycle_failures: The only_rule_chain_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._only_rule_chain_lifecycle_failures = only_rule_chain_lifecycle_failures + + @property + def only_rule_node_lifecycle_failures(self): + """Gets the only_rule_node_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The only_rule_node_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._only_rule_node_lifecycle_failures + + @only_rule_node_lifecycle_failures.setter + def only_rule_node_lifecycle_failures(self, only_rule_node_lifecycle_failures): + """Sets the only_rule_node_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param only_rule_node_lifecycle_failures: The only_rule_node_lifecycle_failures of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._only_rule_node_lifecycle_failures = only_rule_node_lifecycle_failures + + @property + def rule_chain_events(self): + """Gets the rule_chain_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The rule_chain_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._rule_chain_events + + @rule_chain_events.setter + def rule_chain_events(self, rule_chain_events): + """Sets the rule_chain_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param rule_chain_events: The rule_chain_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACTIVATED", "CREATED", "DELETED", "FAILED", "STARTED", "STOPPED", "SUSPENDED", "UPDATED"] # noqa: E501 + if not set(rule_chain_events).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `rule_chain_events` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(rule_chain_events) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._rule_chain_events = rule_chain_events + + @property + def rule_chains(self): + """Gets the rule_chains of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The rule_chains of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._rule_chains + + @rule_chains.setter + def rule_chains(self, rule_chains): + """Sets the rule_chains of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param rule_chains: The rule_chains of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + + self._rule_chains = rule_chains + + @property + def rule_node_events(self): + """Gets the rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: list[str] + """ + return self._rule_node_events + + @rule_node_events.setter + def rule_node_events(self, rule_node_events): + """Sets the rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param rule_node_events: The rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: list[str] + """ + allowed_values = ["ACTIVATED", "CREATED", "DELETED", "FAILED", "STARTED", "STOPPED", "SUSPENDED", "UPDATED"] # noqa: E501 + if not set(rule_node_events).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `rule_node_events` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(rule_node_events) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._rule_node_events = rule_node_events + + @property + def track_rule_node_events(self): + """Gets the track_rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The track_rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: bool + """ + return self._track_rule_node_events + + @track_rule_node_events.setter + def track_rule_node_events(self, track_rule_node_events): + """Sets the track_rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param track_rule_node_events: The track_rule_node_events of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: bool + """ + + self._track_rule_node_events = track_rule_node_events + + @property + def trigger_type(self): + """Gets the trigger_type of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + + + :return: The trigger_type of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. + + + :param trigger_type: The trigger_type of this RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig. # noqa: E501 + :type: str + """ + allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 + if trigger_type not in allowed_values: + raise ValueError( + "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 + .format(trigger_type, allowed_values) + ) + + self._trigger_type = trigger_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/rule_node.py b/tb_rest_client/models/models_pe/rule_node.py index fe775a7d..da3484cf 100644 --- a/tb_rest_client/models/models_pe/rule_node.py +++ b/tb_rest_client/models/models_pe/rule_node.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleNode(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -35,8 +35,9 @@ class RuleNode(object): 'type': 'str', 'name': 'str', 'debug_mode': 'bool', - 'configuration': 'JsonNode', - 'additional_info': 'JsonNode' + 'singleton_mode': 'bool', + 'additional_info': 'JsonNode', + 'configuration': 'JsonNode' } attribute_map = { @@ -47,11 +48,12 @@ class RuleNode(object): 'type': 'type', 'name': 'name', 'debug_mode': 'debugMode', - 'configuration': 'configuration', - 'additional_info': 'additionalInfo' + 'singleton_mode': 'singletonMode', + 'additional_info': 'additionalInfo', + 'configuration': 'configuration' } - def __init__(self, external_id=None, id=None, created_time=None, rule_chain_id=None, type=None, name=None, debug_mode=None, configuration=None, additional_info=None): # noqa: E501 + def __init__(self, external_id=None, id=None, created_time=None, rule_chain_id=None, type=None, name=None, debug_mode=None, singleton_mode=None, additional_info=None, configuration=None): # noqa: E501 """RuleNode - a model defined in Swagger""" # noqa: E501 self._external_id = None self._id = None @@ -60,8 +62,9 @@ def __init__(self, external_id=None, id=None, created_time=None, rule_chain_id=N self._type = None self._name = None self._debug_mode = None - self._configuration = None + self._singleton_mode = None self._additional_info = None + self._configuration = None self.discriminator = None if external_id is not None: self.external_id = external_id @@ -77,10 +80,12 @@ def __init__(self, external_id=None, id=None, created_time=None, rule_chain_id=N self.name = name if debug_mode is not None: self.debug_mode = debug_mode - if configuration is not None: - self.configuration = configuration + if singleton_mode is not None: + self.singleton_mode = singleton_mode if additional_info is not None: self.additional_info = additional_info + if configuration is not None: + self.configuration = configuration @property def external_id(self): @@ -238,25 +243,27 @@ def debug_mode(self, debug_mode): self._debug_mode = debug_mode @property - def configuration(self): - """Gets the configuration of this RuleNode. # noqa: E501 + def singleton_mode(self): + """Gets the singleton_mode of this RuleNode. # noqa: E501 + Enable/disable singleton mode. # noqa: E501 - :return: The configuration of this RuleNode. # noqa: E501 - :rtype: JsonNode + :return: The singleton_mode of this RuleNode. # noqa: E501 + :rtype: bool """ - return self._configuration + return self._singleton_mode - @configuration.setter - def configuration(self, configuration): - """Sets the configuration of this RuleNode. + @singleton_mode.setter + def singleton_mode(self, singleton_mode): + """Sets the singleton_mode of this RuleNode. + Enable/disable singleton mode. # noqa: E501 - :param configuration: The configuration of this RuleNode. # noqa: E501 - :type: JsonNode + :param singleton_mode: The singleton_mode of this RuleNode. # noqa: E501 + :type: bool """ - self._configuration = configuration + self._singleton_mode = singleton_mode @property def additional_info(self): @@ -279,6 +286,27 @@ def additional_info(self, additional_info): self._additional_info = additional_info + @property + def configuration(self): + """Gets the configuration of this RuleNode. # noqa: E501 + + + :return: The configuration of this RuleNode. # noqa: E501 + :rtype: JsonNode + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this RuleNode. + + + :param configuration: The configuration of this RuleNode. # noqa: E501 + :type: JsonNode + """ + + self._configuration = configuration + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_pe/rule_node_debug_event_filter.py b/tb_rest_client/models/models_pe/rule_node_debug_event_filter.py new file mode 100644 index 00000000..69610f9d --- /dev/null +++ b/tb_rest_client/models/models_pe/rule_node_debug_event_filter.py @@ -0,0 +1,469 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.event_filter import EventFilter # noqa: F401,E501 + +class RuleNodeDebugEventFilter(EventFilter): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'error': 'bool', + 'not_empty': 'bool', + 'event_type': 'str', + 'server': 'str', + 'msg_direction_type': 'str', + 'entity_id': 'str', + 'error_str': 'str', + 'entity_type': 'str', + 'msg_id': 'str', + 'msg_type': 'str', + 'relation_type': 'str', + 'data_search': 'str', + 'metadata_search': 'str' + } + if hasattr(EventFilter, "swagger_types"): + swagger_types.update(EventFilter.swagger_types) + + attribute_map = { + 'error': 'error', + 'not_empty': 'notEmpty', + 'event_type': 'eventType', + 'server': 'server', + 'msg_direction_type': 'msgDirectionType', + 'entity_id': 'entityId', + 'error_str': 'errorStr', + 'entity_type': 'entityType', + 'msg_id': 'msgId', + 'msg_type': 'msgType', + 'relation_type': 'relationType', + 'data_search': 'dataSearch', + 'metadata_search': 'metadataSearch' + } + if hasattr(EventFilter, "attribute_map"): + attribute_map.update(EventFilter.attribute_map) + + def __init__(self, error=None, not_empty=None, event_type=None, server=None, msg_direction_type=None, entity_id=None, error_str=None, entity_type=None, msg_id=None, msg_type=None, relation_type=None, data_search=None, metadata_search=None, *args, **kwargs): # noqa: E501 + """RuleNodeDebugEventFilter - a model defined in Swagger""" # noqa: E501 + self._error = None + self._not_empty = None + self._event_type = None + self._server = None + self._msg_direction_type = None + self._entity_id = None + self._error_str = None + self._entity_type = None + self._msg_id = None + self._msg_type = None + self._relation_type = None + self._data_search = None + self._metadata_search = None + self.discriminator = None + if error is not None: + self.error = error + if not_empty is not None: + self.not_empty = not_empty + self.event_type = event_type + if server is not None: + self.server = server + if msg_direction_type is not None: + self.msg_direction_type = msg_direction_type + if entity_id is not None: + self.entity_id = entity_id + if error_str is not None: + self.error_str = error_str + if entity_type is not None: + self.entity_type = entity_type + if msg_id is not None: + self.msg_id = msg_id + if msg_type is not None: + self.msg_type = msg_type + if relation_type is not None: + self.relation_type = relation_type + if data_search is not None: + self.data_search = data_search + if metadata_search is not None: + self.metadata_search = metadata_search + EventFilter.__init__(self, *args, **kwargs) + + @property + def error(self): + """Gets the error of this RuleNodeDebugEventFilter. # noqa: E501 + + + :return: The error of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: bool + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this RuleNodeDebugEventFilter. + + + :param error: The error of this RuleNodeDebugEventFilter. # noqa: E501 + :type: bool + """ + + self._error = error + + @property + def not_empty(self): + """Gets the not_empty of this RuleNodeDebugEventFilter. # noqa: E501 + + + :return: The not_empty of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this RuleNodeDebugEventFilter. + + + :param not_empty: The not_empty of this RuleNodeDebugEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + + @property + def event_type(self): + """Gets the event_type of this RuleNodeDebugEventFilter. # noqa: E501 + + String value representing the event type # noqa: E501 + + :return: The event_type of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._event_type + + @event_type.setter + def event_type(self, event_type): + """Sets the event_type of this RuleNodeDebugEventFilter. + + String value representing the event type # noqa: E501 + + :param event_type: The event_type of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + if event_type is None: + raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 + allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "RAW_DATA", "STATS"] # noqa: E501 + if event_type not in allowed_values: + raise ValueError( + "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 + .format(event_type, allowed_values) + ) + + self._event_type = event_type + + @property + def server(self): + """Gets the server of this RuleNodeDebugEventFilter. # noqa: E501 + + String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + + :return: The server of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._server + + @server.setter + def server(self, server): + """Sets the server of this RuleNodeDebugEventFilter. + + String value representing the server name, identifier or ip address where the platform is running # noqa: E501 + + :param server: The server of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + + self._server = server + + @property + def msg_direction_type(self): + """Gets the msg_direction_type of this RuleNodeDebugEventFilter. # noqa: E501 + + String value representing msg direction type (incoming to entity or outcoming from entity) # noqa: E501 + + :return: The msg_direction_type of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._msg_direction_type + + @msg_direction_type.setter + def msg_direction_type(self, msg_direction_type): + """Sets the msg_direction_type of this RuleNodeDebugEventFilter. + + String value representing msg direction type (incoming to entity or outcoming from entity) # noqa: E501 + + :param msg_direction_type: The msg_direction_type of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + allowed_values = ["IN", "OUT"] # noqa: E501 + if msg_direction_type not in allowed_values: + raise ValueError( + "Invalid value for `msg_direction_type` ({0}), must be one of {1}" # noqa: E501 + .format(msg_direction_type, allowed_values) + ) + + self._msg_direction_type = msg_direction_type + + @property + def entity_id(self): + """Gets the entity_id of this RuleNodeDebugEventFilter. # noqa: E501 + + String value representing the entity id in the event body (originator of the message) # noqa: E501 + + :return: The entity_id of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this RuleNodeDebugEventFilter. + + String value representing the entity id in the event body (originator of the message) # noqa: E501 + + :param entity_id: The entity_id of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + + self._entity_id = entity_id + + @property + def error_str(self): + """Gets the error_str of this RuleNodeDebugEventFilter. # noqa: E501 + + The case insensitive 'contains' filter based on error message # noqa: E501 + + :return: The error_str of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._error_str + + @error_str.setter + def error_str(self, error_str): + """Sets the error_str of this RuleNodeDebugEventFilter. + + The case insensitive 'contains' filter based on error message # noqa: E501 + + :param error_str: The error_str of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + + self._error_str = error_str + + @property + def entity_type(self): + """Gets the entity_type of this RuleNodeDebugEventFilter. # noqa: E501 + + String value representing the entity type # noqa: E501 + + :return: The entity_type of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this RuleNodeDebugEventFilter. + + String value representing the entity type # noqa: E501 + + :param entity_type: The entity_type of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + allowed_values = ["DEVICE"] # noqa: E501 + if entity_type not in allowed_values: + raise ValueError( + "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 + .format(entity_type, allowed_values) + ) + + self._entity_type = entity_type + + @property + def msg_id(self): + """Gets the msg_id of this RuleNodeDebugEventFilter. # noqa: E501 + + String value representing the message id in the rule engine # noqa: E501 + + :return: The msg_id of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._msg_id + + @msg_id.setter + def msg_id(self, msg_id): + """Sets the msg_id of this RuleNodeDebugEventFilter. + + String value representing the message id in the rule engine # noqa: E501 + + :param msg_id: The msg_id of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + + self._msg_id = msg_id + + @property + def msg_type(self): + """Gets the msg_type of this RuleNodeDebugEventFilter. # noqa: E501 + + String value representing the message type # noqa: E501 + + :return: The msg_type of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._msg_type + + @msg_type.setter + def msg_type(self, msg_type): + """Sets the msg_type of this RuleNodeDebugEventFilter. + + String value representing the message type # noqa: E501 + + :param msg_type: The msg_type of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + + self._msg_type = msg_type + + @property + def relation_type(self): + """Gets the relation_type of this RuleNodeDebugEventFilter. # noqa: E501 + + String value representing the type of message routing # noqa: E501 + + :return: The relation_type of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._relation_type + + @relation_type.setter + def relation_type(self, relation_type): + """Sets the relation_type of this RuleNodeDebugEventFilter. + + String value representing the type of message routing # noqa: E501 + + :param relation_type: The relation_type of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + + self._relation_type = relation_type + + @property + def data_search(self): + """Gets the data_search of this RuleNodeDebugEventFilter. # noqa: E501 + + The case insensitive 'contains' filter based on data (key and value) for the message. # noqa: E501 + + :return: The data_search of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._data_search + + @data_search.setter + def data_search(self, data_search): + """Sets the data_search of this RuleNodeDebugEventFilter. + + The case insensitive 'contains' filter based on data (key and value) for the message. # noqa: E501 + + :param data_search: The data_search of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + + self._data_search = data_search + + @property + def metadata_search(self): + """Gets the metadata_search of this RuleNodeDebugEventFilter. # noqa: E501 + + The case insensitive 'contains' filter based on metadata (key and value) for the message. # noqa: E501 + + :return: The metadata_search of this RuleNodeDebugEventFilter. # noqa: E501 + :rtype: str + """ + return self._metadata_search + + @metadata_search.setter + def metadata_search(self, metadata_search): + """Sets the metadata_search of this RuleNodeDebugEventFilter. + + The case insensitive 'contains' filter based on metadata (key and value) for the message. # noqa: E501 + + :param metadata_search: The metadata_search of this RuleNodeDebugEventFilter. # noqa: E501 + :type: str + """ + + self._metadata_search = metadata_search + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RuleNodeDebugEventFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleNodeDebugEventFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/rule_node_id.py b/tb_rest_client/models/models_pe/rule_node_id.py index b531fa67..1bc71296 100644 --- a/tb_rest_client/models/models_pe/rule_node_id.py +++ b/tb_rest_client/models/models_pe/rule_node_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class RuleNodeId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/save_device_with_credentials_request.py b/tb_rest_client/models/models_pe/save_device_with_credentials_request.py index e3e0dafc..0336b0f7 100644 --- a/tb_rest_client/models/models_pe/save_device_with_credentials_request.py +++ b/tb_rest_client/models/models_pe/save_device_with_credentials_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SaveDeviceWithCredentialsRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/save_ota_package_info_request.py b/tb_rest_client/models/models_pe/save_ota_package_info_request.py index 4f8ef9a5..ef09ce54 100644 --- a/tb_rest_client/models/models_pe/save_ota_package_info_request.py +++ b/tb_rest_client/models/models_pe/save_ota_package_info_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SaveOtaPackageInfoRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/scheduler_event.py b/tb_rest_client/models/models_pe/scheduler_event.py index 81d7d759..eb92dfee 100644 --- a/tb_rest_client/models/models_pe/scheduler_event.py +++ b/tb_rest_client/models/models_pe/scheduler_event.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SchedulerEvent(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -32,6 +32,7 @@ class SchedulerEvent(object): 'created_time': 'int', 'tenant_id': 'TenantId', 'customer_id': 'CustomerId', + 'originator_id': 'EntityId', 'owner_id': 'EntityId', 'name': 'str', 'type': 'str', @@ -45,6 +46,7 @@ class SchedulerEvent(object): 'created_time': 'createdTime', 'tenant_id': 'tenantId', 'customer_id': 'customerId', + 'originator_id': 'originatorId', 'owner_id': 'ownerId', 'name': 'name', 'type': 'type', @@ -53,12 +55,13 @@ class SchedulerEvent(object): 'additional_info': 'additionalInfo' } - def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, name=None, type=None, schedule=None, configuration=None, additional_info=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, originator_id=None, owner_id=None, name=None, type=None, schedule=None, configuration=None, additional_info=None): # noqa: E501 """SchedulerEvent - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None self._tenant_id = None self._customer_id = None + self._originator_id = None self._owner_id = None self._name = None self._type = None @@ -74,6 +77,8 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.tenant_id = tenant_id if customer_id is not None: self.customer_id = customer_id + if originator_id is not None: + self.originator_id = originator_id if owner_id is not None: self.owner_id = owner_id if name is not None: @@ -173,6 +178,27 @@ def customer_id(self, customer_id): self._customer_id = customer_id + @property + def originator_id(self): + """Gets the originator_id of this SchedulerEvent. # noqa: E501 + + + :return: The originator_id of this SchedulerEvent. # noqa: E501 + :rtype: EntityId + """ + return self._originator_id + + @originator_id.setter + def originator_id(self, originator_id): + """Sets the originator_id of this SchedulerEvent. + + + :param originator_id: The originator_id of this SchedulerEvent. # noqa: E501 + :type: EntityId + """ + + self._originator_id = originator_id + @property def owner_id(self): """Gets the owner_id of this SchedulerEvent. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/scheduler_event_filter.py b/tb_rest_client/models/models_pe/scheduler_event_filter.py new file mode 100644 index 00000000..6b6bc0ab --- /dev/null +++ b/tb_rest_client/models/models_pe/scheduler_event_filter.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 + +class SchedulerEventFilter(EntityFilter): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'event_type': 'str', + 'originator': 'EntityId' + } + if hasattr(EntityFilter, "swagger_types"): + swagger_types.update(EntityFilter.swagger_types) + + attribute_map = { + 'event_type': 'eventType', + 'originator': 'originator' + } + if hasattr(EntityFilter, "attribute_map"): + attribute_map.update(EntityFilter.attribute_map) + + def __init__(self, event_type=None, originator=None, *args, **kwargs): # noqa: E501 + """SchedulerEventFilter - a model defined in Swagger""" # noqa: E501 + self._event_type = None + self._originator = None + self.discriminator = None + if event_type is not None: + self.event_type = event_type + if originator is not None: + self.originator = originator + EntityFilter.__init__(self, *args, **kwargs) + + @property + def event_type(self): + """Gets the event_type of this SchedulerEventFilter. # noqa: E501 + + + :return: The event_type of this SchedulerEventFilter. # noqa: E501 + :rtype: str + """ + return self._event_type + + @event_type.setter + def event_type(self, event_type): + """Sets the event_type of this SchedulerEventFilter. + + + :param event_type: The event_type of this SchedulerEventFilter. # noqa: E501 + :type: str + """ + + self._event_type = event_type + + @property + def originator(self): + """Gets the originator of this SchedulerEventFilter. # noqa: E501 + + + :return: The originator of this SchedulerEventFilter. # noqa: E501 + :rtype: EntityId + """ + return self._originator + + @originator.setter + def originator(self, originator): + """Sets the originator of this SchedulerEventFilter. + + + :param originator: The originator of this SchedulerEventFilter. # noqa: E501 + :type: EntityId + """ + + self._originator = originator + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SchedulerEventFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SchedulerEventFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/scheduler_event_id.py b/tb_rest_client/models/models_pe/scheduler_event_id.py index 02f450d6..88a4620e 100644 --- a/tb_rest_client/models/models_pe/scheduler_event_id.py +++ b/tb_rest_client/models/models_pe/scheduler_event_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SchedulerEventId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,21 +28,18 @@ class SchedulerEventId(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str', - 'entity_type': 'str' + 'id': 'str' } attribute_map = { - 'id': 'id', - 'entity_type': 'entityType' + 'id': 'id' } - def __init__(self, id=None, entity_type=None): # noqa: E501 + def __init__(self, id=None): # noqa: E501 """SchedulerEventId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None self.id = id - self.entity_type = entity_type @property def id(self): diff --git a/tb_rest_client/models/models_pe/scheduler_event_info.py b/tb_rest_client/models/models_pe/scheduler_event_info.py index abc47ce6..50a67b31 100644 --- a/tb_rest_client/models/models_pe/scheduler_event_info.py +++ b/tb_rest_client/models/models_pe/scheduler_event_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SchedulerEventInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -32,6 +32,7 @@ class SchedulerEventInfo(object): 'created_time': 'int', 'tenant_id': 'TenantId', 'customer_id': 'CustomerId', + 'originator_id': 'EntityId', 'owner_id': 'EntityId', 'name': 'str', 'type': 'str', @@ -44,6 +45,7 @@ class SchedulerEventInfo(object): 'created_time': 'createdTime', 'tenant_id': 'tenantId', 'customer_id': 'customerId', + 'originator_id': 'originatorId', 'owner_id': 'ownerId', 'name': 'name', 'type': 'type', @@ -51,12 +53,13 @@ class SchedulerEventInfo(object): 'additional_info': 'additionalInfo' } - def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, name=None, type=None, schedule=None, additional_info=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, originator_id=None, owner_id=None, name=None, type=None, schedule=None, additional_info=None): # noqa: E501 """SchedulerEventInfo - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None self._tenant_id = None self._customer_id = None + self._originator_id = None self._owner_id = None self._name = None self._type = None @@ -71,6 +74,8 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.tenant_id = tenant_id if customer_id is not None: self.customer_id = customer_id + if originator_id is not None: + self.originator_id = originator_id if owner_id is not None: self.owner_id = owner_id if name is not None: @@ -168,6 +173,27 @@ def customer_id(self, customer_id): self._customer_id = customer_id + @property + def originator_id(self): + """Gets the originator_id of this SchedulerEventInfo. # noqa: E501 + + + :return: The originator_id of this SchedulerEventInfo. # noqa: E501 + :rtype: EntityId + """ + return self._originator_id + + @originator_id.setter + def originator_id(self, originator_id): + """Sets the originator_id of this SchedulerEventInfo. + + + :param originator_id: The originator_id of this SchedulerEventInfo. # noqa: E501 + :type: EntityId + """ + + self._originator_id = originator_id + @property def owner_id(self): """Gets the owner_id of this SchedulerEventInfo. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/scheduler_event_with_customer_info.py b/tb_rest_client/models/models_pe/scheduler_event_with_customer_info.py index 3c1f35d2..2e443f9d 100644 --- a/tb_rest_client/models/models_pe/scheduler_event_with_customer_info.py +++ b/tb_rest_client/models/models_pe/scheduler_event_with_customer_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SchedulerEventWithCustomerInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -32,14 +32,14 @@ class SchedulerEventWithCustomerInfo(object): 'created_time': 'int', 'tenant_id': 'TenantId', 'customer_id': 'CustomerId', + 'originator_id': 'EntityId', 'owner_id': 'EntityId', 'name': 'str', 'type': 'str', 'schedule': 'JsonNode', 'additional_info': 'JsonNode', 'customer_title': 'str', - 'customer_is_public': 'object', - 'originator_id': 'EntityId' + 'customer_is_public': 'object' } attribute_map = { @@ -47,22 +47,23 @@ class SchedulerEventWithCustomerInfo(object): 'created_time': 'createdTime', 'tenant_id': 'tenantId', 'customer_id': 'customerId', + 'originator_id': 'originatorId', 'owner_id': 'ownerId', 'name': 'name', 'type': 'type', 'schedule': 'schedule', 'additional_info': 'additionalInfo', 'customer_title': 'customerTitle', - 'customer_is_public': 'customerIsPublic', - 'originator_id': 'originatorId' + 'customer_is_public': 'customerIsPublic' } - def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, owner_id=None, name=None, type=None, schedule=None, additional_info=None, customer_title=None, customer_is_public=None, originator_id=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, originator_id=None, owner_id=None, name=None, type=None, schedule=None, additional_info=None, customer_title=None, customer_is_public=None): # noqa: E501 """SchedulerEventWithCustomerInfo - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None self._tenant_id = None self._customer_id = None + self._originator_id = None self._owner_id = None self._name = None self._type = None @@ -70,7 +71,6 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self._additional_info = None self._customer_title = None self._customer_is_public = None - self._originator_id = None self.discriminator = None if id is not None: self.id = id @@ -80,6 +80,8 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.tenant_id = tenant_id if customer_id is not None: self.customer_id = customer_id + if originator_id is not None: + self.originator_id = originator_id if owner_id is not None: self.owner_id = owner_id if name is not None: @@ -94,8 +96,6 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, self.customer_title = customer_title if customer_is_public is not None: self.customer_is_public = customer_is_public - if originator_id is not None: - self._originator_id = originator_id @property def id(self): @@ -118,14 +118,6 @@ def id(self, id): self._id = id - @property - def originator_id(self): - return self._originator_id - - @originator_id.setter - def originator_id(self, value): - self._originator_id = value - @property def created_time(self): """Gets the created_time of this SchedulerEventWithCustomerInfo. # noqa: E501 @@ -191,6 +183,27 @@ def customer_id(self, customer_id): self._customer_id = customer_id + @property + def originator_id(self): + """Gets the originator_id of this SchedulerEventWithCustomerInfo. # noqa: E501 + + + :return: The originator_id of this SchedulerEventWithCustomerInfo. # noqa: E501 + :rtype: EntityId + """ + return self._originator_id + + @originator_id.setter + def originator_id(self, originator_id): + """Sets the originator_id of this SchedulerEventWithCustomerInfo. + + + :param originator_id: The originator_id of this SchedulerEventWithCustomerInfo. # noqa: E501 + :type: EntityId + """ + + self._originator_id = originator_id + @property def owner_id(self): """Gets the owner_id of this SchedulerEventWithCustomerInfo. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/security_settings.py b/tb_rest_client/models/models_pe/security_settings.py index 6faf5cad..b65de7ed 100644 --- a/tb_rest_client/models/models_pe/security_settings.py +++ b/tb_rest_client/models/models_pe/security_settings.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SecuritySettings(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/self_registration_params.py b/tb_rest_client/models/models_pe/self_registration_params.py index 7ce9f813..a5834f69 100644 --- a/tb_rest_client/models/models_pe/self_registration_params.py +++ b/tb_rest_client/models/models_pe/self_registration_params.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SelfRegistrationParams(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -31,6 +31,8 @@ class SelfRegistrationParams(object): 'admin_settings_id': 'str', 'sign_up_text_message': 'str', 'captcha_site_key': 'str', + 'captcha_version': 'str', + 'captcha_action': 'str', 'show_privacy_policy': 'bool', 'show_terms_of_use': 'bool', 'domain_name': 'str', @@ -51,6 +53,8 @@ class SelfRegistrationParams(object): 'admin_settings_id': 'adminSettingsId', 'sign_up_text_message': 'signUpTextMessage', 'captcha_site_key': 'captchaSiteKey', + 'captcha_version': 'captchaVersion', + 'captcha_action': 'captchaAction', 'show_privacy_policy': 'showPrivacyPolicy', 'show_terms_of_use': 'showTermsOfUse', 'domain_name': 'domainName', @@ -67,11 +71,13 @@ class SelfRegistrationParams(object): 'app_host': 'appHost' } - def __init__(self, admin_settings_id=None, sign_up_text_message=None, captcha_site_key=None, show_privacy_policy=None, show_terms_of_use=None, domain_name=None, captcha_secret_key=None, privacy_policy=None, terms_of_use=None, notification_email=None, default_dashboard_id=None, default_dashboard_fullscreen=None, permissions=None, pkg_name=None, app_secret=None, app_scheme=None, app_host=None): # noqa: E501 + def __init__(self, admin_settings_id=None, sign_up_text_message=None, captcha_site_key=None, captcha_version=None, captcha_action=None, show_privacy_policy=None, show_terms_of_use=None, domain_name=None, captcha_secret_key=None, privacy_policy=None, terms_of_use=None, notification_email=None, default_dashboard_id=None, default_dashboard_fullscreen=None, permissions=None, pkg_name=None, app_secret=None, app_scheme=None, app_host=None): # noqa: E501 """SelfRegistrationParams - a model defined in Swagger""" # noqa: E501 self._admin_settings_id = None self._sign_up_text_message = None self._captcha_site_key = None + self._captcha_version = None + self._captcha_action = None self._show_privacy_policy = None self._show_terms_of_use = None self._domain_name = None @@ -93,6 +99,10 @@ def __init__(self, admin_settings_id=None, sign_up_text_message=None, captcha_si self.sign_up_text_message = sign_up_text_message if captcha_site_key is not None: self.captcha_site_key = captcha_site_key + if captcha_version is not None: + self.captcha_version = captcha_version + if captcha_action is not None: + self.captcha_action = captcha_action if show_privacy_policy is not None: self.show_privacy_policy = show_privacy_policy if show_terms_of_use is not None: @@ -185,6 +195,48 @@ def captcha_site_key(self, captcha_site_key): self._captcha_site_key = captcha_site_key + @property + def captcha_version(self): + """Gets the captcha_version of this SelfRegistrationParams. # noqa: E501 + + + :return: The captcha_version of this SelfRegistrationParams. # noqa: E501 + :rtype: str + """ + return self._captcha_version + + @captcha_version.setter + def captcha_version(self, captcha_version): + """Sets the captcha_version of this SelfRegistrationParams. + + + :param captcha_version: The captcha_version of this SelfRegistrationParams. # noqa: E501 + :type: str + """ + + self._captcha_version = captcha_version + + @property + def captcha_action(self): + """Gets the captcha_action of this SelfRegistrationParams. # noqa: E501 + + + :return: The captcha_action of this SelfRegistrationParams. # noqa: E501 + :rtype: str + """ + return self._captcha_action + + @captcha_action.setter + def captcha_action(self, captcha_action): + """Sets the captcha_action of this SelfRegistrationParams. + + + :param captcha_action: The captcha_action of this SelfRegistrationParams. # noqa: E501 + :type: str + """ + + self._captcha_action = captcha_action + @property def show_privacy_policy(self): """Gets the show_privacy_policy of this SelfRegistrationParams. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/share_group_request.py b/tb_rest_client/models/models_pe/share_group_request.py index c4b937a3..f67d338f 100644 --- a/tb_rest_client/models/models_pe/share_group_request.py +++ b/tb_rest_client/models/models_pe/share_group_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ShareGroupRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/shared_attributes_setting_snmp_communication_config.py b/tb_rest_client/models/models_pe/shared_attributes_setting_snmp_communication_config.py index ef76f705..92c361eb 100644 --- a/tb_rest_client/models/models_pe/shared_attributes_setting_snmp_communication_config.py +++ b/tb_rest_client/models/models_pe/shared_attributes_setting_snmp_communication_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .snmp_communication_config import SnmpCommunicationConfig # noqa: F401,E501 +from tb_rest_client.models.models_pe.snmp_communication_config import SnmpCommunicationConfig # noqa: F401,E501 class SharedAttributesSettingSnmpCommunicationConfig(SnmpCommunicationConfig): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/short_customer_info.py b/tb_rest_client/models/models_pe/short_customer_info.py index b091f6eb..1d363857 100644 --- a/tb_rest_client/models/models_pe/short_customer_info.py +++ b/tb_rest_client/models/models_pe/short_customer_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ShortCustomerInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/short_entity_view.py b/tb_rest_client/models/models_pe/short_entity_view.py index 0c429a95..41b39a42 100644 --- a/tb_rest_client/models/models_pe/short_entity_view.py +++ b/tb_rest_client/models/models_pe/short_entity_view.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ShortEntityView(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -29,27 +29,21 @@ class ShortEntityView(object): """ swagger_types = { 'id': 'EntityId', - 'name': 'str', - 'created_time': 'int', - 'device_profile': 'DeviceProfile' + 'name': 'str' } attribute_map = { 'id': 'id', - 'name': 'name', - 'created_time': 'createdTime', - 'device_profile': 'deviceProfile' + 'name': 'name' } - def __init__(self, id=None, name=None, created_time=None, device_profile=None): # noqa: E501 + def __init__(self, id=None, name=None): # noqa: E501 """ShortEntityView - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None self.discriminator = None self.id = id self.name = name - self.created_time = created_time - self.device_profile = device_profile @property def id(self): diff --git a/tb_rest_client/models/models_pe/sign_up_request.py b/tb_rest_client/models/models_pe/sign_up_request.py index 199e0aaf..25f73f8e 100644 --- a/tb_rest_client/models/models_pe/sign_up_request.py +++ b/tb_rest_client/models/models_pe/sign_up_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SignUpRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/sign_up_self_registration_params.py b/tb_rest_client/models/models_pe/sign_up_self_registration_params.py index 5fb3291a..46679f28 100644 --- a/tb_rest_client/models/models_pe/sign_up_self_registration_params.py +++ b/tb_rest_client/models/models_pe/sign_up_self_registration_params.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SignUpSelfRegistrationParams(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -30,6 +30,8 @@ class SignUpSelfRegistrationParams(object): swagger_types = { 'sign_up_text_message': 'str', 'captcha_site_key': 'str', + 'captcha_version': 'str', + 'captcha_action': 'str', 'show_privacy_policy': 'bool', 'show_terms_of_use': 'bool' } @@ -37,14 +39,18 @@ class SignUpSelfRegistrationParams(object): attribute_map = { 'sign_up_text_message': 'signUpTextMessage', 'captcha_site_key': 'captchaSiteKey', + 'captcha_version': 'captchaVersion', + 'captcha_action': 'captchaAction', 'show_privacy_policy': 'showPrivacyPolicy', 'show_terms_of_use': 'showTermsOfUse' } - def __init__(self, sign_up_text_message=None, captcha_site_key=None, show_privacy_policy=None, show_terms_of_use=None): # noqa: E501 + def __init__(self, sign_up_text_message=None, captcha_site_key=None, captcha_version=None, captcha_action=None, show_privacy_policy=None, show_terms_of_use=None): # noqa: E501 """SignUpSelfRegistrationParams - a model defined in Swagger""" # noqa: E501 self._sign_up_text_message = None self._captcha_site_key = None + self._captcha_version = None + self._captcha_action = None self._show_privacy_policy = None self._show_terms_of_use = None self.discriminator = None @@ -52,6 +58,10 @@ def __init__(self, sign_up_text_message=None, captcha_site_key=None, show_privac self.sign_up_text_message = sign_up_text_message if captcha_site_key is not None: self.captcha_site_key = captcha_site_key + if captcha_version is not None: + self.captcha_version = captcha_version + if captcha_action is not None: + self.captcha_action = captcha_action if show_privacy_policy is not None: self.show_privacy_policy = show_privacy_policy if show_terms_of_use is not None: @@ -99,6 +109,48 @@ def captcha_site_key(self, captcha_site_key): self._captcha_site_key = captcha_site_key + @property + def captcha_version(self): + """Gets the captcha_version of this SignUpSelfRegistrationParams. # noqa: E501 + + + :return: The captcha_version of this SignUpSelfRegistrationParams. # noqa: E501 + :rtype: str + """ + return self._captcha_version + + @captcha_version.setter + def captcha_version(self, captcha_version): + """Sets the captcha_version of this SignUpSelfRegistrationParams. + + + :param captcha_version: The captcha_version of this SignUpSelfRegistrationParams. # noqa: E501 + :type: str + """ + + self._captcha_version = captcha_version + + @property + def captcha_action(self): + """Gets the captcha_action of this SignUpSelfRegistrationParams. # noqa: E501 + + + :return: The captcha_action of this SignUpSelfRegistrationParams. # noqa: E501 + :rtype: str + """ + return self._captcha_action + + @captcha_action.setter + def captcha_action(self, captcha_action): + """Sets the captcha_action of this SignUpSelfRegistrationParams. + + + :param captcha_action: The captcha_action of this SignUpSelfRegistrationParams. # noqa: E501 + :type: str + """ + + self._captcha_action = captcha_action + @property def show_privacy_policy(self): """Gets the show_privacy_policy of this SignUpSelfRegistrationParams. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/simple_alarm_condition_spec.py b/tb_rest_client/models/models_pe/simple_alarm_condition_spec.py index 5bb02d97..19562035 100644 --- a/tb_rest_client/models/models_pe/simple_alarm_condition_spec.py +++ b/tb_rest_client/models/models_pe/simple_alarm_condition_spec.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 +from tb_rest_client.models.models_pe.alarm_condition_spec import AlarmConditionSpec # noqa: F401,E501 class SimpleAlarmConditionSpec(AlarmConditionSpec): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/single_entity_filter.py b/tb_rest_client/models/models_pe/single_entity_filter.py index 0e3e17b5..432e7e1f 100644 --- a/tb_rest_client/models/models_pe/single_entity_filter.py +++ b/tb_rest_client/models/models_pe/single_entity_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class SingleEntityFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/single_entity_version_create_request.py b/tb_rest_client/models/models_pe/single_entity_version_create_request.py index 8fe4a0a6..bb51ab75 100644 --- a/tb_rest_client/models/models_pe/single_entity_version_create_request.py +++ b/tb_rest_client/models/models_pe/single_entity_version_create_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .version_create_request import VersionCreateRequest # noqa: F401,E501 +from tb_rest_client.models.models_pe.version_create_request import VersionCreateRequest # noqa: F401,E501 class SingleEntityVersionCreateRequest(VersionCreateRequest): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -66,7 +66,7 @@ def __init__(self, branch=None, config=None, entity_id=None, type=None, version_ self.type = type if version_name is not None: self.version_name = version_name - VersionCreateRequest.__init__(self, branch, type, version_name) + VersionCreateRequest.__init__(self, *args, **kwargs) @property def branch(self): diff --git a/tb_rest_client/models/models_pe/single_entity_version_load_request.py b/tb_rest_client/models/models_pe/single_entity_version_load_request.py index 99416a41..26ffc365 100644 --- a/tb_rest_client/models/models_pe/single_entity_version_load_request.py +++ b/tb_rest_client/models/models_pe/single_entity_version_load_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .version_load_request import VersionLoadRequest # noqa: F401,E501 +from tb_rest_client.models.models_pe.version_load_request import VersionLoadRequest # noqa: F401,E501 class SingleEntityVersionLoadRequest(VersionLoadRequest): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -66,7 +66,7 @@ def __init__(self, config=None, external_entity_id=None, internal_entity_id=None self.type = type if version_id is not None: self.version_id = version_id - VersionLoadRequest.__init__(self, type, version_id) + VersionLoadRequest.__init__(self, *args, **kwargs) @property def config(self): diff --git a/tb_rest_client/models/models_pe/slack_conversation.py b/tb_rest_client/models/models_pe/slack_conversation.py new file mode 100644 index 00000000..177cacb4 --- /dev/null +++ b/tb_rest_client/models/models_pe/slack_conversation.py @@ -0,0 +1,247 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SlackConversation(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email': 'str', + 'id': 'str', + 'name': 'str', + 'title': 'str', + 'type': 'str', + 'whole_name': 'str' + } + + attribute_map = { + 'email': 'email', + 'id': 'id', + 'name': 'name', + 'title': 'title', + 'type': 'type', + 'whole_name': 'wholeName' + } + + def __init__(self, email=None, id=None, name=None, title=None, type=None, whole_name=None): # noqa: E501 + """SlackConversation - a model defined in Swagger""" # noqa: E501 + self._email = None + self._id = None + self._name = None + self._title = None + self._type = None + self._whole_name = None + self.discriminator = None + if email is not None: + self.email = email + if id is not None: + self.id = id + if name is not None: + self.name = name + if title is not None: + self.title = title + self.type = type + if whole_name is not None: + self.whole_name = whole_name + + @property + def email(self): + """Gets the email of this SlackConversation. # noqa: E501 + + + :return: The email of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this SlackConversation. + + + :param email: The email of this SlackConversation. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def id(self): + """Gets the id of this SlackConversation. # noqa: E501 + + + :return: The id of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SlackConversation. + + + :param id: The id of this SlackConversation. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this SlackConversation. # noqa: E501 + + + :return: The name of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this SlackConversation. + + + :param name: The name of this SlackConversation. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def title(self): + """Gets the title of this SlackConversation. # noqa: E501 + + + :return: The title of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this SlackConversation. + + + :param title: The title of this SlackConversation. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def type(self): + """Gets the type of this SlackConversation. # noqa: E501 + + + :return: The type of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this SlackConversation. + + + :param type: The type of this SlackConversation. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["DIRECT", "PRIVATE_CHANNEL", "PUBLIC_CHANNEL"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def whole_name(self): + """Gets the whole_name of this SlackConversation. # noqa: E501 + + + :return: The whole_name of this SlackConversation. # noqa: E501 + :rtype: str + """ + return self._whole_name + + @whole_name.setter + def whole_name(self, whole_name): + """Sets the whole_name of this SlackConversation. + + + :param whole_name: The whole_name of this SlackConversation. # noqa: E501 + :type: str + """ + + self._whole_name = whole_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SlackConversation, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SlackConversation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/slack_delivery_method_notification_template.py b/tb_rest_client/models/models_pe/slack_delivery_method_notification_template.py new file mode 100644 index 00000000..631eebc8 --- /dev/null +++ b/tb_rest_client/models/models_pe/slack_delivery_method_notification_template.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SlackDeliveryMethodNotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'enabled': 'bool' + } + + attribute_map = { + 'body': 'body', + 'enabled': 'enabled' + } + + def __init__(self, body=None, enabled=None): # noqa: E501 + """SlackDeliveryMethodNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._body = None + self._enabled = None + self.discriminator = None + if body is not None: + self.body = body + if enabled is not None: + self.enabled = enabled + + @property + def body(self): + """Gets the body of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The body of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SlackDeliveryMethodNotificationTemplate. + + + :param body: The body of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def enabled(self): + """Gets the enabled of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The enabled of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this SlackDeliveryMethodNotificationTemplate. + + + :param enabled: The enabled of this SlackDeliveryMethodNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SlackDeliveryMethodNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SlackDeliveryMethodNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/slack_notification_delivery_method_config.py b/tb_rest_client/models/models_pe/slack_notification_delivery_method_config.py new file mode 100644 index 00000000..63a19628 --- /dev/null +++ b/tb_rest_client/models/models_pe/slack_notification_delivery_method_config.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SlackNotificationDeliveryMethodConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'bot_token': 'str' + } + + attribute_map = { + 'bot_token': 'botToken' + } + + def __init__(self, bot_token=None): # noqa: E501 + """SlackNotificationDeliveryMethodConfig - a model defined in Swagger""" # noqa: E501 + self._bot_token = None + self.discriminator = None + if bot_token is not None: + self.bot_token = bot_token + + @property + def bot_token(self): + """Gets the bot_token of this SlackNotificationDeliveryMethodConfig. # noqa: E501 + + + :return: The bot_token of this SlackNotificationDeliveryMethodConfig. # noqa: E501 + :rtype: str + """ + return self._bot_token + + @bot_token.setter + def bot_token(self, bot_token): + """Sets the bot_token of this SlackNotificationDeliveryMethodConfig. + + + :param bot_token: The bot_token of this SlackNotificationDeliveryMethodConfig. # noqa: E501 + :type: str + """ + + self._bot_token = bot_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SlackNotificationDeliveryMethodConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SlackNotificationDeliveryMethodConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/slack_notification_target_config.py b/tb_rest_client/models/models_pe/slack_notification_target_config.py new file mode 100644 index 00000000..52a661e6 --- /dev/null +++ b/tb_rest_client/models/models_pe/slack_notification_target_config.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.notification_target_config import NotificationTargetConfig # noqa: F401,E501 + +class SlackNotificationTargetConfig(NotificationTargetConfig): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'conversation': 'SlackConversation', + 'conversation_type': 'str', + 'description': 'str' + } + if hasattr(NotificationTargetConfig, "swagger_types"): + swagger_types.update(NotificationTargetConfig.swagger_types) + + attribute_map = { + 'conversation': 'conversation', + 'conversation_type': 'conversationType', + 'description': 'description' + } + if hasattr(NotificationTargetConfig, "attribute_map"): + attribute_map.update(NotificationTargetConfig.attribute_map) + + def __init__(self, conversation=None, conversation_type=None, description=None, *args, **kwargs): # noqa: E501 + """SlackNotificationTargetConfig - a model defined in Swagger""" # noqa: E501 + self._conversation = None + self._conversation_type = None + self._description = None + self.discriminator = None + self.conversation = conversation + if conversation_type is not None: + self.conversation_type = conversation_type + if description is not None: + self.description = description + NotificationTargetConfig.__init__(self, *args, **kwargs) + + @property + def conversation(self): + """Gets the conversation of this SlackNotificationTargetConfig. # noqa: E501 + + + :return: The conversation of this SlackNotificationTargetConfig. # noqa: E501 + :rtype: SlackConversation + """ + return self._conversation + + @conversation.setter + def conversation(self, conversation): + """Sets the conversation of this SlackNotificationTargetConfig. + + + :param conversation: The conversation of this SlackNotificationTargetConfig. # noqa: E501 + :type: SlackConversation + """ + if conversation is None: + raise ValueError("Invalid value for `conversation`, must not be `None`") # noqa: E501 + + self._conversation = conversation + + @property + def conversation_type(self): + """Gets the conversation_type of this SlackNotificationTargetConfig. # noqa: E501 + + + :return: The conversation_type of this SlackNotificationTargetConfig. # noqa: E501 + :rtype: str + """ + return self._conversation_type + + @conversation_type.setter + def conversation_type(self, conversation_type): + """Sets the conversation_type of this SlackNotificationTargetConfig. + + + :param conversation_type: The conversation_type of this SlackNotificationTargetConfig. # noqa: E501 + :type: str + """ + allowed_values = ["DIRECT", "PRIVATE_CHANNEL", "PUBLIC_CHANNEL"] # noqa: E501 + if conversation_type not in allowed_values: + raise ValueError( + "Invalid value for `conversation_type` ({0}), must be one of {1}" # noqa: E501 + .format(conversation_type, allowed_values) + ) + + self._conversation_type = conversation_type + + @property + def description(self): + """Gets the description of this SlackNotificationTargetConfig. # noqa: E501 + + + :return: The description of this SlackNotificationTargetConfig. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this SlackNotificationTargetConfig. + + + :param description: The description of this SlackNotificationTargetConfig. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SlackNotificationTargetConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SlackNotificationTargetConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/smpp_sms_provider_configuration.py b/tb_rest_client/models/models_pe/smpp_sms_provider_configuration.py index a3036b84..c1fb7a2d 100644 --- a/tb_rest_client/models/models_pe/smpp_sms_provider_configuration.py +++ b/tb_rest_client/models/models_pe/smpp_sms_provider_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 class SmppSmsProviderConfiguration(SmsProviderConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/sms_delivery_method_notification_template.py b/tb_rest_client/models/models_pe/sms_delivery_method_notification_template.py new file mode 100644 index 00000000..a544099d --- /dev/null +++ b/tb_rest_client/models/models_pe/sms_delivery_method_notification_template.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SmsDeliveryMethodNotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'enabled': 'bool' + } + + attribute_map = { + 'body': 'body', + 'enabled': 'enabled' + } + + def __init__(self, body=None, enabled=None): # noqa: E501 + """SmsDeliveryMethodNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._body = None + self._enabled = None + self.discriminator = None + if body is not None: + self.body = body + if enabled is not None: + self.enabled = enabled + + @property + def body(self): + """Gets the body of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The body of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SmsDeliveryMethodNotificationTemplate. + + + :param body: The body of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def enabled(self): + """Gets the enabled of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The enabled of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this SmsDeliveryMethodNotificationTemplate. + + + :param enabled: The enabled of this SmsDeliveryMethodNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SmsDeliveryMethodNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmsDeliveryMethodNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/sms_provider_configuration.py b/tb_rest_client/models/models_pe/sms_provider_configuration.py index b28455c4..1d9c6f68 100644 --- a/tb_rest_client/models/models_pe/sms_provider_configuration.py +++ b/tb_rest_client/models/models_pe/sms_provider_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SmsProviderConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/sms_two_fa_account_config.py b/tb_rest_client/models/models_pe/sms_two_fa_account_config.py index 0d84a9bf..87dfef9a 100644 --- a/tb_rest_client/models/models_pe/sms_two_fa_account_config.py +++ b/tb_rest_client/models/models_pe/sms_two_fa_account_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .two_fa_account_config import TwoFaAccountConfig # noqa: F401,E501 +from tb_rest_client.models.models_pe.two_fa_account_config import TwoFaAccountConfig # noqa: F401,E501 class SmsTwoFaAccountConfig(TwoFaAccountConfig): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/sms_two_fa_provider_config.py b/tb_rest_client/models/models_pe/sms_two_fa_provider_config.py index 23916096..4ba5ec9e 100644 --- a/tb_rest_client/models/models_pe/sms_two_fa_provider_config.py +++ b/tb_rest_client/models/models_pe/sms_two_fa_provider_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SmsTwoFaProviderConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/snmp_communication_config.py b/tb_rest_client/models/models_pe/snmp_communication_config.py index 6a200131..91412c0b 100644 --- a/tb_rest_client/models/models_pe/snmp_communication_config.py +++ b/tb_rest_client/models/models_pe/snmp_communication_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SnmpCommunicationConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/snmp_device_profile_transport_configuration.py b/tb_rest_client/models/models_pe/snmp_device_profile_transport_configuration.py index d08a001d..f17d5b1d 100644 --- a/tb_rest_client/models/models_pe/snmp_device_profile_transport_configuration.py +++ b/tb_rest_client/models/models_pe/snmp_device_profile_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.device_profile_transport_configuration import DeviceProfileTransportConfiguration # noqa: F401,E501 class SnmpDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/snmp_device_transport_configuration.py b/tb_rest_client/models/models_pe/snmp_device_transport_configuration.py index 71311d2a..9bc710c5 100644 --- a/tb_rest_client/models/models_pe/snmp_device_transport_configuration.py +++ b/tb_rest_client/models/models_pe/snmp_device_transport_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.device_transport_configuration import DeviceTransportConfiguration # noqa: F401,E501 class SnmpDeviceTransportConfiguration(DeviceTransportConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/snmp_mapping.py b/tb_rest_client/models/models_pe/snmp_mapping.py index 1d5023a5..15777bb8 100644 --- a/tb_rest_client/models/models_pe/snmp_mapping.py +++ b/tb_rest_client/models/models_pe/snmp_mapping.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SnmpMapping(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/solution_install_response.py b/tb_rest_client/models/models_pe/solution_install_response.py index c8a39b29..e705c640 100644 --- a/tb_rest_client/models/models_pe/solution_install_response.py +++ b/tb_rest_client/models/models_pe/solution_install_response.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SolutionInstallResponse(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -30,32 +30,42 @@ class SolutionInstallResponse(object): swagger_types = { 'dashboard_group_id': 'EntityGroupId', 'dashboard_id': 'DashboardId', - 'details': 'str', - 'success': 'bool' + 'public_id': 'CustomerId', + 'main_dashboard_public': 'bool', + 'success': 'bool', + 'details': 'str' } attribute_map = { 'dashboard_group_id': 'dashboardGroupId', 'dashboard_id': 'dashboardId', - 'details': 'details', - 'success': 'success' + 'public_id': 'publicId', + 'main_dashboard_public': 'mainDashboardPublic', + 'success': 'success', + 'details': 'details' } - def __init__(self, dashboard_group_id=None, dashboard_id=None, details=None, success=None): # noqa: E501 + def __init__(self, dashboard_group_id=None, dashboard_id=None, public_id=None, main_dashboard_public=None, success=None, details=None): # noqa: E501 """SolutionInstallResponse - a model defined in Swagger""" # noqa: E501 self._dashboard_group_id = None self._dashboard_id = None - self._details = None + self._public_id = None + self._main_dashboard_public = None self._success = None + self._details = None self.discriminator = None if dashboard_group_id is not None: self.dashboard_group_id = dashboard_group_id if dashboard_id is not None: self.dashboard_id = dashboard_id - if details is not None: - self.details = details + if public_id is not None: + self.public_id = public_id + if main_dashboard_public is not None: + self.main_dashboard_public = main_dashboard_public if success is not None: self.success = success + if details is not None: + self.details = details @property def dashboard_group_id(self): @@ -100,27 +110,48 @@ def dashboard_id(self, dashboard_id): self._dashboard_id = dashboard_id @property - def details(self): - """Gets the details of this SolutionInstallResponse. # noqa: E501 + def public_id(self): + """Gets the public_id of this SolutionInstallResponse. # noqa: E501 - Markdown with solution usage instructions # noqa: E501 - :return: The details of this SolutionInstallResponse. # noqa: E501 - :rtype: str + :return: The public_id of this SolutionInstallResponse. # noqa: E501 + :rtype: CustomerId """ - return self._details + return self._public_id - @details.setter - def details(self, details): - """Sets the details of this SolutionInstallResponse. + @public_id.setter + def public_id(self, public_id): + """Sets the public_id of this SolutionInstallResponse. - Markdown with solution usage instructions # noqa: E501 - :param details: The details of this SolutionInstallResponse. # noqa: E501 - :type: str + :param public_id: The public_id of this SolutionInstallResponse. # noqa: E501 + :type: CustomerId """ - self._details = details + self._public_id = public_id + + @property + def main_dashboard_public(self): + """Gets the main_dashboard_public of this SolutionInstallResponse. # noqa: E501 + + Is the main dashboard public # noqa: E501 + + :return: The main_dashboard_public of this SolutionInstallResponse. # noqa: E501 + :rtype: bool + """ + return self._main_dashboard_public + + @main_dashboard_public.setter + def main_dashboard_public(self, main_dashboard_public): + """Sets the main_dashboard_public of this SolutionInstallResponse. + + Is the main dashboard public # noqa: E501 + + :param main_dashboard_public: The main_dashboard_public of this SolutionInstallResponse. # noqa: E501 + :type: bool + """ + + self._main_dashboard_public = main_dashboard_public @property def success(self): @@ -145,6 +176,29 @@ def success(self, success): self._success = success + @property + def details(self): + """Gets the details of this SolutionInstallResponse. # noqa: E501 + + Markdown with solution usage instructions # noqa: E501 + + :return: The details of this SolutionInstallResponse. # noqa: E501 + :rtype: str + """ + return self._details + + @details.setter + def details(self, details): + """Sets the details of this SolutionInstallResponse. + + Markdown with solution usage instructions # noqa: E501 + + :param details: The details of this SolutionInstallResponse. # noqa: E501 + :type: str + """ + + self._details = details + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_pe/specific_time_schedule.py b/tb_rest_client/models/models_pe/specific_time_schedule.py index f4fe6ea2..59c8e748 100644 --- a/tb_rest_client/models/models_pe/specific_time_schedule.py +++ b/tb_rest_client/models/models_pe/specific_time_schedule.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SpecificTimeSchedule(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/starred_dashboard_info.py b/tb_rest_client/models/models_pe/starred_dashboard_info.py new file mode 100644 index 00000000..d344db6c --- /dev/null +++ b/tb_rest_client/models/models_pe/starred_dashboard_info.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class StarredDashboardInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'title': 'str', + 'starred_at': 'int' + } + + attribute_map = { + 'id': 'id', + 'title': 'title', + 'starred_at': 'starredAt' + } + + def __init__(self, id=None, title=None, starred_at=None): # noqa: E501 + """StarredDashboardInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._title = None + self._starred_at = None + self.discriminator = None + if id is not None: + self.id = id + if title is not None: + self.title = title + if starred_at is not None: + self.starred_at = starred_at + + @property + def id(self): + """Gets the id of this StarredDashboardInfo. # noqa: E501 + + JSON object with Dashboard id. # noqa: E501 + + :return: The id of this StarredDashboardInfo. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this StarredDashboardInfo. + + JSON object with Dashboard id. # noqa: E501 + + :param id: The id of this StarredDashboardInfo. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def title(self): + """Gets the title of this StarredDashboardInfo. # noqa: E501 + + Title of the dashboard. # noqa: E501 + + :return: The title of this StarredDashboardInfo. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this StarredDashboardInfo. + + Title of the dashboard. # noqa: E501 + + :param title: The title of this StarredDashboardInfo. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def starred_at(self): + """Gets the starred_at of this StarredDashboardInfo. # noqa: E501 + + Starred timestamp # noqa: E501 + + :return: The starred_at of this StarredDashboardInfo. # noqa: E501 + :rtype: int + """ + return self._starred_at + + @starred_at.setter + def starred_at(self, starred_at): + """Sets the starred_at of this StarredDashboardInfo. + + Starred timestamp # noqa: E501 + + :param starred_at: The starred_at of this StarredDashboardInfo. # noqa: E501 + :type: int + """ + + self._starred_at = starred_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(StarredDashboardInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StarredDashboardInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/state_entity_owner_filter.py b/tb_rest_client/models/models_pe/state_entity_owner_filter.py index fef35bee..67a0be80 100644 --- a/tb_rest_client/models/models_pe/state_entity_owner_filter.py +++ b/tb_rest_client/models/models_pe/state_entity_owner_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_filter import EntityFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_filter import EntityFilter # noqa: F401,E501 class StateEntityOwnerFilter(EntityFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/statistics_event_filter.py b/tb_rest_client/models/models_pe/statistics_event_filter.py index a800d48c..3001c0b9 100644 --- a/tb_rest_client/models/models_pe/statistics_event_filter.py +++ b/tb_rest_client/models/models_pe/statistics_event_filter.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .event_filter import EventFilter # noqa: F401,E501 +from tb_rest_client.models.models_pe.event_filter import EventFilter # noqa: F401,E501 class StatisticsEventFilter(EventFilter): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -29,39 +29,75 @@ class StatisticsEventFilter(EventFilter): and the value is json key in definition. """ swagger_types = { + 'not_empty': 'bool', 'event_type': 'str', 'server': 'str', - 'messages_processed': 'int', - 'errors_occurred': 'int' + 'min_messages_processed': 'int', + 'max_messages_processed': 'int', + 'min_errors_occurred': 'int', + 'max_errors_occurred': 'int' } if hasattr(EventFilter, "swagger_types"): swagger_types.update(EventFilter.swagger_types) attribute_map = { + 'not_empty': 'notEmpty', 'event_type': 'eventType', 'server': 'server', - 'messages_processed': 'messagesProcessed', - 'errors_occurred': 'errorsOccurred' + 'min_messages_processed': 'minMessagesProcessed', + 'max_messages_processed': 'maxMessagesProcessed', + 'min_errors_occurred': 'minErrorsOccurred', + 'max_errors_occurred': 'maxErrorsOccurred' } if hasattr(EventFilter, "attribute_map"): attribute_map.update(EventFilter.attribute_map) - def __init__(self, event_type=None, server=None, messages_processed=None, errors_occurred=None, *args, **kwargs): # noqa: E501 + def __init__(self, not_empty=None, event_type=None, server=None, min_messages_processed=None, max_messages_processed=None, min_errors_occurred=None, max_errors_occurred=None, *args, **kwargs): # noqa: E501 """StatisticsEventFilter - a model defined in Swagger""" # noqa: E501 + self._not_empty = None self._event_type = None self._server = None - self._messages_processed = None - self._errors_occurred = None + self._min_messages_processed = None + self._max_messages_processed = None + self._min_errors_occurred = None + self._max_errors_occurred = None self.discriminator = None + if not_empty is not None: + self.not_empty = not_empty self.event_type = event_type if server is not None: self.server = server - if messages_processed is not None: - self.messages_processed = messages_processed - if errors_occurred is not None: - self.errors_occurred = errors_occurred + if min_messages_processed is not None: + self.min_messages_processed = min_messages_processed + if max_messages_processed is not None: + self.max_messages_processed = max_messages_processed + if min_errors_occurred is not None: + self.min_errors_occurred = min_errors_occurred + if max_errors_occurred is not None: + self.max_errors_occurred = max_errors_occurred EventFilter.__init__(self, *args, **kwargs) + @property + def not_empty(self): + """Gets the not_empty of this StatisticsEventFilter. # noqa: E501 + + + :return: The not_empty of this StatisticsEventFilter. # noqa: E501 + :rtype: bool + """ + return self._not_empty + + @not_empty.setter + def not_empty(self, not_empty): + """Sets the not_empty of this StatisticsEventFilter. + + + :param not_empty: The not_empty of this StatisticsEventFilter. # noqa: E501 + :type: bool + """ + + self._not_empty = not_empty + @property def event_type(self): """Gets the event_type of this StatisticsEventFilter. # noqa: E501 @@ -84,7 +120,7 @@ def event_type(self, event_type): """ if event_type is None: raise ValueError("Invalid value for `event_type`, must not be `None`") # noqa: E501 - allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "STATS"] # noqa: E501 + allowed_values = ["DEBUG_CONVERTER", "DEBUG_INTEGRATION", "DEBUG_RULE_CHAIN", "DEBUG_RULE_NODE", "ERROR", "LC_EVENT", "RAW_DATA", "STATS"] # noqa: E501 if event_type not in allowed_values: raise ValueError( "Invalid value for `event_type` ({0}), must be one of {1}" # noqa: E501 @@ -117,50 +153,96 @@ def server(self, server): self._server = server @property - def messages_processed(self): - """Gets the messages_processed of this StatisticsEventFilter. # noqa: E501 + def min_messages_processed(self): + """Gets the min_messages_processed of this StatisticsEventFilter. # noqa: E501 The minimum number of successfully processed messages # noqa: E501 - :return: The messages_processed of this StatisticsEventFilter. # noqa: E501 + :return: The min_messages_processed of this StatisticsEventFilter. # noqa: E501 :rtype: int """ - return self._messages_processed + return self._min_messages_processed - @messages_processed.setter - def messages_processed(self, messages_processed): - """Sets the messages_processed of this StatisticsEventFilter. + @min_messages_processed.setter + def min_messages_processed(self, min_messages_processed): + """Sets the min_messages_processed of this StatisticsEventFilter. The minimum number of successfully processed messages # noqa: E501 - :param messages_processed: The messages_processed of this StatisticsEventFilter. # noqa: E501 + :param min_messages_processed: The min_messages_processed of this StatisticsEventFilter. # noqa: E501 :type: int """ - self._messages_processed = messages_processed + self._min_messages_processed = min_messages_processed @property - def errors_occurred(self): - """Gets the errors_occurred of this StatisticsEventFilter. # noqa: E501 + def max_messages_processed(self): + """Gets the max_messages_processed of this StatisticsEventFilter. # noqa: E501 + + The maximum number of successfully processed messages # noqa: E501 + + :return: The max_messages_processed of this StatisticsEventFilter. # noqa: E501 + :rtype: int + """ + return self._max_messages_processed + + @max_messages_processed.setter + def max_messages_processed(self, max_messages_processed): + """Sets the max_messages_processed of this StatisticsEventFilter. + + The maximum number of successfully processed messages # noqa: E501 + + :param max_messages_processed: The max_messages_processed of this StatisticsEventFilter. # noqa: E501 + :type: int + """ + + self._max_messages_processed = max_messages_processed + + @property + def min_errors_occurred(self): + """Gets the min_errors_occurred of this StatisticsEventFilter. # noqa: E501 The minimum number of errors occurred during messages processing # noqa: E501 - :return: The errors_occurred of this StatisticsEventFilter. # noqa: E501 + :return: The min_errors_occurred of this StatisticsEventFilter. # noqa: E501 :rtype: int """ - return self._errors_occurred + return self._min_errors_occurred - @errors_occurred.setter - def errors_occurred(self, errors_occurred): - """Sets the errors_occurred of this StatisticsEventFilter. + @min_errors_occurred.setter + def min_errors_occurred(self, min_errors_occurred): + """Sets the min_errors_occurred of this StatisticsEventFilter. The minimum number of errors occurred during messages processing # noqa: E501 - :param errors_occurred: The errors_occurred of this StatisticsEventFilter. # noqa: E501 + :param min_errors_occurred: The min_errors_occurred of this StatisticsEventFilter. # noqa: E501 + :type: int + """ + + self._min_errors_occurred = min_errors_occurred + + @property + def max_errors_occurred(self): + """Gets the max_errors_occurred of this StatisticsEventFilter. # noqa: E501 + + The maximum number of errors occurred during messages processing # noqa: E501 + + :return: The max_errors_occurred of this StatisticsEventFilter. # noqa: E501 + :rtype: int + """ + return self._max_errors_occurred + + @max_errors_occurred.setter + def max_errors_occurred(self, max_errors_occurred): + """Sets the max_errors_occurred of this StatisticsEventFilter. + + The maximum number of errors occurred during messages processing # noqa: E501 + + :param max_errors_occurred: The max_errors_occurred of this StatisticsEventFilter. # noqa: E501 :type: int """ - self._errors_occurred = errors_occurred + self._max_errors_occurred = max_errors_occurred def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_pe/string_filter_predicate.py b/tb_rest_client/models/models_pe/string_filter_predicate.py index 3b500731..33042a2b 100644 --- a/tb_rest_client/models/models_pe/string_filter_predicate.py +++ b/tb_rest_client/models/models_pe/string_filter_predicate.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 +from tb_rest_client.models.models_pe.key_filter_predicate import KeyFilterPredicate # noqa: F401,E501 class StringFilterPredicate(KeyFilterPredicate): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/submit_strategy.py b/tb_rest_client/models/models_pe/submit_strategy.py index 34221297..0d0ebfb6 100644 --- a/tb_rest_client/models/models_pe/submit_strategy.py +++ b/tb_rest_client/models/models_pe/submit_strategy.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class SubmitStrategy(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/system_administrators_filter.py b/tb_rest_client/models/models_pe/system_administrators_filter.py new file mode 100644 index 00000000..170051c3 --- /dev/null +++ b/tb_rest_client/models/models_pe/system_administrators_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SystemAdministratorsFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """SystemAdministratorsFilter - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SystemAdministratorsFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemAdministratorsFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/system_info.py b/tb_rest_client/models/models_pe/system_info.py new file mode 100644 index 00000000..728937c6 --- /dev/null +++ b/tb_rest_client/models/models_pe/system_info.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SystemInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'monolith': 'bool', + 'system_data': 'list[SystemInfoData]' + } + + attribute_map = { + 'monolith': 'monolith', + 'system_data': 'systemData' + } + + def __init__(self, monolith=None, system_data=None): # noqa: E501 + """SystemInfo - a model defined in Swagger""" # noqa: E501 + self._monolith = None + self._system_data = None + self.discriminator = None + if monolith is not None: + self.monolith = monolith + if system_data is not None: + self.system_data = system_data + + @property + def monolith(self): + """Gets the monolith of this SystemInfo. # noqa: E501 + + + :return: The monolith of this SystemInfo. # noqa: E501 + :rtype: bool + """ + return self._monolith + + @monolith.setter + def monolith(self, monolith): + """Sets the monolith of this SystemInfo. + + + :param monolith: The monolith of this SystemInfo. # noqa: E501 + :type: bool + """ + + self._monolith = monolith + + @property + def system_data(self): + """Gets the system_data of this SystemInfo. # noqa: E501 + + System data. # noqa: E501 + + :return: The system_data of this SystemInfo. # noqa: E501 + :rtype: list[SystemInfoData] + """ + return self._system_data + + @system_data.setter + def system_data(self, system_data): + """Sets the system_data of this SystemInfo. + + System data. # noqa: E501 + + :param system_data: The system_data of this SystemInfo. # noqa: E501 + :type: list[SystemInfoData] + """ + + self._system_data = system_data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SystemInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/system_info_data.py b/tb_rest_client/models/models_pe/system_info_data.py new file mode 100644 index 00000000..e8b9ebfd --- /dev/null +++ b/tb_rest_client/models/models_pe/system_info_data.py @@ -0,0 +1,308 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class SystemInfoData(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'service_id': 'str', + 'service_type': 'str', + 'cpu_usage': 'int', + 'cpu_count': 'int', + 'memory_usage': 'int', + 'total_memory': 'int', + 'disc_usage': 'int', + 'total_disc_space': 'int' + } + + attribute_map = { + 'service_id': 'serviceId', + 'service_type': 'serviceType', + 'cpu_usage': 'cpuUsage', + 'cpu_count': 'cpuCount', + 'memory_usage': 'memoryUsage', + 'total_memory': 'totalMemory', + 'disc_usage': 'discUsage', + 'total_disc_space': 'totalDiscSpace' + } + + def __init__(self, service_id=None, service_type=None, cpu_usage=None, cpu_count=None, memory_usage=None, total_memory=None, disc_usage=None, total_disc_space=None): # noqa: E501 + """SystemInfoData - a model defined in Swagger""" # noqa: E501 + self._service_id = None + self._service_type = None + self._cpu_usage = None + self._cpu_count = None + self._memory_usage = None + self._total_memory = None + self._disc_usage = None + self._total_disc_space = None + self.discriminator = None + if service_id is not None: + self.service_id = service_id + if service_type is not None: + self.service_type = service_type + if cpu_usage is not None: + self.cpu_usage = cpu_usage + if cpu_count is not None: + self.cpu_count = cpu_count + if memory_usage is not None: + self.memory_usage = memory_usage + if total_memory is not None: + self.total_memory = total_memory + if disc_usage is not None: + self.disc_usage = disc_usage + if total_disc_space is not None: + self.total_disc_space = total_disc_space + + @property + def service_id(self): + """Gets the service_id of this SystemInfoData. # noqa: E501 + + Service Id. # noqa: E501 + + :return: The service_id of this SystemInfoData. # noqa: E501 + :rtype: str + """ + return self._service_id + + @service_id.setter + def service_id(self, service_id): + """Sets the service_id of this SystemInfoData. + + Service Id. # noqa: E501 + + :param service_id: The service_id of this SystemInfoData. # noqa: E501 + :type: str + """ + + self._service_id = service_id + + @property + def service_type(self): + """Gets the service_type of this SystemInfoData. # noqa: E501 + + Service type. # noqa: E501 + + :return: The service_type of this SystemInfoData. # noqa: E501 + :rtype: str + """ + return self._service_type + + @service_type.setter + def service_type(self, service_type): + """Sets the service_type of this SystemInfoData. + + Service type. # noqa: E501 + + :param service_type: The service_type of this SystemInfoData. # noqa: E501 + :type: str + """ + + self._service_type = service_type + + @property + def cpu_usage(self): + """Gets the cpu_usage of this SystemInfoData. # noqa: E501 + + CPU usage, in percent. # noqa: E501 + + :return: The cpu_usage of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._cpu_usage + + @cpu_usage.setter + def cpu_usage(self, cpu_usage): + """Sets the cpu_usage of this SystemInfoData. + + CPU usage, in percent. # noqa: E501 + + :param cpu_usage: The cpu_usage of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._cpu_usage = cpu_usage + + @property + def cpu_count(self): + """Gets the cpu_count of this SystemInfoData. # noqa: E501 + + Total CPU usage. # noqa: E501 + + :return: The cpu_count of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._cpu_count + + @cpu_count.setter + def cpu_count(self, cpu_count): + """Sets the cpu_count of this SystemInfoData. + + Total CPU usage. # noqa: E501 + + :param cpu_count: The cpu_count of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._cpu_count = cpu_count + + @property + def memory_usage(self): + """Gets the memory_usage of this SystemInfoData. # noqa: E501 + + Memory usage, in percent. # noqa: E501 + + :return: The memory_usage of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._memory_usage + + @memory_usage.setter + def memory_usage(self, memory_usage): + """Sets the memory_usage of this SystemInfoData. + + Memory usage, in percent. # noqa: E501 + + :param memory_usage: The memory_usage of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._memory_usage = memory_usage + + @property + def total_memory(self): + """Gets the total_memory of this SystemInfoData. # noqa: E501 + + Total memory in bytes. # noqa: E501 + + :return: The total_memory of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._total_memory + + @total_memory.setter + def total_memory(self, total_memory): + """Sets the total_memory of this SystemInfoData. + + Total memory in bytes. # noqa: E501 + + :param total_memory: The total_memory of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._total_memory = total_memory + + @property + def disc_usage(self): + """Gets the disc_usage of this SystemInfoData. # noqa: E501 + + Disk usage, in percent. # noqa: E501 + + :return: The disc_usage of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._disc_usage + + @disc_usage.setter + def disc_usage(self, disc_usage): + """Sets the disc_usage of this SystemInfoData. + + Disk usage, in percent. # noqa: E501 + + :param disc_usage: The disc_usage of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._disc_usage = disc_usage + + @property + def total_disc_space(self): + """Gets the total_disc_space of this SystemInfoData. # noqa: E501 + + Total disc space in bytes. # noqa: E501 + + :return: The total_disc_space of this SystemInfoData. # noqa: E501 + :rtype: int + """ + return self._total_disc_space + + @total_disc_space.setter + def total_disc_space(self, total_disc_space): + """Sets the total_disc_space of this SystemInfoData. + + Total disc space in bytes. # noqa: E501 + + :param total_disc_space: The total_disc_space of this SystemInfoData. # noqa: E501 + :type: int + """ + + self._total_disc_space = total_disc_space + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SystemInfoData, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SystemInfoData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/tb_resource.py b/tb_rest_client/models/models_pe/tb_resource.py index 822f9010..1fed4b5b 100644 --- a/tb_rest_client/models/models_pe/tb_resource.py +++ b/tb_rest_client/models/models_pe/tb_resource.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TbResource(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/tb_resource_id.py b/tb_rest_client/models/models_pe/tb_resource_id.py index 91f49a09..c4d2769a 100644 --- a/tb_rest_client/models/models_pe/tb_resource_id.py +++ b/tb_rest_client/models/models_pe/tb_resource_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TbResourceId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/tb_resource_info.py b/tb_rest_client/models/models_pe/tb_resource_info.py index bd4f7986..5bf70c91 100644 --- a/tb_rest_client/models/models_pe/tb_resource_info.py +++ b/tb_rest_client/models/models_pe/tb_resource_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TbResourceInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/telemetry_entity_view.py b/tb_rest_client/models/models_pe/telemetry_entity_view.py index 06f9be39..37dc73cd 100644 --- a/tb_rest_client/models/models_pe/telemetry_entity_view.py +++ b/tb_rest_client/models/models_pe/telemetry_entity_view.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TelemetryEntityView(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/telemetry_mapping_configuration.py b/tb_rest_client/models/models_pe/telemetry_mapping_configuration.py index 1737dc9f..7c0d0698 100644 --- a/tb_rest_client/models/models_pe/telemetry_mapping_configuration.py +++ b/tb_rest_client/models/models_pe/telemetry_mapping_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TelemetryMappingConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/telemetry_querying_snmp_communication_config.py b/tb_rest_client/models/models_pe/telemetry_querying_snmp_communication_config.py index ad2a0d66..143947de 100644 --- a/tb_rest_client/models/models_pe/telemetry_querying_snmp_communication_config.py +++ b/tb_rest_client/models/models_pe/telemetry_querying_snmp_communication_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .snmp_communication_config import SnmpCommunicationConfig # noqa: F401,E501 +from tb_rest_client.models.models_pe.snmp_communication_config import SnmpCommunicationConfig # noqa: F401,E501 class TelemetryQueryingSnmpCommunicationConfig(SnmpCommunicationConfig): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/tenant.py b/tb_rest_client/models/models_pe/tenant.py index 980d5599..52407f30 100644 --- a/tb_rest_client/models/models_pe/tenant.py +++ b/tb_rest_client/models/models_pe/tenant.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class Tenant(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -168,9 +168,6 @@ def title(self, title): :type: str """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - self._title = title @property @@ -354,8 +351,6 @@ def address2(self, address2): :param address2: The address2 of this Tenant. # noqa: E501 :type: str """ - # if address2 is None: - # raise ValueError("Invalid value for `address2`, must not be `None`") # noqa: E501 self._address2 = address2 @@ -379,8 +374,6 @@ def zip(self, zip): :param zip: The zip of this Tenant. # noqa: E501 :type: str """ - # if zip is None: - # raise ValueError("Invalid value for `zip`, must not be `None`") # noqa: E501 self._zip = zip @@ -404,8 +397,6 @@ def phone(self, phone): :param phone: The phone of this Tenant. # noqa: E501 :type: str """ - # if phone is None: - # raise ValueError("Invalid value for `phone`, must not be `None`") # noqa: E501 self._phone = phone @@ -429,8 +420,6 @@ def email(self, email): :param email: The email of this Tenant. # noqa: E501 :type: str """ - # if email is None: - # raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 self._email = email diff --git a/tb_rest_client/models/models_pe/tenant_administrators_filter.py b/tb_rest_client/models/models_pe/tenant_administrators_filter.py new file mode 100644 index 00000000..41071d00 --- /dev/null +++ b/tb_rest_client/models/models_pe/tenant_administrators_filter.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.users_filter import UsersFilter # noqa: F401,E501 + +class TenantAdministratorsFilter(UsersFilter): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'tenant_profiles_ids': 'list[str]', + 'tenants_ids': 'list[str]' + } + if hasattr(UsersFilter, "swagger_types"): + swagger_types.update(UsersFilter.swagger_types) + + attribute_map = { + 'tenant_profiles_ids': 'tenantProfilesIds', + 'tenants_ids': 'tenantsIds' + } + if hasattr(UsersFilter, "attribute_map"): + attribute_map.update(UsersFilter.attribute_map) + + def __init__(self, tenant_profiles_ids=None, tenants_ids=None, *args, **kwargs): # noqa: E501 + """TenantAdministratorsFilter - a model defined in Swagger""" # noqa: E501 + self._tenant_profiles_ids = None + self._tenants_ids = None + self.discriminator = None + if tenant_profiles_ids is not None: + self.tenant_profiles_ids = tenant_profiles_ids + if tenants_ids is not None: + self.tenants_ids = tenants_ids + UsersFilter.__init__(self, *args, **kwargs) + + @property + def tenant_profiles_ids(self): + """Gets the tenant_profiles_ids of this TenantAdministratorsFilter. # noqa: E501 + + + :return: The tenant_profiles_ids of this TenantAdministratorsFilter. # noqa: E501 + :rtype: list[str] + """ + return self._tenant_profiles_ids + + @tenant_profiles_ids.setter + def tenant_profiles_ids(self, tenant_profiles_ids): + """Sets the tenant_profiles_ids of this TenantAdministratorsFilter. + + + :param tenant_profiles_ids: The tenant_profiles_ids of this TenantAdministratorsFilter. # noqa: E501 + :type: list[str] + """ + + self._tenant_profiles_ids = tenant_profiles_ids + + @property + def tenants_ids(self): + """Gets the tenants_ids of this TenantAdministratorsFilter. # noqa: E501 + + + :return: The tenants_ids of this TenantAdministratorsFilter. # noqa: E501 + :rtype: list[str] + """ + return self._tenants_ids + + @tenants_ids.setter + def tenants_ids(self, tenants_ids): + """Sets the tenants_ids of this TenantAdministratorsFilter. + + + :param tenants_ids: The tenants_ids of this TenantAdministratorsFilter. # noqa: E501 + :type: list[str] + """ + + self._tenants_ids = tenants_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TenantAdministratorsFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TenantAdministratorsFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/tenant_id.py b/tb_rest_client/models/models_pe/tenant_id.py index accf1430..4682483c 100644 --- a/tb_rest_client/models/models_pe/tenant_id.py +++ b/tb_rest_client/models/models_pe/tenant_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/tenant_info.py b/tb_rest_client/models/models_pe/tenant_info.py index a213f173..feba17a9 100644 --- a/tb_rest_client/models/models_pe/tenant_info.py +++ b/tb_rest_client/models/models_pe/tenant_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -264,8 +264,6 @@ def country(self, country): :param country: The country of this TenantInfo. # noqa: E501 :type: str """ - if country is None: - raise ValueError("Invalid value for `country`, must not be `None`") # noqa: E501 self._country = country @@ -289,8 +287,6 @@ def state(self, state): :param state: The state of this TenantInfo. # noqa: E501 :type: str """ - if state is None: - raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501 self._state = state @@ -314,8 +310,6 @@ def city(self, city): :param city: The city of this TenantInfo. # noqa: E501 :type: str """ - if city is None: - raise ValueError("Invalid value for `city`, must not be `None`") # noqa: E501 self._city = city @@ -339,8 +333,6 @@ def address(self, address): :param address: The address of this TenantInfo. # noqa: E501 :type: str """ - if address is None: - raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 self._address = address @@ -364,8 +356,6 @@ def address2(self, address2): :param address2: The address2 of this TenantInfo. # noqa: E501 :type: str """ - if address2 is None: - raise ValueError("Invalid value for `address2`, must not be `None`") # noqa: E501 self._address2 = address2 @@ -389,8 +379,6 @@ def zip(self, zip): :param zip: The zip of this TenantInfo. # noqa: E501 :type: str """ - if zip is None: - raise ValueError("Invalid value for `zip`, must not be `None`") # noqa: E501 self._zip = zip @@ -414,8 +402,6 @@ def phone(self, phone): :param phone: The phone of this TenantInfo. # noqa: E501 :type: str """ - if phone is None: - raise ValueError("Invalid value for `phone`, must not be `None`") # noqa: E501 self._phone = phone @@ -439,8 +425,6 @@ def email(self, email): :param email: The email of this TenantInfo. # noqa: E501 :type: str """ - if email is None: - raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 self._email = email diff --git a/tb_rest_client/models/models_pe/tenant_profile.py b/tb_rest_client/models/models_pe/tenant_profile.py index 96ab8405..11cc6a6d 100644 --- a/tb_rest_client/models/models_pe/tenant_profile.py +++ b/tb_rest_client/models/models_pe/tenant_profile.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantProfile(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -33,7 +33,6 @@ class TenantProfile(object): 'created_time': 'int', 'name': 'str', 'description': 'str', - 'isolated_tb_core': 'bool', 'isolated_tb_rule_engine': 'bool', 'profile_data': 'TenantProfileData' } @@ -44,19 +43,17 @@ class TenantProfile(object): 'created_time': 'createdTime', 'name': 'name', 'description': 'description', - 'isolated_tb_core': 'isolatedTbCore', 'isolated_tb_rule_engine': 'isolatedTbRuleEngine', 'profile_data': 'profileData' } - def __init__(self, default=None, id=None, created_time=None, name=None, description=None, isolated_tb_core=None, isolated_tb_rule_engine=None, profile_data=None): # noqa: E501 + def __init__(self, default=None, id=None, created_time=None, name=None, description=None, isolated_tb_rule_engine=None, profile_data=None): # noqa: E501 """TenantProfile - a model defined in Swagger""" # noqa: E501 self._default = None self._id = None self._created_time = None self._name = None self._description = None - self._isolated_tb_core = None self._isolated_tb_rule_engine = None self._profile_data = None self.discriminator = None @@ -70,8 +67,6 @@ def __init__(self, default=None, id=None, created_time=None, name=None, descript self.name = name if description is not None: self.description = description - if isolated_tb_core is not None: - self.isolated_tb_core = isolated_tb_core if isolated_tb_rule_engine is not None: self.isolated_tb_rule_engine = isolated_tb_rule_engine if profile_data is not None: @@ -188,29 +183,6 @@ def description(self, description): self._description = description - @property - def isolated_tb_core(self): - """Gets the isolated_tb_core of this TenantProfile. # noqa: E501 - - If enabled, will push all messages related to this tenant and processed by core platform services into separate queue. Useful for complex microservices deployments, to isolate processing of the data for specific tenants # noqa: E501 - - :return: The isolated_tb_core of this TenantProfile. # noqa: E501 - :rtype: bool - """ - return self._isolated_tb_core - - @isolated_tb_core.setter - def isolated_tb_core(self, isolated_tb_core): - """Sets the isolated_tb_core of this TenantProfile. - - If enabled, will push all messages related to this tenant and processed by core platform services into separate queue. Useful for complex microservices deployments, to isolate processing of the data for specific tenants # noqa: E501 - - :param isolated_tb_core: The isolated_tb_core of this TenantProfile. # noqa: E501 - :type: bool - """ - - self._isolated_tb_core = isolated_tb_core - @property def isolated_tb_rule_engine(self): """Gets the isolated_tb_rule_engine of this TenantProfile. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/tenant_profile_configuration.py b/tb_rest_client/models/models_pe/tenant_profile_configuration.py index 1bd16994..f9dcbd85 100644 --- a/tb_rest_client/models/models_pe/tenant_profile_configuration.py +++ b/tb_rest_client/models/models_pe/tenant_profile_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantProfileConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/tenant_profile_data.py b/tb_rest_client/models/models_pe/tenant_profile_data.py index e917d481..657f0c97 100644 --- a/tb_rest_client/models/models_pe/tenant_profile_data.py +++ b/tb_rest_client/models/models_pe/tenant_profile_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantProfileData(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/tenant_profile_id.py b/tb_rest_client/models/models_pe/tenant_profile_id.py index 12d4e219..985f32b7 100644 --- a/tb_rest_client/models/models_pe/tenant_profile_id.py +++ b/tb_rest_client/models/models_pe/tenant_profile_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantProfileId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/tenant_profile_queue_configuration.py b/tb_rest_client/models/models_pe/tenant_profile_queue_configuration.py index 53adf11e..b64cfb52 100644 --- a/tb_rest_client/models/models_pe/tenant_profile_queue_configuration.py +++ b/tb_rest_client/models/models_pe/tenant_profile_queue_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantProfileQueueConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/tenant_solution_template_details.py b/tb_rest_client/models/models_pe/tenant_solution_template_details.py index ed1065bf..1612c587 100644 --- a/tb_rest_client/models/models_pe/tenant_solution_template_details.py +++ b/tb_rest_client/models/models_pe/tenant_solution_template_details.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantSolutionTemplateDetails(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/tenant_solution_template_info.py b/tb_rest_client/models/models_pe/tenant_solution_template_info.py index b421aa7a..f50fdb19 100644 --- a/tb_rest_client/models/models_pe/tenant_solution_template_info.py +++ b/tb_rest_client/models/models_pe/tenant_solution_template_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantSolutionTemplateInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -36,7 +36,10 @@ class TenantSolutionTemplateInfo(object): 'tenant_attribute_keys': 'list[str]', 'preview_image_url': 'str', 'short_description': 'str', - 'installed': 'bool' + 'installed': 'bool', + 'video_preview_image_url': 'str', + 'preview_mp4_url': 'str', + 'preview_webm_url': 'str' } attribute_map = { @@ -48,10 +51,13 @@ class TenantSolutionTemplateInfo(object): 'tenant_attribute_keys': 'tenantAttributeKeys', 'preview_image_url': 'previewImageUrl', 'short_description': 'shortDescription', - 'installed': 'installed' + 'installed': 'installed', + 'video_preview_image_url': 'videoPreviewImageUrl', + 'preview_mp4_url': 'previewMp4Url', + 'preview_webm_url': 'previewWebmUrl' } - def __init__(self, id=None, title=None, level=None, install_timeout_ms=None, tenant_telemetry_keys=None, tenant_attribute_keys=None, preview_image_url=None, short_description=None, installed=None): # noqa: E501 + def __init__(self, id=None, title=None, level=None, install_timeout_ms=None, tenant_telemetry_keys=None, tenant_attribute_keys=None, preview_image_url=None, short_description=None, installed=None, video_preview_image_url=None, preview_mp4_url=None, preview_webm_url=None): # noqa: E501 """TenantSolutionTemplateInfo - a model defined in Swagger""" # noqa: E501 self._id = None self._title = None @@ -62,6 +68,9 @@ def __init__(self, id=None, title=None, level=None, install_timeout_ms=None, ten self._preview_image_url = None self._short_description = None self._installed = None + self._video_preview_image_url = None + self._preview_mp4_url = None + self._preview_webm_url = None self.discriminator = None if id is not None: self.id = id @@ -81,6 +90,12 @@ def __init__(self, id=None, title=None, level=None, install_timeout_ms=None, ten self.short_description = short_description if installed is not None: self.installed = installed + if video_preview_image_url is not None: + self.video_preview_image_url = video_preview_image_url + if preview_mp4_url is not None: + self.preview_mp4_url = preview_mp4_url + if preview_webm_url is not None: + self.preview_webm_url = preview_webm_url @property def id(self): @@ -295,6 +310,75 @@ def installed(self, installed): self._installed = installed + @property + def video_preview_image_url(self): + """Gets the video_preview_image_url of this TenantSolutionTemplateInfo. # noqa: E501 + + Video preview image URL # noqa: E501 + + :return: The video_preview_image_url of this TenantSolutionTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._video_preview_image_url + + @video_preview_image_url.setter + def video_preview_image_url(self, video_preview_image_url): + """Sets the video_preview_image_url of this TenantSolutionTemplateInfo. + + Video preview image URL # noqa: E501 + + :param video_preview_image_url: The video_preview_image_url of this TenantSolutionTemplateInfo. # noqa: E501 + :type: str + """ + + self._video_preview_image_url = video_preview_image_url + + @property + def preview_mp4_url(self): + """Gets the preview_mp4_url of this TenantSolutionTemplateInfo. # noqa: E501 + + Video MP4 URL # noqa: E501 + + :return: The preview_mp4_url of this TenantSolutionTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._preview_mp4_url + + @preview_mp4_url.setter + def preview_mp4_url(self, preview_mp4_url): + """Sets the preview_mp4_url of this TenantSolutionTemplateInfo. + + Video MP4 URL # noqa: E501 + + :param preview_mp4_url: The preview_mp4_url of this TenantSolutionTemplateInfo. # noqa: E501 + :type: str + """ + + self._preview_mp4_url = preview_mp4_url + + @property + def preview_webm_url(self): + """Gets the preview_webm_url of this TenantSolutionTemplateInfo. # noqa: E501 + + Video WEBM URL # noqa: E501 + + :return: The preview_webm_url of this TenantSolutionTemplateInfo. # noqa: E501 + :rtype: str + """ + return self._preview_webm_url + + @preview_webm_url.setter + def preview_webm_url(self, preview_webm_url): + """Sets the preview_webm_url of this TenantSolutionTemplateInfo. + + Video WEBM URL # noqa: E501 + + :param preview_webm_url: The preview_webm_url of this TenantSolutionTemplateInfo. # noqa: E501 + :type: str + """ + + self._preview_webm_url = preview_webm_url + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_pe/tenant_solution_template_instructions.py b/tb_rest_client/models/models_pe/tenant_solution_template_instructions.py index d712f895..1b628b3b 100644 --- a/tb_rest_client/models/models_pe/tenant_solution_template_instructions.py +++ b/tb_rest_client/models/models_pe/tenant_solution_template_instructions.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TenantSolutionTemplateInstructions(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -30,25 +30,35 @@ class TenantSolutionTemplateInstructions(object): swagger_types = { 'dashboard_group_id': 'EntityGroupId', 'dashboard_id': 'DashboardId', + 'public_id': 'CustomerId', + 'main_dashboard_public': 'bool', 'details': 'str' } attribute_map = { 'dashboard_group_id': 'dashboardGroupId', 'dashboard_id': 'dashboardId', + 'public_id': 'publicId', + 'main_dashboard_public': 'mainDashboardPublic', 'details': 'details' } - def __init__(self, dashboard_group_id=None, dashboard_id=None, details=None): # noqa: E501 + def __init__(self, dashboard_group_id=None, dashboard_id=None, public_id=None, main_dashboard_public=None, details=None): # noqa: E501 """TenantSolutionTemplateInstructions - a model defined in Swagger""" # noqa: E501 self._dashboard_group_id = None self._dashboard_id = None + self._public_id = None + self._main_dashboard_public = None self._details = None self.discriminator = None if dashboard_group_id is not None: self.dashboard_group_id = dashboard_group_id if dashboard_id is not None: self.dashboard_id = dashboard_id + if public_id is not None: + self.public_id = public_id + if main_dashboard_public is not None: + self.main_dashboard_public = main_dashboard_public if details is not None: self.details = details @@ -94,6 +104,50 @@ def dashboard_id(self, dashboard_id): self._dashboard_id = dashboard_id + @property + def public_id(self): + """Gets the public_id of this TenantSolutionTemplateInstructions. # noqa: E501 + + + :return: The public_id of this TenantSolutionTemplateInstructions. # noqa: E501 + :rtype: CustomerId + """ + return self._public_id + + @public_id.setter + def public_id(self, public_id): + """Sets the public_id of this TenantSolutionTemplateInstructions. + + + :param public_id: The public_id of this TenantSolutionTemplateInstructions. # noqa: E501 + :type: CustomerId + """ + + self._public_id = public_id + + @property + def main_dashboard_public(self): + """Gets the main_dashboard_public of this TenantSolutionTemplateInstructions. # noqa: E501 + + Is the main dashboard public # noqa: E501 + + :return: The main_dashboard_public of this TenantSolutionTemplateInstructions. # noqa: E501 + :rtype: bool + """ + return self._main_dashboard_public + + @main_dashboard_public.setter + def main_dashboard_public(self, main_dashboard_public): + """Sets the main_dashboard_public of this TenantSolutionTemplateInstructions. + + Is the main dashboard public # noqa: E501 + + :param main_dashboard_public: The main_dashboard_public of this TenantSolutionTemplateInstructions. # noqa: E501 + :type: bool + """ + + self._main_dashboard_public = main_dashboard_public + @property def details(self): """Gets the details of this TenantSolutionTemplateInstructions. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/test_sms_request.py b/tb_rest_client/models/models_pe/test_sms_request.py index 88218906..b1a71a30 100644 --- a/tb_rest_client/models/models_pe/test_sms_request.py +++ b/tb_rest_client/models/models_pe/test_sms_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TestSmsRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/thingsboard_credentials_expired_response.py b/tb_rest_client/models/models_pe/thingsboard_credentials_expired_response.py index 9d5c1526..31141142 100644 --- a/tb_rest_client/models/models_pe/thingsboard_credentials_expired_response.py +++ b/tb_rest_client/models/models_pe/thingsboard_credentials_expired_response.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ThingsboardCredentialsExpiredResponse(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/thingsboard_error_response.py b/tb_rest_client/models/models_pe/thingsboard_error_response.py index 04d6a312..73e42a17 100644 --- a/tb_rest_client/models/models_pe/thingsboard_error_response.py +++ b/tb_rest_client/models/models_pe/thingsboard_error_response.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ThingsboardErrorResponse(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/to_device_rpc_request_snmp_communication_config.py b/tb_rest_client/models/models_pe/to_device_rpc_request_snmp_communication_config.py index cc11d2cb..81f29271 100644 --- a/tb_rest_client/models/models_pe/to_device_rpc_request_snmp_communication_config.py +++ b/tb_rest_client/models/models_pe/to_device_rpc_request_snmp_communication_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class ToDeviceRpcRequestSnmpCommunicationConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/totp_two_fa_account_config.py b/tb_rest_client/models/models_pe/totp_two_fa_account_config.py index 5db09f01..937e5ea1 100644 --- a/tb_rest_client/models/models_pe/totp_two_fa_account_config.py +++ b/tb_rest_client/models/models_pe/totp_two_fa_account_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TotpTwoFaAccountConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/totp_two_fa_provider_config.py b/tb_rest_client/models/models_pe/totp_two_fa_provider_config.py index 9b3e08ad..4fdc28f1 100644 --- a/tb_rest_client/models/models_pe/totp_two_fa_provider_config.py +++ b/tb_rest_client/models/models_pe/totp_two_fa_provider_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TotpTwoFaProviderConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/transport_payload_type_configuration.py b/tb_rest_client/models/models_pe/transport_payload_type_configuration.py index 6e43c4d6..acda5cc0 100644 --- a/tb_rest_client/models/models_pe/transport_payload_type_configuration.py +++ b/tb_rest_client/models/models_pe/transport_payload_type_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TransportPayloadTypeConfiguration(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/ts_value.py b/tb_rest_client/models/models_pe/ts_value.py index 89b2ae81..c12324cd 100644 --- a/tb_rest_client/models/models_pe/ts_value.py +++ b/tb_rest_client/models/models_pe/ts_value.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TsValue(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,25 +28,51 @@ class TsValue(object): and the value is json key in definition. """ swagger_types = { + 'count': 'int', 'ts': 'int', 'value': 'str' } attribute_map = { + 'count': 'count', 'ts': 'ts', 'value': 'value' } - def __init__(self, ts=None, value=None): # noqa: E501 + def __init__(self, count=None, ts=None, value=None): # noqa: E501 """TsValue - a model defined in Swagger""" # noqa: E501 + self._count = None self._ts = None self._value = None self.discriminator = None + if count is not None: + self.count = count if ts is not None: self.ts = ts if value is not None: self.value = value + @property + def count(self): + """Gets the count of this TsValue. # noqa: E501 + + + :return: The count of this TsValue. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this TsValue. + + + :param count: The count of this TsValue. # noqa: E501 + :type: int + """ + + self._count = count + @property def ts(self): """Gets the ts of this TsValue. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/twilio_sms_provider_configuration.py b/tb_rest_client/models/models_pe/twilio_sms_provider_configuration.py index f8df9aa6..5ecd076d 100644 --- a/tb_rest_client/models/models_pe/twilio_sms_provider_configuration.py +++ b/tb_rest_client/models/models_pe/twilio_sms_provider_configuration.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 +from tb_rest_client.models.models_pe.sms_provider_configuration import SmsProviderConfiguration # noqa: F401,E501 class TwilioSmsProviderConfiguration(SmsProviderConfiguration): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/tb_rest_client/models/models_pe/two_fa_account_config.py b/tb_rest_client/models/models_pe/two_fa_account_config.py index 1084cb6c..1e08cb59 100644 --- a/tb_rest_client/models/models_pe/two_fa_account_config.py +++ b/tb_rest_client/models/models_pe/two_fa_account_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TwoFaAccountConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/two_fa_account_config_update_request.py b/tb_rest_client/models/models_pe/two_fa_account_config_update_request.py index 84f76f09..d02ce0ab 100644 --- a/tb_rest_client/models/models_pe/two_fa_account_config_update_request.py +++ b/tb_rest_client/models/models_pe/two_fa_account_config_update_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TwoFaAccountConfigUpdateRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/two_fa_provider_config.py b/tb_rest_client/models/models_pe/two_fa_provider_config.py index 0f0c1139..5880d9b6 100644 --- a/tb_rest_client/models/models_pe/two_fa_provider_config.py +++ b/tb_rest_client/models/models_pe/two_fa_provider_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TwoFaProviderConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/two_fa_provider_info.py b/tb_rest_client/models/models_pe/two_fa_provider_info.py index d01db2e4..e3318626 100644 --- a/tb_rest_client/models/models_pe/two_fa_provider_info.py +++ b/tb_rest_client/models/models_pe/two_fa_provider_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class TwoFaProviderInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/update_message.py b/tb_rest_client/models/models_pe/update_message.py index 27f418ef..47b5f070 100644 --- a/tb_rest_client/models/models_pe/update_message.py +++ b/tb_rest_client/models/models_pe/update_message.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class UpdateMessage(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -29,28 +29,49 @@ class UpdateMessage(object): """ swagger_types = { 'update_available': 'bool', - 'message': 'str' + 'current_version': 'str', + 'latest_version': 'str', + 'upgrade_instructions_url': 'str', + 'current_version_release_notes_url': 'str', + 'latest_version_release_notes_url': 'str' } attribute_map = { 'update_available': 'updateAvailable', - 'message': 'message' + 'current_version': 'currentVersion', + 'latest_version': 'latestVersion', + 'upgrade_instructions_url': 'upgradeInstructionsUrl', + 'current_version_release_notes_url': 'currentVersionReleaseNotesUrl', + 'latest_version_release_notes_url': 'latestVersionReleaseNotesUrl' } - def __init__(self, update_available=None, message=None): # noqa: E501 + def __init__(self, update_available=None, current_version=None, latest_version=None, upgrade_instructions_url=None, current_version_release_notes_url=None, latest_version_release_notes_url=None): # noqa: E501 """UpdateMessage - a model defined in Swagger""" # noqa: E501 self._update_available = None - self._message = None + self._current_version = None + self._latest_version = None + self._upgrade_instructions_url = None + self._current_version_release_notes_url = None + self._latest_version_release_notes_url = None self.discriminator = None if update_available is not None: self.update_available = update_available - if message is not None: - self.message = message + if current_version is not None: + self.current_version = current_version + if latest_version is not None: + self.latest_version = latest_version + if upgrade_instructions_url is not None: + self.upgrade_instructions_url = upgrade_instructions_url + if current_version_release_notes_url is not None: + self.current_version_release_notes_url = current_version_release_notes_url + if latest_version_release_notes_url is not None: + self.latest_version_release_notes_url = latest_version_release_notes_url @property def update_available(self): """Gets the update_available of this UpdateMessage. # noqa: E501 + 'True' if new platform update is available. # noqa: E501 :return: The update_available of this UpdateMessage. # noqa: E501 :rtype: bool @@ -61,6 +82,7 @@ def update_available(self): def update_available(self, update_available): """Sets the update_available of this UpdateMessage. + 'True' if new platform update is available. # noqa: E501 :param update_available: The update_available of this UpdateMessage. # noqa: E501 :type: bool @@ -69,27 +91,119 @@ def update_available(self, update_available): self._update_available = update_available @property - def message(self): - """Gets the message of this UpdateMessage. # noqa: E501 + def current_version(self): + """Gets the current_version of this UpdateMessage. # noqa: E501 + + Current ThingsBoard version. # noqa: E501 + + :return: The current_version of this UpdateMessage. # noqa: E501 + :rtype: str + """ + return self._current_version + + @current_version.setter + def current_version(self, current_version): + """Sets the current_version of this UpdateMessage. + + Current ThingsBoard version. # noqa: E501 + + :param current_version: The current_version of this UpdateMessage. # noqa: E501 + :type: str + """ + + self._current_version = current_version + + @property + def latest_version(self): + """Gets the latest_version of this UpdateMessage. # noqa: E501 + + Latest ThingsBoard version. # noqa: E501 + + :return: The latest_version of this UpdateMessage. # noqa: E501 + :rtype: str + """ + return self._latest_version + + @latest_version.setter + def latest_version(self, latest_version): + """Sets the latest_version of this UpdateMessage. + + Latest ThingsBoard version. # noqa: E501 + + :param latest_version: The latest_version of this UpdateMessage. # noqa: E501 + :type: str + """ + + self._latest_version = latest_version + + @property + def upgrade_instructions_url(self): + """Gets the upgrade_instructions_url of this UpdateMessage. # noqa: E501 + + Upgrade instructions URL. # noqa: E501 + + :return: The upgrade_instructions_url of this UpdateMessage. # noqa: E501 + :rtype: str + """ + return self._upgrade_instructions_url + + @upgrade_instructions_url.setter + def upgrade_instructions_url(self, upgrade_instructions_url): + """Sets the upgrade_instructions_url of this UpdateMessage. + + Upgrade instructions URL. # noqa: E501 + + :param upgrade_instructions_url: The upgrade_instructions_url of this UpdateMessage. # noqa: E501 + :type: str + """ + + self._upgrade_instructions_url = upgrade_instructions_url + + @property + def current_version_release_notes_url(self): + """Gets the current_version_release_notes_url of this UpdateMessage. # noqa: E501 + + Current ThingsBoard version release notes URL. # noqa: E501 + + :return: The current_version_release_notes_url of this UpdateMessage. # noqa: E501 + :rtype: str + """ + return self._current_version_release_notes_url + + @current_version_release_notes_url.setter + def current_version_release_notes_url(self, current_version_release_notes_url): + """Sets the current_version_release_notes_url of this UpdateMessage. + + Current ThingsBoard version release notes URL. # noqa: E501 + + :param current_version_release_notes_url: The current_version_release_notes_url of this UpdateMessage. # noqa: E501 + :type: str + """ + + self._current_version_release_notes_url = current_version_release_notes_url + + @property + def latest_version_release_notes_url(self): + """Gets the latest_version_release_notes_url of this UpdateMessage. # noqa: E501 - The message about new platform update available. # noqa: E501 + Latest ThingsBoard version release notes URL. # noqa: E501 - :return: The message of this UpdateMessage. # noqa: E501 + :return: The latest_version_release_notes_url of this UpdateMessage. # noqa: E501 :rtype: str """ - return self._message + return self._latest_version_release_notes_url - @message.setter - def message(self, message): - """Sets the message of this UpdateMessage. + @latest_version_release_notes_url.setter + def latest_version_release_notes_url(self, latest_version_release_notes_url): + """Sets the latest_version_release_notes_url of this UpdateMessage. - The message about new platform update available. # noqa: E501 + Latest ThingsBoard version release notes URL. # noqa: E501 - :param message: The message of this UpdateMessage. # noqa: E501 + :param latest_version_release_notes_url: The latest_version_release_notes_url of this UpdateMessage. # noqa: E501 :type: str """ - self._message = message + self._latest_version_release_notes_url = latest_version_release_notes_url def to_dict(self): """Returns the model properties as a dict""" diff --git a/tb_rest_client/models/models_pe/usage_info.py b/tb_rest_client/models/models_pe/usage_info.py new file mode 100644 index 00000000..291e39bd --- /dev/null +++ b/tb_rest_client/models/models_pe/usage_info.py @@ -0,0 +1,604 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UsageInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'alarms': 'int', + 'assets': 'int', + 'customers': 'int', + 'dashboards': 'int', + 'devices': 'int', + 'emails': 'int', + 'js_executions': 'int', + 'max_alarms': 'int', + 'max_assets': 'int', + 'max_customers': 'int', + 'max_dashboards': 'int', + 'max_devices': 'int', + 'max_emails': 'int', + 'max_js_executions': 'int', + 'max_sms': 'int', + 'max_transport_messages': 'int', + 'max_users': 'int', + 'sms': 'int', + 'transport_messages': 'int', + 'users': 'int' + } + + attribute_map = { + 'alarms': 'alarms', + 'assets': 'assets', + 'customers': 'customers', + 'dashboards': 'dashboards', + 'devices': 'devices', + 'emails': 'emails', + 'js_executions': 'jsExecutions', + 'max_alarms': 'maxAlarms', + 'max_assets': 'maxAssets', + 'max_customers': 'maxCustomers', + 'max_dashboards': 'maxDashboards', + 'max_devices': 'maxDevices', + 'max_emails': 'maxEmails', + 'max_js_executions': 'maxJsExecutions', + 'max_sms': 'maxSms', + 'max_transport_messages': 'maxTransportMessages', + 'max_users': 'maxUsers', + 'sms': 'sms', + 'transport_messages': 'transportMessages', + 'users': 'users' + } + + def __init__(self, alarms=None, assets=None, customers=None, dashboards=None, devices=None, emails=None, js_executions=None, max_alarms=None, max_assets=None, max_customers=None, max_dashboards=None, max_devices=None, max_emails=None, max_js_executions=None, max_sms=None, max_transport_messages=None, max_users=None, sms=None, transport_messages=None, users=None): # noqa: E501 + """UsageInfo - a model defined in Swagger""" # noqa: E501 + self._alarms = None + self._assets = None + self._customers = None + self._dashboards = None + self._devices = None + self._emails = None + self._js_executions = None + self._max_alarms = None + self._max_assets = None + self._max_customers = None + self._max_dashboards = None + self._max_devices = None + self._max_emails = None + self._max_js_executions = None + self._max_sms = None + self._max_transport_messages = None + self._max_users = None + self._sms = None + self._transport_messages = None + self._users = None + self.discriminator = None + if alarms is not None: + self.alarms = alarms + if assets is not None: + self.assets = assets + if customers is not None: + self.customers = customers + if dashboards is not None: + self.dashboards = dashboards + if devices is not None: + self.devices = devices + if emails is not None: + self.emails = emails + if js_executions is not None: + self.js_executions = js_executions + if max_alarms is not None: + self.max_alarms = max_alarms + if max_assets is not None: + self.max_assets = max_assets + if max_customers is not None: + self.max_customers = max_customers + if max_dashboards is not None: + self.max_dashboards = max_dashboards + if max_devices is not None: + self.max_devices = max_devices + if max_emails is not None: + self.max_emails = max_emails + if max_js_executions is not None: + self.max_js_executions = max_js_executions + if max_sms is not None: + self.max_sms = max_sms + if max_transport_messages is not None: + self.max_transport_messages = max_transport_messages + if max_users is not None: + self.max_users = max_users + if sms is not None: + self.sms = sms + if transport_messages is not None: + self.transport_messages = transport_messages + if users is not None: + self.users = users + + @property + def alarms(self): + """Gets the alarms of this UsageInfo. # noqa: E501 + + + :return: The alarms of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._alarms + + @alarms.setter + def alarms(self, alarms): + """Sets the alarms of this UsageInfo. + + + :param alarms: The alarms of this UsageInfo. # noqa: E501 + :type: int + """ + + self._alarms = alarms + + @property + def assets(self): + """Gets the assets of this UsageInfo. # noqa: E501 + + + :return: The assets of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._assets + + @assets.setter + def assets(self, assets): + """Sets the assets of this UsageInfo. + + + :param assets: The assets of this UsageInfo. # noqa: E501 + :type: int + """ + + self._assets = assets + + @property + def customers(self): + """Gets the customers of this UsageInfo. # noqa: E501 + + + :return: The customers of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._customers + + @customers.setter + def customers(self, customers): + """Sets the customers of this UsageInfo. + + + :param customers: The customers of this UsageInfo. # noqa: E501 + :type: int + """ + + self._customers = customers + + @property + def dashboards(self): + """Gets the dashboards of this UsageInfo. # noqa: E501 + + + :return: The dashboards of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._dashboards + + @dashboards.setter + def dashboards(self, dashboards): + """Sets the dashboards of this UsageInfo. + + + :param dashboards: The dashboards of this UsageInfo. # noqa: E501 + :type: int + """ + + self._dashboards = dashboards + + @property + def devices(self): + """Gets the devices of this UsageInfo. # noqa: E501 + + + :return: The devices of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._devices + + @devices.setter + def devices(self, devices): + """Sets the devices of this UsageInfo. + + + :param devices: The devices of this UsageInfo. # noqa: E501 + :type: int + """ + + self._devices = devices + + @property + def emails(self): + """Gets the emails of this UsageInfo. # noqa: E501 + + + :return: The emails of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails of this UsageInfo. + + + :param emails: The emails of this UsageInfo. # noqa: E501 + :type: int + """ + + self._emails = emails + + @property + def js_executions(self): + """Gets the js_executions of this UsageInfo. # noqa: E501 + + + :return: The js_executions of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._js_executions + + @js_executions.setter + def js_executions(self, js_executions): + """Sets the js_executions of this UsageInfo. + + + :param js_executions: The js_executions of this UsageInfo. # noqa: E501 + :type: int + """ + + self._js_executions = js_executions + + @property + def max_alarms(self): + """Gets the max_alarms of this UsageInfo. # noqa: E501 + + + :return: The max_alarms of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_alarms + + @max_alarms.setter + def max_alarms(self, max_alarms): + """Sets the max_alarms of this UsageInfo. + + + :param max_alarms: The max_alarms of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_alarms = max_alarms + + @property + def max_assets(self): + """Gets the max_assets of this UsageInfo. # noqa: E501 + + + :return: The max_assets of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_assets + + @max_assets.setter + def max_assets(self, max_assets): + """Sets the max_assets of this UsageInfo. + + + :param max_assets: The max_assets of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_assets = max_assets + + @property + def max_customers(self): + """Gets the max_customers of this UsageInfo. # noqa: E501 + + + :return: The max_customers of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_customers + + @max_customers.setter + def max_customers(self, max_customers): + """Sets the max_customers of this UsageInfo. + + + :param max_customers: The max_customers of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_customers = max_customers + + @property + def max_dashboards(self): + """Gets the max_dashboards of this UsageInfo. # noqa: E501 + + + :return: The max_dashboards of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_dashboards + + @max_dashboards.setter + def max_dashboards(self, max_dashboards): + """Sets the max_dashboards of this UsageInfo. + + + :param max_dashboards: The max_dashboards of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_dashboards = max_dashboards + + @property + def max_devices(self): + """Gets the max_devices of this UsageInfo. # noqa: E501 + + + :return: The max_devices of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_devices + + @max_devices.setter + def max_devices(self, max_devices): + """Sets the max_devices of this UsageInfo. + + + :param max_devices: The max_devices of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_devices = max_devices + + @property + def max_emails(self): + """Gets the max_emails of this UsageInfo. # noqa: E501 + + + :return: The max_emails of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_emails + + @max_emails.setter + def max_emails(self, max_emails): + """Sets the max_emails of this UsageInfo. + + + :param max_emails: The max_emails of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_emails = max_emails + + @property + def max_js_executions(self): + """Gets the max_js_executions of this UsageInfo. # noqa: E501 + + + :return: The max_js_executions of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_js_executions + + @max_js_executions.setter + def max_js_executions(self, max_js_executions): + """Sets the max_js_executions of this UsageInfo. + + + :param max_js_executions: The max_js_executions of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_js_executions = max_js_executions + + @property + def max_sms(self): + """Gets the max_sms of this UsageInfo. # noqa: E501 + + + :return: The max_sms of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_sms + + @max_sms.setter + def max_sms(self, max_sms): + """Sets the max_sms of this UsageInfo. + + + :param max_sms: The max_sms of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_sms = max_sms + + @property + def max_transport_messages(self): + """Gets the max_transport_messages of this UsageInfo. # noqa: E501 + + + :return: The max_transport_messages of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_transport_messages + + @max_transport_messages.setter + def max_transport_messages(self, max_transport_messages): + """Sets the max_transport_messages of this UsageInfo. + + + :param max_transport_messages: The max_transport_messages of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_transport_messages = max_transport_messages + + @property + def max_users(self): + """Gets the max_users of this UsageInfo. # noqa: E501 + + + :return: The max_users of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._max_users + + @max_users.setter + def max_users(self, max_users): + """Sets the max_users of this UsageInfo. + + + :param max_users: The max_users of this UsageInfo. # noqa: E501 + :type: int + """ + + self._max_users = max_users + + @property + def sms(self): + """Gets the sms of this UsageInfo. # noqa: E501 + + + :return: The sms of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._sms + + @sms.setter + def sms(self, sms): + """Sets the sms of this UsageInfo. + + + :param sms: The sms of this UsageInfo. # noqa: E501 + :type: int + """ + + self._sms = sms + + @property + def transport_messages(self): + """Gets the transport_messages of this UsageInfo. # noqa: E501 + + + :return: The transport_messages of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._transport_messages + + @transport_messages.setter + def transport_messages(self, transport_messages): + """Sets the transport_messages of this UsageInfo. + + + :param transport_messages: The transport_messages of this UsageInfo. # noqa: E501 + :type: int + """ + + self._transport_messages = transport_messages + + @property + def users(self): + """Gets the users of this UsageInfo. # noqa: E501 + + + :return: The users of this UsageInfo. # noqa: E501 + :rtype: int + """ + return self._users + + @users.setter + def users(self, users): + """Sets the users of this UsageInfo. + + + :param users: The users of this UsageInfo. # noqa: E501 + :type: int + """ + + self._users = users + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UsageInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UsageInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/user.py b/tb_rest_client/models/models_pe/user.py index 6b6af7bf..276d9ccb 100644 --- a/tb_rest_client/models/models_pe/user.py +++ b/tb_rest_client/models/models_pe/user.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class User(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -37,6 +37,7 @@ class User(object): 'authority': 'str', 'first_name': 'str', 'last_name': 'str', + 'phone': 'str', 'additional_info': 'JsonNode', 'owner_id': 'EntityId' } @@ -51,21 +52,23 @@ class User(object): 'authority': 'authority', 'first_name': 'firstName', 'last_name': 'lastName', + 'phone': 'phone', 'additional_info': 'additionalInfo', 'owner_id': 'ownerId' } - def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, email=None, name=None, authority=None, first_name=None, last_name=None, additional_info=None, owner_id=None): # noqa: E501 + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, email=None, name=None, authority=None, first_name=None, last_name=None, phone=None, additional_info=None, owner_id=None): # noqa: E501 """User - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None self._tenant_id = None self._customer_id = None self._email = None - self._name = "" + self._name = None self._authority = None - self._first_name = "" - self._last_name = "" + self._first_name = None + self._last_name = None + self._phone = None self._additional_info = None self._owner_id = None self.discriminator = None @@ -81,10 +84,9 @@ def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, if name is not None: self.name = name self.authority = authority - if first_name is not None: - self.first_name = first_name - if last_name is not None: - self.last_name = last_name + self.first_name = first_name + self.last_name = last_name + self.phone = phone if additional_info is not None: self.additional_info = additional_info if owner_id is not None: @@ -196,8 +198,6 @@ def email(self, email): :param email: The email of this User. # noqa: E501 :type: str """ - if email is None: - raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 self._email = email @@ -275,8 +275,6 @@ def first_name(self, first_name): :param first_name: The first_name of this User. # noqa: E501 :type: str """ - if first_name is None: - self._first_name = "" self._first_name = first_name @@ -300,11 +298,34 @@ def last_name(self, last_name): :param last_name: The last_name of this User. # noqa: E501 :type: str """ - if last_name is None: - self._last_name = "" self._last_name = last_name + @property + def phone(self): + """Gets the phone of this User. # noqa: E501 + + Phone number of the user # noqa: E501 + + :return: The phone of this User. # noqa: E501 + :rtype: str + """ + return self._phone + + @phone.setter + def phone(self, phone): + """Sets the phone of this User. + + Phone number of the user # noqa: E501 + + :param phone: The phone of this User. # noqa: E501 + :type: str + """ + # if phone is None: + # raise ValueError("Invalid value for `phone`, must not be `None`") # noqa: E501 + + self._phone = phone + @property def additional_info(self): """Gets the additional_info of this User. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/user_dashboards_info.py b/tb_rest_client/models/models_pe/user_dashboards_info.py new file mode 100644 index 00000000..aae8bb8e --- /dev/null +++ b/tb_rest_client/models/models_pe/user_dashboards_info.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserDashboardsInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'last': 'list[LastVisitedDashboardInfo]', + 'starred': 'list[StarredDashboardInfo]' + } + + attribute_map = { + 'last': 'last', + 'starred': 'starred' + } + + def __init__(self, last=None, starred=None): # noqa: E501 + """UserDashboardsInfo - a model defined in Swagger""" # noqa: E501 + self._last = None + self._starred = None + self.discriminator = None + if last is not None: + self.last = last + if starred is not None: + self.starred = starred + + @property + def last(self): + """Gets the last of this UserDashboardsInfo. # noqa: E501 + + List of last visited dashboards. # noqa: E501 + + :return: The last of this UserDashboardsInfo. # noqa: E501 + :rtype: list[LastVisitedDashboardInfo] + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this UserDashboardsInfo. + + List of last visited dashboards. # noqa: E501 + + :param last: The last of this UserDashboardsInfo. # noqa: E501 + :type: list[LastVisitedDashboardInfo] + """ + + self._last = last + + @property + def starred(self): + """Gets the starred of this UserDashboardsInfo. # noqa: E501 + + List of starred dashboards. # noqa: E501 + + :return: The starred of this UserDashboardsInfo. # noqa: E501 + :rtype: list[StarredDashboardInfo] + """ + return self._starred + + @starred.setter + def starred(self, starred): + """Sets the starred of this UserDashboardsInfo. + + List of starred dashboards. # noqa: E501 + + :param starred: The starred of this UserDashboardsInfo. # noqa: E501 + :type: list[StarredDashboardInfo] + """ + + self._starred = starred + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserDashboardsInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserDashboardsInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/user_email_info.py b/tb_rest_client/models/models_pe/user_email_info.py new file mode 100644 index 00000000..426a2c16 --- /dev/null +++ b/tb_rest_client/models/models_pe/user_email_info.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserEmailInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'UserId', + 'email': 'str', + 'first_name': 'str', + 'last_name': 'str' + } + + attribute_map = { + 'id': 'id', + 'email': 'email', + 'first_name': 'firstName', + 'last_name': 'lastName' + } + + def __init__(self, id=None, email=None, first_name=None, last_name=None): # noqa: E501 + """UserEmailInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._email = None + self._first_name = None + self._last_name = None + self.discriminator = None + if id is not None: + self.id = id + if email is not None: + self.email = email + if first_name is not None: + self.first_name = first_name + if last_name is not None: + self.last_name = last_name + + @property + def id(self): + """Gets the id of this UserEmailInfo. # noqa: E501 + + + :return: The id of this UserEmailInfo. # noqa: E501 + :rtype: UserId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserEmailInfo. + + + :param id: The id of this UserEmailInfo. # noqa: E501 + :type: UserId + """ + + self._id = id + + @property + def email(self): + """Gets the email of this UserEmailInfo. # noqa: E501 + + User email # noqa: E501 + + :return: The email of this UserEmailInfo. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this UserEmailInfo. + + User email # noqa: E501 + + :param email: The email of this UserEmailInfo. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def first_name(self): + """Gets the first_name of this UserEmailInfo. # noqa: E501 + + User first name # noqa: E501 + + :return: The first_name of this UserEmailInfo. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this UserEmailInfo. + + User first name # noqa: E501 + + :param first_name: The first_name of this UserEmailInfo. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this UserEmailInfo. # noqa: E501 + + User last name # noqa: E501 + + :return: The last_name of this UserEmailInfo. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this UserEmailInfo. + + User last name # noqa: E501 + + :param last_name: The last_name of this UserEmailInfo. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserEmailInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserEmailInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/user_group_list_filter.py b/tb_rest_client/models/models_pe/user_group_list_filter.py new file mode 100644 index 00000000..3d21d0bd --- /dev/null +++ b/tb_rest_client/models/models_pe/user_group_list_filter.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.users_filter import UsersFilter # noqa: F401,E501 + +class UserGroupListFilter(UsersFilter): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'groups_ids': 'list[str]' + } + if hasattr(UsersFilter, "swagger_types"): + swagger_types.update(UsersFilter.swagger_types) + + attribute_map = { + 'groups_ids': 'groupsIds' + } + if hasattr(UsersFilter, "attribute_map"): + attribute_map.update(UsersFilter.attribute_map) + + def __init__(self, groups_ids=None, *args, **kwargs): # noqa: E501 + """UserGroupListFilter - a model defined in Swagger""" # noqa: E501 + self._groups_ids = None + self.discriminator = None + if groups_ids is not None: + self.groups_ids = groups_ids + UsersFilter.__init__(self, *args, **kwargs) + + @property + def groups_ids(self): + """Gets the groups_ids of this UserGroupListFilter. # noqa: E501 + + + :return: The groups_ids of this UserGroupListFilter. # noqa: E501 + :rtype: list[str] + """ + return self._groups_ids + + @groups_ids.setter + def groups_ids(self, groups_ids): + """Sets the groups_ids of this UserGroupListFilter. + + + :param groups_ids: The groups_ids of this UserGroupListFilter. # noqa: E501 + :type: list[str] + """ + + self._groups_ids = groups_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserGroupListFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserGroupListFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/user_id.py b/tb_rest_client/models/models_pe/user_id.py index 62f35320..2dafc0ab 100644 --- a/tb_rest_client/models/models_pe/user_id.py +++ b/tb_rest_client/models/models_pe/user_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class UserId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/user_info.py b/tb_rest_client/models/models_pe/user_info.py new file mode 100644 index 00000000..e06b508e --- /dev/null +++ b/tb_rest_client/models/models_pe/user_info.py @@ -0,0 +1,469 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserInfo(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'UserId', + 'created_time': 'int', + 'tenant_id': 'TenantId', + 'customer_id': 'CustomerId', + 'email': 'str', + 'name': 'str', + 'authority': 'str', + 'first_name': 'str', + 'last_name': 'str', + 'phone': 'str', + 'additional_info': 'JsonNode', + 'owner_id': 'EntityId', + 'owner_name': 'str', + 'groups': 'list[EntityInfo]' + } + + attribute_map = { + 'id': 'id', + 'created_time': 'createdTime', + 'tenant_id': 'tenantId', + 'customer_id': 'customerId', + 'email': 'email', + 'name': 'name', + 'authority': 'authority', + 'first_name': 'firstName', + 'last_name': 'lastName', + 'phone': 'phone', + 'additional_info': 'additionalInfo', + 'owner_id': 'ownerId', + 'owner_name': 'ownerName', + 'groups': 'groups' + } + + def __init__(self, id=None, created_time=None, tenant_id=None, customer_id=None, email=None, name=None, authority=None, first_name=None, last_name=None, phone=None, additional_info=None, owner_id=None, owner_name=None, groups=None): # noqa: E501 + """UserInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_time = None + self._tenant_id = None + self._customer_id = None + self._email = None + self._name = None + self._authority = None + self._first_name = None + self._last_name = None + self._phone = None + self._additional_info = None + self._owner_id = None + self._owner_name = None + self._groups = None + self.discriminator = None + if id is not None: + self.id = id + if created_time is not None: + self.created_time = created_time + if tenant_id is not None: + self.tenant_id = tenant_id + if customer_id is not None: + self.customer_id = customer_id + self.email = email + if name is not None: + self.name = name + self.authority = authority + self.first_name = first_name + self.last_name = last_name + self.phone = phone + if additional_info is not None: + self.additional_info = additional_info + if owner_id is not None: + self.owner_id = owner_id + if owner_name is not None: + self.owner_name = owner_name + if groups is not None: + self.groups = groups + + @property + def id(self): + """Gets the id of this UserInfo. # noqa: E501 + + + :return: The id of this UserInfo. # noqa: E501 + :rtype: UserId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserInfo. + + + :param id: The id of this UserInfo. # noqa: E501 + :type: UserId + """ + + self._id = id + + @property + def created_time(self): + """Gets the created_time of this UserInfo. # noqa: E501 + + Timestamp of the user creation, in milliseconds # noqa: E501 + + :return: The created_time of this UserInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this UserInfo. + + Timestamp of the user creation, in milliseconds # noqa: E501 + + :param created_time: The created_time of this UserInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def tenant_id(self): + """Gets the tenant_id of this UserInfo. # noqa: E501 + + + :return: The tenant_id of this UserInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this UserInfo. + + + :param tenant_id: The tenant_id of this UserInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def customer_id(self): + """Gets the customer_id of this UserInfo. # noqa: E501 + + + :return: The customer_id of this UserInfo. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this UserInfo. + + + :param customer_id: The customer_id of this UserInfo. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def email(self): + """Gets the email of this UserInfo. # noqa: E501 + + Email of the user # noqa: E501 + + :return: The email of this UserInfo. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this UserInfo. + + Email of the user # noqa: E501 + + :param email: The email of this UserInfo. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def name(self): + """Gets the name of this UserInfo. # noqa: E501 + + Duplicates the email of the user, readonly # noqa: E501 + + :return: The name of this UserInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UserInfo. + + Duplicates the email of the user, readonly # noqa: E501 + + :param name: The name of this UserInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def authority(self): + """Gets the authority of this UserInfo. # noqa: E501 + + Authority # noqa: E501 + + :return: The authority of this UserInfo. # noqa: E501 + :rtype: str + """ + return self._authority + + @authority.setter + def authority(self, authority): + """Sets the authority of this UserInfo. + + Authority # noqa: E501 + + :param authority: The authority of this UserInfo. # noqa: E501 + :type: str + """ + if authority is None: + raise ValueError("Invalid value for `authority`, must not be `None`") # noqa: E501 + allowed_values = ["CUSTOMER_USER", "PRE_VERIFICATION_TOKEN", "REFRESH_TOKEN", "SYS_ADMIN", "TENANT_ADMIN"] # noqa: E501 + if authority not in allowed_values: + raise ValueError( + "Invalid value for `authority` ({0}), must be one of {1}" # noqa: E501 + .format(authority, allowed_values) + ) + + self._authority = authority + + @property + def first_name(self): + """Gets the first_name of this UserInfo. # noqa: E501 + + First name of the user # noqa: E501 + + :return: The first_name of this UserInfo. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this UserInfo. + + First name of the user # noqa: E501 + + :param first_name: The first_name of this UserInfo. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this UserInfo. # noqa: E501 + + Last name of the user # noqa: E501 + + :return: The last_name of this UserInfo. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this UserInfo. + + Last name of the user # noqa: E501 + + :param last_name: The last_name of this UserInfo. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + @property + def phone(self): + """Gets the phone of this UserInfo. # noqa: E501 + + Phone number of the user # noqa: E501 + + :return: The phone of this UserInfo. # noqa: E501 + :rtype: str + """ + return self._phone + + @phone.setter + def phone(self, phone): + """Sets the phone of this UserInfo. + + Phone number of the user # noqa: E501 + + :param phone: The phone of this UserInfo. # noqa: E501 + :type: str + """ + + self._phone = phone + + @property + def additional_info(self): + """Gets the additional_info of this UserInfo. # noqa: E501 + + + :return: The additional_info of this UserInfo. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this UserInfo. + + + :param additional_info: The additional_info of this UserInfo. # noqa: E501 + :type: JsonNode + """ + + self._additional_info = additional_info + + @property + def owner_id(self): + """Gets the owner_id of this UserInfo. # noqa: E501 + + + :return: The owner_id of this UserInfo. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this UserInfo. + + + :param owner_id: The owner_id of this UserInfo. # noqa: E501 + :type: EntityId + """ + + self._owner_id = owner_id + + @property + def owner_name(self): + """Gets the owner_name of this UserInfo. # noqa: E501 + + Owner name # noqa: E501 + + :return: The owner_name of this UserInfo. # noqa: E501 + :rtype: str + """ + return self._owner_name + + @owner_name.setter + def owner_name(self, owner_name): + """Sets the owner_name of this UserInfo. + + Owner name # noqa: E501 + + :param owner_name: The owner_name of this UserInfo. # noqa: E501 + :type: str + """ + + self._owner_name = owner_name + + @property + def groups(self): + """Gets the groups of this UserInfo. # noqa: E501 + + Groups # noqa: E501 + + :return: The groups of this UserInfo. # noqa: E501 + :rtype: list[EntityInfo] + """ + return self._groups + + @groups.setter + def groups(self, groups): + """Sets the groups of this UserInfo. + + Groups # noqa: E501 + + :param groups: The groups of this UserInfo. # noqa: E501 + :type: list[EntityInfo] + """ + + self._groups = groups + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/user_list_filter.py b/tb_rest_client/models/models_pe/user_list_filter.py new file mode 100644 index 00000000..e0615d59 --- /dev/null +++ b/tb_rest_client/models/models_pe/user_list_filter.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserListFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'users_ids': 'list[str]' + } + + attribute_map = { + 'users_ids': 'usersIds' + } + + def __init__(self, users_ids=None): # noqa: E501 + """UserListFilter - a model defined in Swagger""" # noqa: E501 + self._users_ids = None + self.discriminator = None + if users_ids is not None: + self.users_ids = users_ids + + @property + def users_ids(self): + """Gets the users_ids of this UserListFilter. # noqa: E501 + + + :return: The users_ids of this UserListFilter. # noqa: E501 + :rtype: list[str] + """ + return self._users_ids + + @users_ids.setter + def users_ids(self, users_ids): + """Sets the users_ids of this UserListFilter. + + + :param users_ids: The users_ids of this UserListFilter. # noqa: E501 + :type: list[str] + """ + + self._users_ids = users_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserListFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserListFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/user_password_policy.py b/tb_rest_client/models/models_pe/user_password_policy.py index 690eb2d8..574713ab 100644 --- a/tb_rest_client/models/models_pe/user_password_policy.py +++ b/tb_rest_client/models/models_pe/user_password_policy.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class UserPasswordPolicy(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/user_role_filter.py b/tb_rest_client/models/models_pe/user_role_filter.py new file mode 100644 index 00000000..7bd08c49 --- /dev/null +++ b/tb_rest_client/models/models_pe/user_role_filter.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.users_filter import UsersFilter # noqa: F401,E501 + +class UserRoleFilter(UsersFilter): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'roles_ids': 'list[str]' + } + if hasattr(UsersFilter, "swagger_types"): + swagger_types.update(UsersFilter.swagger_types) + + attribute_map = { + 'roles_ids': 'rolesIds' + } + if hasattr(UsersFilter, "attribute_map"): + attribute_map.update(UsersFilter.attribute_map) + + def __init__(self, roles_ids=None, *args, **kwargs): # noqa: E501 + """UserRoleFilter - a model defined in Swagger""" # noqa: E501 + self._roles_ids = None + self.discriminator = None + if roles_ids is not None: + self.roles_ids = roles_ids + UsersFilter.__init__(self, *args, **kwargs) + + @property + def roles_ids(self): + """Gets the roles_ids of this UserRoleFilter. # noqa: E501 + + + :return: The roles_ids of this UserRoleFilter. # noqa: E501 + :rtype: list[str] + """ + return self._roles_ids + + @roles_ids.setter + def roles_ids(self, roles_ids): + """Sets the roles_ids of this UserRoleFilter. + + + :param roles_ids: The roles_ids of this UserRoleFilter. # noqa: E501 + :type: list[str] + """ + + self._roles_ids = roles_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserRoleFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserRoleFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/users_filter.py b/tb_rest_client/models/models_pe/users_filter.py new file mode 100644 index 00000000..71026654 --- /dev/null +++ b/tb_rest_client/models/models_pe/users_filter.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UsersFilter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """UsersFilter - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UsersFilter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UsersFilter): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/version_create_config.py b/tb_rest_client/models/models_pe/version_create_config.py index 224dd9b7..c9c73db5 100644 --- a/tb_rest_client/models/models_pe/version_create_config.py +++ b/tb_rest_client/models/models_pe/version_create_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionCreateConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/version_create_request.py b/tb_rest_client/models/models_pe/version_create_request.py index d19d4315..f38fbd97 100644 --- a/tb_rest_client/models/models_pe/version_create_request.py +++ b/tb_rest_client/models/models_pe/version_create_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionCreateRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/version_creation_result.py b/tb_rest_client/models/models_pe/version_creation_result.py index 09a1a31c..1de42640 100644 --- a/tb_rest_client/models/models_pe/version_creation_result.py +++ b/tb_rest_client/models/models_pe/version_creation_result.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionCreationResult(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/version_load_config.py b/tb_rest_client/models/models_pe/version_load_config.py index 43ffb7d2..f483190a 100644 --- a/tb_rest_client/models/models_pe/version_load_config.py +++ b/tb_rest_client/models/models_pe/version_load_config.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionLoadConfig(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/version_load_request.py b/tb_rest_client/models/models_pe/version_load_request.py index 6890f30f..c0cd759f 100644 --- a/tb_rest_client/models/models_pe/version_load_request.py +++ b/tb_rest_client/models/models_pe/version_load_request.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionLoadRequest(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/version_load_result.py b/tb_rest_client/models/models_pe/version_load_result.py index e07bda1e..e97f0cd8 100644 --- a/tb_rest_client/models/models_pe/version_load_result.py +++ b/tb_rest_client/models/models_pe/version_load_result.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionLoadResult(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/versioned_entity_info.py b/tb_rest_client/models/models_pe/versioned_entity_info.py index 4402a427..884ff6a1 100644 --- a/tb_rest_client/models/models_pe/versioned_entity_info.py +++ b/tb_rest_client/models/models_pe/versioned_entity_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class VersionedEntityInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/web_delivery_method_notification_template.py b/tb_rest_client/models/models_pe/web_delivery_method_notification_template.py new file mode 100644 index 00000000..67eb3caa --- /dev/null +++ b/tb_rest_client/models/models_pe/web_delivery_method_notification_template.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class WebDeliveryMethodNotificationTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_config': 'JsonNode', + 'body': 'str', + 'enabled': 'bool', + 'subject': 'str' + } + + attribute_map = { + 'additional_config': 'additionalConfig', + 'body': 'body', + 'enabled': 'enabled', + 'subject': 'subject' + } + + def __init__(self, additional_config=None, body=None, enabled=None, subject=None): # noqa: E501 + """WebDeliveryMethodNotificationTemplate - a model defined in Swagger""" # noqa: E501 + self._additional_config = None + self._body = None + self._enabled = None + self._subject = None + self.discriminator = None + if additional_config is not None: + self.additional_config = additional_config + if body is not None: + self.body = body + if enabled is not None: + self.enabled = enabled + if subject is not None: + self.subject = subject + + @property + def additional_config(self): + """Gets the additional_config of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The additional_config of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: JsonNode + """ + return self._additional_config + + @additional_config.setter + def additional_config(self, additional_config): + """Sets the additional_config of this WebDeliveryMethodNotificationTemplate. + + + :param additional_config: The additional_config of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :type: JsonNode + """ + + self._additional_config = additional_config + + @property + def body(self): + """Gets the body of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The body of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this WebDeliveryMethodNotificationTemplate. + + + :param body: The body of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def enabled(self): + """Gets the enabled of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The enabled of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this WebDeliveryMethodNotificationTemplate. + + + :param enabled: The enabled of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def subject(self): + """Gets the subject of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + + + :return: The subject of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this WebDeliveryMethodNotificationTemplate. + + + :param subject: The subject of this WebDeliveryMethodNotificationTemplate. # noqa: E501 + :type: str + """ + + self._subject = subject + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(WebDeliveryMethodNotificationTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebDeliveryMethodNotificationTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/white_labeling_params.py b/tb_rest_client/models/models_pe/white_labeling_params.py index 72c5e9f5..a2e14d49 100644 --- a/tb_rest_client/models/models_pe/white_labeling_params.py +++ b/tb_rest_client/models/models_pe/white_labeling_params.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WhiteLabelingParams(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/widget_type.py b/tb_rest_client/models/models_pe/widget_type.py index a89a8280..bf87743a 100644 --- a/tb_rest_client/models/models_pe/widget_type.py +++ b/tb_rest_client/models/models_pe/widget_type.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetType(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/widget_type_details.py b/tb_rest_client/models/models_pe/widget_type_details.py index 0ba971c1..f9107629 100644 --- a/tb_rest_client/models/models_pe/widget_type_details.py +++ b/tb_rest_client/models/models_pe/widget_type_details.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetTypeDetails(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/widget_type_id.py b/tb_rest_client/models/models_pe/widget_type_id.py index 31d9ceb5..9c94284d 100644 --- a/tb_rest_client/models/models_pe/widget_type_id.py +++ b/tb_rest_client/models/models_pe/widget_type_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetTypeId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/widget_type_info.py b/tb_rest_client/models/models_pe/widget_type_info.py index 2dc61e9c..44745f98 100644 --- a/tb_rest_client/models/models_pe/widget_type_info.py +++ b/tb_rest_client/models/models_pe/widget_type_info.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetTypeInfo(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/widgets_bundle.py b/tb_rest_client/models/models_pe/widgets_bundle.py index b2610598..099b4fb7 100644 --- a/tb_rest_client/models/models_pe/widgets_bundle.py +++ b/tb_rest_client/models/models_pe/widgets_bundle.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetsBundle(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ @@ -28,9 +28,9 @@ class WidgetsBundle(object): and the value is json key in definition. """ swagger_types = { - 'external_id': 'WidgetsBundleId', 'id': 'WidgetsBundleId', 'created_time': 'int', + 'name': 'str', 'tenant_id': 'TenantId', 'alias': 'str', 'title': 'str', @@ -39,9 +39,9 @@ class WidgetsBundle(object): } attribute_map = { - 'external_id': 'externalId', 'id': 'id', 'created_time': 'createdTime', + 'name': 'name', 'tenant_id': 'tenantId', 'alias': 'alias', 'title': 'title', @@ -49,23 +49,23 @@ class WidgetsBundle(object): 'description': 'description' } - def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, alias=None, title=None, image=None, description=None): # noqa: E501 + def __init__(self, id=None, created_time=None, name=None, tenant_id=None, alias=None, title=None, image=None, description=None): # noqa: E501 """WidgetsBundle - a model defined in Swagger""" # noqa: E501 - self._external_id = None self._id = None self._created_time = None + self._name = None self._tenant_id = None self._alias = None self._title = None self._image = None self._description = None self.discriminator = None - if external_id is not None: - self.external_id = external_id if id is not None: self.id = id if created_time is not None: self.created_time = created_time + if name is not None: + self.name = name if tenant_id is not None: self.tenant_id = tenant_id if alias is not None: @@ -77,27 +77,6 @@ def __init__(self, external_id=None, id=None, created_time=None, tenant_id=None, if description is not None: self.description = description - @property - def external_id(self): - """Gets the external_id of this WidgetsBundle. # noqa: E501 - - - :return: The external_id of this WidgetsBundle. # noqa: E501 - :rtype: WidgetsBundleId - """ - return self._external_id - - @external_id.setter - def external_id(self, external_id): - """Sets the external_id of this WidgetsBundle. - - - :param external_id: The external_id of this WidgetsBundle. # noqa: E501 - :type: WidgetsBundleId - """ - - self._external_id = external_id - @property def id(self): """Gets the id of this WidgetsBundle. # noqa: E501 @@ -142,6 +121,29 @@ def created_time(self, created_time): self._created_time = created_time + @property + def name(self): + """Gets the name of this WidgetsBundle. # noqa: E501 + + Same as title of the Widget Bundle. Read-only field. Update the 'title' to change the 'name' of the Widget Bundle. # noqa: E501 + + :return: The name of this WidgetsBundle. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WidgetsBundle. + + Same as title of the Widget Bundle. Read-only field. Update the 'title' to change the 'name' of the Widget Bundle. # noqa: E501 + + :param name: The name of this WidgetsBundle. # noqa: E501 + :type: str + """ + + self._name = name + @property def tenant_id(self): """Gets the tenant_id of this WidgetsBundle. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/widgets_bundle_export_data.py b/tb_rest_client/models/models_pe/widgets_bundle_export_data.py index 881ea02f..a836c638 100644 --- a/tb_rest_client/models/models_pe/widgets_bundle_export_data.py +++ b/tb_rest_client/models/models_pe/widgets_bundle_export_data.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from .entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 +from tb_rest_client.models.models_pe.entity_export_dataobject import EntityExportDataobject # noqa: F401,E501 class WidgetsBundleExportData(EntityExportDataobject): - """ + """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ @@ -128,7 +128,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this WidgetsBundleExportData. # noqa: E501 :type: str """ - allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["ALARM", "API_USAGE_STATE", "ASSET", "ASSET_PROFILE", "BLOB_ENTITY", "CONVERTER", "CUSTOMER", "DASHBOARD", "DEVICE", "DEVICE_PROFILE", "EDGE", "ENTITY_GROUP", "ENTITY_VIEW", "GROUP_PERMISSION", "INTEGRATION", "NOTIFICATION", "NOTIFICATION_REQUEST", "NOTIFICATION_RULE", "NOTIFICATION_TARGET", "NOTIFICATION_TEMPLATE", "OTA_PACKAGE", "QUEUE", "ROLE", "RPC", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "TB_RESOURCE", "TENANT", "TENANT_PROFILE", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/widgets_bundle_id.py b/tb_rest_client/models/models_pe/widgets_bundle_id.py index 14d9d137..37ffa1c5 100644 --- a/tb_rest_client/models/models_pe/widgets_bundle_id.py +++ b/tb_rest_client/models/models_pe/widgets_bundle_id.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class WidgetsBundleId(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/models/models_pe/x509_certificate_chain_provision_configuration.py b/tb_rest_client/models/models_pe/x509_certificate_chain_provision_configuration.py new file mode 100644 index 00000000..de82b417 --- /dev/null +++ b/tb_rest_client/models/models_pe/x509_certificate_chain_provision_configuration.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 + + OpenAPI spec version: 3.5.0PE + Contact: info@thingsboard.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six +from tb_rest_client.models.models_pe.device_profile_provision_configuration import DeviceProfileProvisionConfiguration # noqa: F401,E501 + +class X509CertificateChainProvisionConfiguration(DeviceProfileProvisionConfiguration): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'allow_create_new_devices_by_x509_certificate': 'bool', + 'certificate_reg_ex_pattern': 'str', + 'provision_device_secret': 'str' + } + if hasattr(DeviceProfileProvisionConfiguration, "swagger_types"): + swagger_types.update(DeviceProfileProvisionConfiguration.swagger_types) + + attribute_map = { + 'allow_create_new_devices_by_x509_certificate': 'allowCreateNewDevicesByX509Certificate', + 'certificate_reg_ex_pattern': 'certificateRegExPattern', + 'provision_device_secret': 'provisionDeviceSecret' + } + if hasattr(DeviceProfileProvisionConfiguration, "attribute_map"): + attribute_map.update(DeviceProfileProvisionConfiguration.attribute_map) + + def __init__(self, allow_create_new_devices_by_x509_certificate=None, certificate_reg_ex_pattern=None, provision_device_secret=None, *args, **kwargs): # noqa: E501 + """X509CertificateChainProvisionConfiguration - a model defined in Swagger""" # noqa: E501 + self._allow_create_new_devices_by_x509_certificate = None + self._certificate_reg_ex_pattern = None + self._provision_device_secret = None + self.discriminator = None + if allow_create_new_devices_by_x509_certificate is not None: + self.allow_create_new_devices_by_x509_certificate = allow_create_new_devices_by_x509_certificate + if certificate_reg_ex_pattern is not None: + self.certificate_reg_ex_pattern = certificate_reg_ex_pattern + if provision_device_secret is not None: + self.provision_device_secret = provision_device_secret + DeviceProfileProvisionConfiguration.__init__(self, *args, **kwargs) + + @property + def allow_create_new_devices_by_x509_certificate(self): + """Gets the allow_create_new_devices_by_x509_certificate of this X509CertificateChainProvisionConfiguration. # noqa: E501 + + + :return: The allow_create_new_devices_by_x509_certificate of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :rtype: bool + """ + return self._allow_create_new_devices_by_x509_certificate + + @allow_create_new_devices_by_x509_certificate.setter + def allow_create_new_devices_by_x509_certificate(self, allow_create_new_devices_by_x509_certificate): + """Sets the allow_create_new_devices_by_x509_certificate of this X509CertificateChainProvisionConfiguration. + + + :param allow_create_new_devices_by_x509_certificate: The allow_create_new_devices_by_x509_certificate of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :type: bool + """ + + self._allow_create_new_devices_by_x509_certificate = allow_create_new_devices_by_x509_certificate + + @property + def certificate_reg_ex_pattern(self): + """Gets the certificate_reg_ex_pattern of this X509CertificateChainProvisionConfiguration. # noqa: E501 + + + :return: The certificate_reg_ex_pattern of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :rtype: str + """ + return self._certificate_reg_ex_pattern + + @certificate_reg_ex_pattern.setter + def certificate_reg_ex_pattern(self, certificate_reg_ex_pattern): + """Sets the certificate_reg_ex_pattern of this X509CertificateChainProvisionConfiguration. + + + :param certificate_reg_ex_pattern: The certificate_reg_ex_pattern of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :type: str + """ + + self._certificate_reg_ex_pattern = certificate_reg_ex_pattern + + @property + def provision_device_secret(self): + """Gets the provision_device_secret of this X509CertificateChainProvisionConfiguration. # noqa: E501 + + + :return: The provision_device_secret of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :rtype: str + """ + return self._provision_device_secret + + @provision_device_secret.setter + def provision_device_secret(self, provision_device_secret): + """Sets the provision_device_secret of this X509CertificateChainProvisionConfiguration. + + + :param provision_device_secret: The provision_device_secret of this X509CertificateChainProvisionConfiguration. # noqa: E501 + :type: str + """ + + self._provision_device_secret = provision_device_secret + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(X509CertificateChainProvisionConfiguration, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, X509CertificateChainProvisionConfiguration): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tb_rest_client/models/models_pe/x509_lw_m2_m_bootstrap_server_credential.py b/tb_rest_client/models/models_pe/x509_lw_m2_m_bootstrap_server_credential.py index 97a5e3d6..69de3fa6 100644 --- a/tb_rest_client/models/models_pe/x509_lw_m2_m_bootstrap_server_credential.py +++ b/tb_rest_client/models/models_pe/x509_lw_m2_m_bootstrap_server_credential.py @@ -5,7 +5,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.4.0PE-SNAPSHOT + OpenAPI spec version: 3.5.0PE Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -17,7 +17,7 @@ class X509LwM2MBootstrapServerCredential(object): """NOTE: This class is auto generated by the swagger code generator program. -from tb_rest_client.api_client import ApiClient + Do not edit the class manually. """ """ diff --git a/tb_rest_client/rest.py b/tb_rest_client/rest.py index d79402c3..ce208d50 100644 --- a/tb_rest_client/rest.py +++ b/tb_rest_client/rest.py @@ -5,7 +5,7 @@ ThingsBoard open-source IoT platform REST API documentation. # noqa: E501 - OpenAPI spec version: 3.3.3-SNAPSHOT + OpenAPI spec version: 3.3.3 Contact: info@thingsboard.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/tb_rest_client/rest_client_base.py b/tb_rest_client/rest_client_base.py index b6b3ba34..4f2456f0 100644 --- a/tb_rest_client/rest_client_base.py +++ b/tb_rest_client/rest_client_base.py @@ -25,7 +25,6 @@ from tb_rest_client.models.models_ce import * from tb_rest_client.rest import RESTResponse from tb_rest_client.api.api_ce.two_factor_auth_controller_api import TwoFactorAuthControllerApi -from tb_rest_client.api.api_ce.two_fa_config_controller_api import TwoFaConfigControllerApi from tb_rest_client.api.api_ce.entities_version_control_controller_api import EntitiesVersionControlControllerApi from tb_rest_client.api.api_ce.admin_controller_api import AdminControllerApi from tb_rest_client.api.api_ce.alarm_controller_api import AlarmControllerApi @@ -52,7 +51,6 @@ from tb_rest_client.api.api_ce.rpc_v_1_controller_api import RpcV1ControllerApi from tb_rest_client.api.api_ce.rpc_v_2_controller_api import RpcV2ControllerApi from tb_rest_client.api.api_ce.rule_chain_controller_api import RuleChainControllerApi -from tb_rest_client.api.api_ce.sign_up_controller_api import SignUpControllerApi from tb_rest_client.api.api_ce.tb_resource_controller_api import TbResourceControllerApi from tb_rest_client.api.api_ce.telemetry_controller_api import TelemetryControllerApi from tb_rest_client.api.api_ce.tenant_controller_api import TenantControllerApi @@ -62,6 +60,13 @@ from tb_rest_client.api.api_ce.widgets_bundle_controller_api import WidgetsBundleControllerApi from tb_rest_client.api.api_ce.ui_settings_controller_api import UiSettingsControllerApi from tb_rest_client.api.api_ce.alarm_comment_controller_api import AlarmCommentControllerApi +from tb_rest_client.api.api_ce.notification_target_controller_api import NotificationTargetControllerApi +from tb_rest_client.api.api_ce.usage_info_controller_api import UsageInfoControllerApi +from tb_rest_client.api.api_ce.notification_rule_controller_api import NotificationRuleControllerApi +from tb_rest_client.api.api_ce.notification_controller_api import NotificationControllerApi +from tb_rest_client.api.api_ce.notification_template_controller_api import NotificationTemplateControllerApi +from tb_rest_client.api.api_ce.asset_profile_controller_api import AssetProfileControllerApi +from tb_rest_client.api.api_ce.two_factor_auth_config_controller_api import TwoFactorAuthConfigControllerApi # from tb_rest_client.models.models_pe import * from tb_rest_client.configuration import Configuration from tb_rest_client.api_client import ApiClient @@ -194,7 +199,8 @@ def delete_asset(self, asset_id: AssetId) -> None: return self.asset_controller.delete_asset_using_delete(asset_id=asset_id) def get_assets_by_ids(self, asset_ids: list) -> List[Asset]: - return self.asset_controller.get_assets_by_ids_using_get(asset_ids=str(asset_ids)) + asset_ids = ','.join(asset_ids) + return self.asset_controller.get_assets_by_ids_using_get(asset_ids=asset_ids) def get_tenant_assets(self, page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, @@ -327,7 +333,7 @@ def request_reset_password_by_email(self, body: Optional[ResetPasswordEmailReque def get_events_post(self, tenant_id: TenantId, page_size: int, page: int, entity_id: EntityId, body: Optional[EventFilter], text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None, start_time: Optional[int] = None, - end_time: Optional[int] = None) -> PageDataEvent: + end_time: Optional[int] = None) -> PageDataEventInfo: tenant_id = self.get_id(tenant_id) entity_type = self.get_type(entity_id) entity_id = self.get_id(entity_id) @@ -350,10 +356,17 @@ def get_events_v1_get1(self, entity_id: EntityId, event_type: str, tenant_id: Te sort_property=sort_property, sort_order=sort_order, start_time=start_time, end_time=end_time) + def clear_events_post(self, entity_id: EntityId, body: Optional[str] = None, start_time: Optional[int] = None, + end_time: Optional[int] = None): + entity_type = self.get_type(entity_id) + entity_id = self.get_id(entity_id) + return self.event_controller.clear_events_using_post(entity_type=entity_type, entity_id=entity_id, body=body, + start_time=start_time, end_time=end_time) + def get_events_get(self, entity_id: EntityId, tenant_id: TenantId, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None, start_time: Optional[int] = None, - end_time: Optional[int] = None) -> PageDataEvent: + end_time: Optional[int] = None) -> PageDataEventInfo: entity_type = self.get_type(entity_id) entity_id = self.get_id(entity_id) tenant_id = self.get_id(tenant_id) @@ -456,7 +469,7 @@ def save_entity_telemetry_with_ttl(self, entity_id: EntityId, scope: str, ttl: i entity_id = self.get_id(entity_id) return self.telemetry_controller.save_entity_telemetry_with_ttl_using_post(entity_type=entity_type, entity_id=entity_id, scope=scope, - ttl=str(ttl), body=body) + ttl=ttl, body=body) def get_attributes(self, entity_id: EntityId, keys: Optional[str] = None): entity_type = self.get_type(entity_id) @@ -471,8 +484,8 @@ def delete_entity_attributes(self, entity_id: EntityId, scope: str, keys: str): entity_id=entity_id, scope=scope, keys=keys) - # Alarm Controller # - def ack_alarm(self, alarm_id: AlarmId) -> None: + # Alarm Controller + def ack_alarm(self, alarm_id: AlarmId) -> AlarmInfo: alarm_id = self.get_id(alarm_id) return self.alarm_controller.ack_alarm_using_post(alarm_id=alarm_id) @@ -480,13 +493,6 @@ def get_alarm_info_by_id(self, alarm_id: AlarmId) -> AlarmInfo: alarm_id = self.get_id(alarm_id) return self.alarm_controller.get_alarm_info_by_id_using_get(alarm_id=alarm_id) - def get_highest_alarm_severity(self, entity_id: EntityId, search_status: Optional[str] = None, - status: Optional[str] = None) -> str: - entity_type = self.get_type(entity_id) - entity_id = self.get_id(entity_id) - return self.alarm_controller.get_highest_alarm_severity_using_get(entity_type=entity_type, entity_id=entity_id, - search_status=search_status, status=status) - def delete_alarm(self, alarm_id: AlarmId) -> bool: alarm_id = self.get_id(alarm_id) return self.alarm_controller.delete_alarm_using_delete(alarm_id=alarm_id) @@ -501,7 +507,7 @@ def save_alarm(self, body: Alarm) -> Alarm: def get_alarms(self, entity_id: EntityId, page_size: int, page: int, search_status: Optional[str] = None, status: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, - fetch_originator: Optional[bool] = None) -> PageDataAlarmInfo: + fetch_originator: Optional[bool] = None, assignee_id: Optional[str] = None) -> PageDataAlarmInfo: entity_type = self.get_type(entity_id) entity_id = self.get_id(entity_id) return self.alarm_controller.get_alarms_using_get(entity_type=entity_type, entity_id=entity_id, @@ -509,7 +515,92 @@ def get_alarms(self, entity_id: EntityId, page_size: int, page: int, search_stat status=status, text_search=text_search, sort_property=sort_property, sort_order=sort_order, start_time=start_time, end_time=end_time, - fetch_originator=fetch_originator) + fetch_originator=fetch_originator, assignee_id=assignee_id) + + def unassign_alarm(self, id: AlarmId) -> Alarm: + id = self.get_id(id) + return self.alarm_controller.unassign_alarm_using_delete(alarm_id=id) + + def get_asset_info_by_id(self, asset_id: AssetId) -> AssetInfo: + asset_id = self.get_id(asset_id) + return self.asset_controller.get_asset_info_by_id_using_get(asset_id=asset_id) + + def get_customer_asset_infos(self, customer_id: CustomerId, page_size: int, page: int, type: Optional[str] = None, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, sort_order: Optional[str] = None, asset_profile_id: Optional[AssetProfileId] = None) -> PageDataAssetInfo: + customer_id = self.get_id(customer_id) + + if asset_profile_id: + asset_profile_id = self.get_id(asset_profile_id) + return self.asset_controller.get_customer_asset_infos_using_get(customer_id=customer_id, page_size=page_size, + page=page, type=type, text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, asset_profile_id=asset_profile_id) + + def count_alarms_by_query(self, body: AlarmCountQuery) -> int: + return self.entity_query_controller.count_alarms_by_query_using_post(body=body) + + def get_customer_dashboards(self, customer_id: CustomerId, page_size: int, page: int, mobile: Optional[bool] = None, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataDashboardInfo: + customer_id = self.get_id(customer_id) + return self.dashboard_controller.get_customer_dashboards_using_get(customer_id=customer_id, page_size=page_size, + page=page, mobile=mobile, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def get_user_settings(self) -> JsonNode: + return self.user_controller.get_user_settings_using_get() + + def get_tenant_usage_info(self) -> UsageInfo: + return self.usage_info_controller.get_tenant_usage_info_using_get() + + def save_user_settings(self, body: JsonNode) -> JsonNode: + return self.user_controller.save_user_settings_using_post(body=body) + + def put_user_settings(self, body: JsonNode): + return self.user_controller.put_user_settings_using_put(body=body) + + def report_user_dashboard_action(self, dashboard_id: DashboardId, action: str) -> UserDashboardsInfo: + dashboard_id = self.get_id(dashboard_id) + return self.user_controller.report_user_dashboard_action_using_get(dashboard_id=dashboard_id, action=action) + + def get_users_for_assign(self, alarm_id: AlarmId, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataUserEmailInfo: + alarm_id = self.get_id(alarm_id) + return self.user_controller.get_users_for_assign_using_get(alarm_id=alarm_id, page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def find_users_by_query(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataUserEmailInfo: + return self.user_controller.find_users_by_query_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def get_user_dashboards_info(self) -> UserDashboardsInfo: + return self.user_controller.get_user_dashboards_info_using_get() + + def delete_user_settings(self, paths: List[str], type: str): + paths = ','.join(paths) + return self.user_controller.delete_user_settings_using_delete(paths=paths, type=type) + + def get_tenant_profiles_by_ids(self, ids: List[str]) -> List[TenantProfile]: + ids = ','.join(ids) + return self.tenant_profile_controller.get_tenant_profiles_by_ids_using_get(ids=ids) + + def get_entity_view_info_by_id(self, entity_view_id: EntityViewId) -> EntityViewInfo: + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.get_entity_view_info_by_id_using_get(entity_view_id=entity_view_id) + + def get_device_info_by_id(self, device_id: DeviceId) -> DeviceInfo: + device_id = self.get_id(device_id) + return self.device_controller.get_device_info_by_id_using_get(device_id=device_id) def get_alarm_by_id(self, alarm_id: AlarmId) -> Alarm: alarm_id = self.get_id(alarm_id) @@ -533,13 +624,13 @@ def delete_alarm_comment(self, alarm_id: AlarmId, comment_id: AlarmCommentId): return self.alarm_comment_controller.delete_alarm_comment_using_delete(alarm_id=alarm_id, comment_id=comment_id) def get_alarm_comments(self, alarm_id: AlarmId, page_size: int, page: int, sort_property: Optional[str] = None, - sort_order: Optional[str] = None): + sort_order: Optional[str] = None) -> PageDataAlarmCommentInfo: alarm_id = self.get_id(alarm_id) return self.alarm_comment_controller.get_alarm_comments_using_get(alarm_id=alarm_id, page_size=page_size, page=page, sort_property=sort_property, sort_order=sort_order) - def save_alarm_comment(self, alarm_id: AlarmId, body: Optional[AlarmComment] = None): + def save_alarm_comment(self, alarm_id: AlarmId, body: Optional[AlarmComment] = None) -> AlarmComment: alarm_id = self.get_id(alarm_id) return self.alarm_comment_controller.save_alarm_comment_using_post(alarm_id=alarm_id, body=body) @@ -558,7 +649,7 @@ def get_edge_by_id(self, edge_id: EdgeId) -> Edge: edge_id = self.get_id(edge_id) return self.edge_controller.get_edge_by_id_using_get(edge_id=edge_id) - def sync_edge(self, edge_id: EdgeId) -> None: + def sync_edge(self, edge_id: EdgeId) -> DeferredResultResponseEntity: edge_id = self.get_id(edge_id) return self.edge_controller.sync_edge_using_post(edge_id=edge_id) @@ -603,15 +694,6 @@ def get_edges_by_ids(self, edge_ids: list) -> List[Edge]: def process_edges_bulk_import(self, body: Optional[BulkImportRequest] = None) -> BulkImportResultEdge: return self.edge_controller.process_edges_bulk_import_using_post(body=body) - def activate_instance(self, license_secret: str, release_date: str) -> Union[ - dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.edge_controller.activate_instance_using_post(license_secret=license_secret, - release_date=release_date) - - def check_instance(self, body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None) -> Union[ - dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.edge_controller.check_instance_using_post(body=None) - def get_edge_events(self, edge_id: EdgeId, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None, start_time: Optional[int] = None, @@ -622,10 +704,6 @@ def get_edge_events(self, edge_id: EdgeId, page_size: int, page: int, text_searc sort_property=sort_property, sort_order=sort_order, start_time=start_time, end_time=end_time) - def get_edge_docker_install_instruction(self, edge_id: EdgeId): - edge_id = self.get_id(edge_id) - return self.edge_controller.get_edge_docker_install_instructions_using_get(edge_id=edge_id) - # RPC v2 Controller def get_persisted_rpc(self, rpc_id: RpcId) -> Rpc: rpc_id = self.get_id(rpc_id) @@ -648,6 +726,20 @@ def get_persisted_rpc_by_device(self, device_id: DeviceId, page_size: int, page: text_search=text_search, sort_property=sort_property, sort_order=sort_order) + def get_rule_chain_output_labels_usage(self, rule_chain_id: RuleChainId) -> List[RuleChainOutputLabelsUsage]: + rule_chain_id = self.get_id(rule_chain_id) + return self.rule_chain_controller.get_rule_chain_output_labels_usage_using_get(rule_chain_id=rule_chain_id) + + def get_rule_chain_output_labels(self, rule_chain_id: RuleChainId) -> List[str]: + rule_chain_id = self.get_id(rule_chain_id) + return self.rule_chain_controller.get_rule_chain_output_labels_using_get(rule_chain_id=rule_chain_id) + + def is_tbel_enabled(self) -> bool: + return self.rule_chain_controller.is_tbel_enabled_using_get() + + def save_rule_chain_meta_data(self, body: Optional[RuleChainMetaData] = None, + update_related: Optional[bool] = None) -> RuleChainMetaData: + return self.rule_chain_controller.save_rule_chain_meta_data_using_post(body=body, update_related=update_related) def delete_rpc(self, rpc_id: RpcId) -> None: rpc_id = self.get_id(rpc_id) @@ -727,8 +819,19 @@ def send_activation_email(self, email: str) -> None: return self.user_controller.send_activation_email_using_post(email=email) # Queue Controller - def get_tenant_queues_by_service_type(self, service_type: str) -> List[str]: - return self.queue_controller.get_tenant_queues_by_service_type_using_get(service_type=service_type) + def get_tenant_queues_by_service_type(self, service_type: str, page_size: int, page: int, + type: Optional[str] = None, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> List[str]: + return self.queue_controller.get_tenant_queues_by_service_type_using_get(service_type=service_type, + page_size=page_size, + page=page, type=type, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def save_queue(self, service_type: str, body: Optional[Queue] = None) -> Queue: + return self.queue_controller.save_queue_using_post(service_type=service_type, body=body) # RPC v1 Controller def handle_one_way_device_rpc_request(self, device_id: DeviceId, @@ -969,22 +1072,6 @@ def get_jwt_setting(self) -> JWTSettings: def save_jwt_settings(self, body: Optional[JWTSettings] = None) -> JWTPair: return self.admin_controller.save_jwt_settings_using_post(body=body) - # Sign Up Controller - def get_recaptcha_public_key(self) -> str: - return self.sign_up_controller.get_recaptcha_public_key_using_get() - - def sign_up(self, body: Optional[SignUpRequest] = None) -> str: - return self.sign_up_controller.sign_up_using_post(body=body) - - def accept_privacy_policy(self) -> Union[dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.sign_up_controller.accept_privacy_policy_using_post() - - def privacy_policy_accepted(self) -> bool: - return self.sign_up_controller.privacy_policy_accepted_using_get() - - def mobile_login(self, pkg_name: str) -> str: - return self.sign_up_controller.mobile_login_using_get(pkg_name=pkg_name) - # TB Resource Controller def get_resource_info_by_id(self, resource_id: EntityId) -> TbResourceInfo: resource_id = self.get_id(resource_id) @@ -1024,6 +1111,9 @@ def get_lwm2m_list_objects_page(self, page_size: int, page: int, text_search: Op sort_property=sort_property, sort_order=sort_order) + def get_repository_settings_info(self) -> RepositorySettingsInfo: + return self.admin_controller.get_repository_settings_info_using_get() + # O Auth 2 Controller def get_login_processing_url(self) -> str: return self.o_auth2_controller.get_login_processing_url_using_get() @@ -1194,9 +1284,6 @@ def get_tenant_home_dashboard_info(self) -> HomeDashboardInfo: return self.dashboard_controller.get_tenant_home_dashboard_info_using_get() # Entity Query Controller - def count_entities_by_query(self, body: Optional[EntityCountQuery] = None) -> int: - return self.entity_query_controller.count_entities_by_query_using_post(body=body) - def find_entity_timeseries_and_attributes_keys_by_query(self, timeseries: bool, attributes: bool, body: Optional[ EntityDataQuery]): return self.entity_query_controller.find_entity_timeseries_and_attributes_keys_by_query_using_post( @@ -1494,6 +1581,17 @@ def list_versions(self, branch: str, page_size: int, page: int, text_search: Opt sort_property=sort_property, sort_order=sort_order) + def delete_queue(self, queue_id: QueueId) -> None: + queue_id = self.get_id(queue_id) + return self.queue_controller.delete_queue_using_delete(queue_id=queue_id) + + def get_queue_by_id(self, queue_id: QueueId) -> Queue: + queue_id = self.get_id(queue_id) + return self.queue_controller.get_queue_by_id_using_get(queue_id=queue_id) + + def get_queue_by_name(self, queue_name: str) -> Queue: + return self.queue_controller.get_queue_by_name_using_get(queue_name=queue_name) + # Two-Factor Auth Controller def check_two_fa_verification_code(self, provider_type: str, verification_code: str) -> JWTPair: return self.two_factor_auth_controller.check_two_fa_verification_code_using_post(provider_type=provider_type, @@ -1505,37 +1603,151 @@ def get_available_two_fa_providers_v1(self, ) -> List[TwoFaProviderInfo]: def request_two_fa_verification_code(self, provider_type: str) -> None: return self.two_factor_auth_controller.request_two_fa_verification_code_using_post(provider_type=provider_type) - # Two-Factor Config Controller + # Tow Factor Auth Config Controller + def delete_two_fa_account_config(self, provider_type: str) -> AccountTwoFaSettings: + return self.two_factor_auth_config_controller.delete_two_fa_account_config_using_delete(provider_type=provider_type) + + def generate_two_fa_account_config(self, provider_type: str) -> TwoFaAccountConfig: + return self.two_factor_auth_config_controller.generate_two_fa_account_config_using_post(provider_type=provider_type) + + def get_account_two_fa_settings(self) -> AccountTwoFaSettings: + return self.two_factor_auth_config_controller.get_account_two_fa_settings_using_get() + + def get_available_two_fa_providers(self) -> List[str]: + return self.two_factor_auth_config_controller.get_available_two_fa_providers_using_get() + def get_platform_two_fa_settings(self) -> PlatformTwoFaSettings: - return self.two_fa_config_controller.get_platform_two_fa_settings_using_get() + return self.two_factor_auth_config_controller.get_platform_two_fa_settings_using_get() - def submit_two_fa_account_config(self, body: Optional[TwoFaAccountConfig] = None) -> None: - return self.two_fa_config_controller.submit_two_fa_account_config_using_post(body=body) + def save_platform_two_fa_settings(self, body: PlatformTwoFaSettings) -> PlatformTwoFaSettings: + return self.two_factor_auth_config_controller.save_platform_two_fa_settings_using_post(body=body) - def verify_and_save_two_fa_account_config(self, body: Optional[TwoFaAccountConfig] = None, - verification_code: Optional[str] = None) -> AccountTwoFaSettings: - return self.two_fa_config_controller.verify_and_save_two_fa_account_config_using_post(body=body, - verification_code=verification_code) + def submit_two_fa_account_config(self, body: TwoFaAccountConfig): + return self.two_factor_auth_config_controller.submit_two_fa_account_config_using_post(body=body) - def get_available_two_fa_providers(self, ) -> List[str]: - return self.two_fa_config_controller.get_available_two_fa_providers_using_get() + def update_two_fa_account_config(self, provider_type: str, body: TwoFaAccountConfigUpdateRequest) -> AccountTwoFaSettings: + return self.two_factor_auth_config_controller.update_two_fa_account_config_using_put(provider_type=provider_type, body=body) - def update_two_fa_account_config(self, provider_type: str, - body: Optional[TwoFaAccountConfigUpdateRequest] = None) -> AccountTwoFaSettings: - return self.two_fa_config_controller.update_two_fa_account_config_using_put(provider_type=provider_type, - body=body) + def verify_and_save_two_fa_account_config(self, body: TwoFaAccountConfig, verification_code: str) -> AccountTwoFaSettings: + return self.two_factor_auth_config_controller.verify_and_save_two_fa_account_config_using_post(body=body, verification_code=verification_code) - def get_account_two_fa_settings(self, ) -> AccountTwoFaSettings: - return self.two_fa_config_controller.get_account_two_fa_settings_using_get() + def create_notification_request(self, body: NotificationRequest) -> NotificationRequest: + return self.notification_controller.create_notification_request_using_post(body=body) - def generate_two_fa_account_config(self, provider_type: str) -> TwoFaAccountConfig: - return self.two_fa_config_controller.generate_two_fa_account_config_using_post(provider_type=provider_type) + def delete_notification_request(self, id: str): + return self.notification_controller.delete_notification_request_using_delete(id=id) - def delete_two_fa_account_config(self, provider_type: str) -> AccountTwoFaSettings: - return self.two_fa_config_controller.delete_two_fa_account_config_using_delete(provider_type=provider_type) + def delete_notification(self, id: str): + return self.notification_controller.delete_notification_using_delete(id=id) + + def get_available_delivery_methods(self) -> List[str]: + return self.notification_controller.get_available_delivery_methods_using_get() + + def get_notification_request_by_id(self, id: str) -> NotificationRequestInfo: + return self.notification_controller.get_notification_request_by_id_using_get(id=id) + + def get_notification_request_preview(self, body: NotificationRequest, + recipients_preview_size: Optional[int] = None): + return self.notification_controller.get_notification_request_preview_using_post(body=body, + recipients_preview_size=recipients_preview_size) + + def get_notification_requests(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataNotificationRequestInfo: + return self.notification_controller.get_notification_requests_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def get_notification_settings(self) -> NotificationSettings: + return self.notification_controller.get_notification_settings_using_get() + + def get_notifications(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataNotification: + return self.notification_controller.get_notifications_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def mark_all_notifications_as_read(self): + return self.notification_controller.mark_all_notifications_as_read_using_put() + + def mark_notification_as_read(self, id: str): + return self.notification_controller.mark_notification_as_read_using_put(id=id) + + def save_notification_settings(self, body: NotificationSettings) -> NotificationSettings: + return self.notification_controller.save_notification_settings_using_post(body=body) + + def delete_notification_rule(self, id: str): + return self.notification_rule_controller.delete_notification_rule_using_delete(id=id) + + def get_notification_rule_by_id(self, id: str) -> NotificationRuleInfo: + return self.notification_rule_controller.get_notification_rule_by_id_using_get(id=id) + + def get_notification_rules(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataNotificationRuleInfo: + return self.notification_rule_controller.get_notification_rules_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def save_notification_rule(self, body: NotificationRule) -> NotificationRule: + return self.notification_rule_controller.save_notification_rule_using_post(body=body) + + def delete_notification_target_by_id(self, id: str): + return self.notification_target_controller.delete_notification_target_by_id_using_delete(id=id) + + def get_notification_target_by_id(self, id: str): + return self.notification_target_controller.get_notification_target_by_id_using_get(id=id) + + def get_notification_targets_by_ids(self, ids: list) -> List[NotificationTarget]: + ids = ','.join(ids) + return self.notification_target_controller.get_notification_targets_by_ids_using_get(ids=ids) + + def get_notification_targets_by_supported_notification_type(self, notification_type: str, page_size: int, page: int, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None): + return self.notification_target_controller.get_notification_targets_by_supported_notification_type_using_get( + notification_type=notification_type, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_notification_targets(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None): + return self.notification_target_controller.get_notification_targets_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def get_recipients_for_notification_target_config(self, page_size: int, page: int): + return self.notification_target_controller.get_recipients_for_notification_target_config_using_post( + page_size=page_size, page=page) + + def save_notification_target(self, body: NotificationTarget) -> NotificationTarget: + return self.notification_target_controller.save_notification_target_using_post(body=body) + + def delete_notification_template_by_id(self, id: str): + return self.notification_template_controller.delete_notification_template_by_id_using_delete(id=id) + + def get_notification_template_by_id(self, id: str) -> NotificationTemplate: + return self.notification_template_controller.get_notification_template_by_id_using_get(id=id) + + def get_notification_templates(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataNotificationTemplate: + return self.notification_template_controller.get_notification_templates_using_get(page_size=page_size, + page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def list_slack_conversations(self, type: str, token: Optional[str] = None) -> List[SlackConversation]: + return self.notification_template_controller.list_slack_conversations_using_get(type=type, token=token) - def save_platform_two_fa_settings(self, body: Optional[PlatformTwoFaSettings] = None) -> PlatformTwoFaSettings: - return self.two_fa_config_controller.save_platform_two_fa_settings_using_post(body=body) + def save_notification_template(self, body: NotificationTemplate) -> NotificationTemplate: + return self.notification_template_controller.save_notification_template_using_post(body=body) def __load_controllers(self): self.audit_log_controller = AuditLogControllerApi(self.api_client) @@ -1570,12 +1782,17 @@ def __load_controllers(self): self.ota_package_controller = OtaPackageControllerApi(self.api_client) self.alarm_controller = AlarmControllerApi(self.api_client) self.edge_event_controller = EdgeEventControllerApi(self.api_client) - self.sign_up_controller = SignUpControllerApi(self.api_client) self.ui_settings_controller = UiSettingsControllerApi(self.api_client) self.entities_version_control_controller = EntitiesVersionControlControllerApi(self.api_client) - self.two_fa_config_controller = TwoFaConfigControllerApi(self.api_client) self.two_factor_auth_controller = TwoFactorAuthControllerApi(self.api_client) self.alarm_comment_controller = AlarmCommentControllerApi(self.api_client) + self.notification_target_controller = NotificationTargetControllerApi(self.api_client) + self.usage_info_controller = UsageInfoControllerApi(self.api_client) + self.notification_rule_controller = NotificationRuleControllerApi(self.api_client) + self.notification_controller = NotificationControllerApi(self.api_client) + self.notification_template_controller = NotificationTemplateControllerApi(self.api_client) + self.asset_profile_controller = AssetProfileControllerApi(self.api_client) + self.two_factor_auth_config_controller = TwoFactorAuthConfigControllerApi(self.api_client) @staticmethod def get_type(type): diff --git a/tb_rest_client/rest_client_ce.py b/tb_rest_client/rest_client_ce.py index 9e603907..ba80fede 100644 --- a/tb_rest_client/rest_client_ce.py +++ b/tb_rest_client/rest_client_ce.py @@ -37,46 +37,21 @@ def save_client_registration_template(self, body: Optional[ return self.o_auth2_config_template_controller.save_client_registration_template_using_post(body=body) # Asset Controller - def get_asset_info_by_id(self, asset_id: AssetId) -> AssetInfo: - asset_id = self.get_id(asset_id) - return self.asset_controller.get_asset_info_by_id_using_get(asset_id=asset_id) - - def delete_asset(self, asset_id: AssetId) -> None: - asset_id = self.get_id(asset_id) - return self.asset_controller.delete_asset_using_delete(asset_id=asset_id) - def assign_asset_to_edge(self, edge_id: EdgeId, asset_id: AssetId) -> Asset: edge_id = self.get_id(edge_id) asset_id = self.get_id(asset_id) return self.asset_controller.assign_asset_to_edge_using_post(edge_id=edge_id, asset_id=asset_id) - def find_by_query(self, body: AssetSearchQuery) -> List[Asset]: - return self.asset_controller.find_by_query_using_post(body=body) - - def get_customer_asset_infos(self, customer_id: CustomerId, page_size: int, page: int, type: Optional[str] = None, - text_search: Optional[str] = None, - sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataAssetInfo: - customer_id = self.get_id(customer_id) - return self.asset_controller.get_customer_asset_infos_using_get(customer_id=customer_id, page_size=page_size, - page=page, type=type, text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - def get_customer_assets(self, customer_id: CustomerId, page_size: int, page: int, type: Optional[str] = None, - text_search: Optional[str] = None, - sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataAsset: - customer_id = self.get_id(customer_id) - return self.asset_controller.get_customer_assets_using_get(customer_id=customer_id, page_size=page_size, - page=page, type=type, text_search=text_search, - sort_property=sort_property, sort_order=sort_order) - def get_tenant_asset_infos(self, page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, - sort_order: Optional[str] = None) -> PageDataAssetInfo: + sort_order: Optional[str] = None, asset_profile_id: Optional[AssetProfileId] = None) -> PageDataAssetInfo: + + if asset_profile_id: + asset_profile_id = self.get_id(asset_profile_id) return self.asset_controller.get_tenant_asset_infos_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, - sort_order=sort_order) + sort_order=sort_order, asset_profile_id=asset_profile_id) def process_assets_bulk_import(self, body: BulkImportRequest) -> BulkImportResultAsset: return self.asset_controller.process_assets_bulk_import_using_post(body=body) @@ -86,9 +61,6 @@ def unassign_asset_from_edge(self, edge_id: EdgeId, asset_id: AssetId) -> Asset: asset_id = self.get_id(asset_id) return self.asset_controller.unassign_asset_from_edge_using_delete(edge_id=edge_id, asset_id=asset_id) - def get_tenant_asset(self, asset_name: str) -> Asset: - return self.asset_controller.get_tenant_asset_using_get(asset_name=asset_name) - def get_edge_assets(self, edge_id: EdgeId, page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None, start_time: Optional[int] = None, @@ -104,10 +76,6 @@ def assign_asset_to_customer(self, customer_id: CustomerId, asset_id: AssetId) - asset_id = self.get_id(asset_id) return self.asset_controller.assign_asset_to_customer_using_post(customer_id=customer_id, asset_id=asset_id) - def get_asset_by_id(self, asset_id: AssetId) -> Asset: - asset_id = self.get_id(asset_id) - return self.asset_controller.get_asset_by_id_using_get(asset_id=asset_id) - def unassign_asset_from_customer(self, asset_id: AssetId) -> Asset: asset_id = self.get_id(asset_id) return self.asset_controller.unassign_asset_from_customer_using_delete(asset_id=asset_id) @@ -116,23 +84,9 @@ def assign_asset_to_public_customer(self, asset_id: AssetId) -> Asset: asset_id = self.get_id(asset_id) return self.asset_controller.assign_asset_to_public_customer_using_post(asset_id=asset_id) - def get_assets_by_ids(self, asset_ids: list) -> List[Asset]: - asset_ids = ','.join(asset_ids) - return self.asset_controller.get_assets_by_ids_using_get(asset_ids=asset_ids) - def save_asset(self, body: Optional[Asset] = None) -> Asset: return self.asset_controller.save_asset_using_post(body=body) - def get_tenant_assets(self, page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, - sort_property: Optional[str] = None, - sort_order: Optional[str] = None) -> PageDataAsset: - return self.asset_controller.get_tenant_assets_using_get(page_size=page_size, page=page, type=type, - text_search=text_search, sort_property=sort_property, - sort_order=sort_order) - - def get_asset_types(self, ) -> List[EntitySubtype]: - return self.asset_controller.get_asset_types_using_get() - # Edge Controller def get_tenant_edge_infos(self, page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, @@ -162,14 +116,6 @@ def assign_edge_to_customer(self, customer_id: CustomerId, edge_id: EdgeId) -> E def find_by_query_v2(self, body: Optional[EdgeSearchQuery] = None) -> List[Edge]: return self.edge_controller.find_by_query_using_post2(body=body) - def sync_edge(self, edge_id: EdgeId) -> None: - edge_id = self.get_id(edge_id) - return self.edge_controller.sync_edge_using_post(edge_id=edge_id) - - def check_instance(self, body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None) -> Union[ - dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.edge_controller.check_instance_using_post(body=body) - def get_tenant_edges(self, page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataEdge: @@ -242,18 +188,10 @@ def get_edges_by_ids(self, edge_ids: list) -> List[Edge]: def export_rule_chains(self, limit: int) -> RuleChainData: return self.rule_chain_controller.export_rule_chains_using_get(limit=limit) - def save_rule_chain_meta_data(self, body: Optional[RuleChainMetaData] = None, - update_related: Optional[bool] = None) -> RuleChainMetaData: - return self.rule_chain_controller.save_rule_chain_meta_data_using_post(body=body, update_related=update_related) - def delete_rule_chain(self, rule_chain_id: RuleChainId) -> None: rule_chain_id = self.get_id(rule_chain_id) return self.rule_chain_controller.delete_rule_chain_using_delete(rule_chain_id=rule_chain_id) - def get_rule_chain_output_labels(self, rule_chain_id: RuleChainId) -> List[str]: - rule_chain_id = self.get_id(rule_chain_id) - return self.rule_chain_controller.get_rule_chain_output_labels_using_get(rule_chain_id=rule_chain_id) - def set_edge_template_root_rule_chain(self, rule_chain_id: RuleChainId) -> RuleChain: rule_chain_id = self.get_id(rule_chain_id) return self.rule_chain_controller.set_edge_template_root_rule_chain_using_post(rule_chain_id=rule_chain_id) @@ -309,10 +247,6 @@ def set_root_rule_chain(self, rule_chain_id: RuleChainId) -> RuleChain: rule_chain_id = self.get_id(rule_chain_id) return self.rule_chain_controller.set_root_rule_chain_using_post(rule_chain_id=rule_chain_id) - def get_rule_chain_output_labels_usage(self, rule_chain_id: RuleChainId) -> List[RuleChainOutputLabelsUsage]: - rule_chain_id = self.get_id(rule_chain_id) - return self.rule_chain_controller.get_rule_chain_output_labels_usage_using_get(rule_chain_id=rule_chain_id) - def get_rule_chains(self, page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataRuleChain: @@ -345,12 +279,6 @@ def logout(self, ) -> None: def check_reset_token(self, reset_token: str) -> str: return self.auth_controller.check_reset_token_using_get(reset_token=reset_token) - def reset_password(self, body: Optional[ResetPasswordRequest] = None) -> JWTPair: - return self.auth_controller.reset_password_using_post(body=body) - - def activate_user(self, body: Optional[ActivateUserRequest] = None, send_activation_mail: Optional[bool] = None) -> JWTPair: - return self.auth_controller.activate_user_using_post(body=body, send_activation_mail=send_activation_mail) - def get_user_password_policy(self, ) -> UserPasswordPolicy: return self.auth_controller.get_user_password_policy_using_get() @@ -361,19 +289,6 @@ def request_reset_password_by_email(self, body: Optional[ResetPasswordEmailReque return self.auth_controller.request_reset_password_by_email_using_post(body=body) # Event Controller - def get_events_post(self, tenant_id: TenantId, page_size: int, page: int, entity_id: EntityId, - body: Optional[EventFilter] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, - sort_order: Optional[str] = None, start_time: Optional[int] = None, - end_time: Optional[int] = None): - tenant_id = self.get_id(tenant_id) - entity_type = self.get_type(entity_id) - entity_id = self.get_id(entity_id) - return self.event_controller.get_events_using_post(tenant_id=tenant_id, page_size=page_size, page=page, - entity_type=entity_type, entity_id=entity_id, body=body, - text_search=text_search, sort_property=sort_property, - sort_order=sort_order, start_time=start_time, - end_time=end_time) - def get_events_v1_get1(self, entity_id: EntityId, event_type: str, tenant_id: TenantId, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None, @@ -387,25 +302,6 @@ def get_events_v1_get1(self, entity_id: EntityId, event_type: str, tenant_id: Te sort_property=sort_property, sort_order=sort_order, start_time=start_time, end_time=end_time) - def clear_events_post(self, entity_id: EntityId, body: Optional[str] = None, start_time: Optional[int] = None, - end_time: Optional[int] = None): - entity_type = self.get_type(entity_id) - entity_id = self.get_id(entity_id) - return self.event_controller.clear_events_using_post(entity_type=entity_type, entity_id=entity_id, body=body, - start_time=start_time, end_time=end_time) - - def get_events_get(self, entity_id: EntityId, tenant_id: TenantId, page_size: int, page: int, - text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None, - start_time: Optional[int] = None, end_time: Optional[int] = None) -> PageDataEvent: - entity_type = self.get_type(entity_id) - entity_id = self.get_id(entity_id) - tenant_id = self.get_id(tenant_id) - return self.event_controller.get_events_using_get(entity_type=entity_type, entity_id=entity_id, - tenant_id=tenant_id, page_size=page_size, page=page, - text_search=text_search, sort_property=sort_property, - sort_order=sort_order, start_time=start_time, - end_time=end_time) - # Telemetry Controller def get_attribute_keys_by_scope(self, entity_id: EntityId, scope: str): entity_type = self.get_type(entity_id) @@ -519,59 +415,10 @@ def delete_entity_attributes(self, entity_id: EntityId, scope: str, keys: str): keys=keys) # Alarm Controller - def ack_alarm(self, alarm_id: AlarmId) -> None: - alarm_id = self.get_id(alarm_id) - return self.alarm_controller.ack_alarm_using_post(alarm_id=alarm_id) - - def get_alarm_info_by_id(self, alarm_id: AlarmId) -> AlarmInfo: - alarm_id = self.get_id(alarm_id) - return self.alarm_controller.get_alarm_info_by_id_using_get(alarm_id=alarm_id) - - def get_highest_alarm_severity(self, entity_id: EntityId, search_status: Optional[str] = None, - status: Optional[str] = None) -> str: - entity_type = self.get_type(entity_id) - entity_id = self.get_id(entity_id) - return self.alarm_controller.get_highest_alarm_severity_using_get(entity_type=entity_type, entity_id=entity_id, - search_status=search_status, status=status) - def clear_alarm(self, alarm_id: AlarmId) -> None: alarm_id = self.get_id(alarm_id) return self.alarm_controller.clear_alarm_using_post(alarm_id=alarm_id) - def save_alarm(self, body: Optional[Alarm] = None) -> Alarm: - return self.alarm_controller.save_alarm_using_post(body=body) - - def get_alarms(self, entity_id: EntityId, page_size: int, page: int, search_status: Optional[str] = None, - status: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, - sort_order: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, - fetch_originator: Optional[bool] = None): - entity_type = self.get_type(entity_id) - entity_id = self.get_id(entity_id) - return self.alarm_controller.get_alarms_using_get(entity_type=entity_type, entity_id=entity_id, - page_size=page_size, page=page, search_status=search_status, - status=status, text_search=text_search, - sort_property=sort_property, sort_order=sort_order, - start_time=start_time, end_time=end_time, - fetch_originator=fetch_originator) - - def get_alarm_by_id(self, alarm_id: AlarmId) -> Alarm: - alarm_id = self.get_id(alarm_id) - return self.alarm_controller.get_alarm_by_id_using_get(alarm_id=alarm_id) - - def get_all_alarms(self, page_size: int, page: int, search_status: Optional[str] = None, status: Optional[str] = None, - text_search: Optional[str] = None, - sort_property: Optional[str] = None, sort_order: Optional[str] = None, start_time: Optional[int] = None, - end_time: Optional[int] = None, fetch_originator: Optional[bool] = None): - return self.alarm_controller.get_all_alarms_using_get(page_size=page_size, page=page, - search_status=search_status, status=status, - text_search=text_search, sort_property=sort_property, - sort_order=sort_order, start_time=start_time, - end_time=end_time, fetch_originator=fetch_originator) - - def delete_alarm(self, alarm_id: AlarmId) -> bool: - alarm_id = self.get_id(alarm_id) - return self.alarm_controller.delete_alarm_using_delete(alarm_id=alarm_id) - # RPC v2 Controller def get_persisted_rpc(self, rpc_id: RpcId) -> Rpc: rpc_id = self.get_id(rpc_id) @@ -692,21 +539,6 @@ def save_user(self, body: Optional[User] = None, send_activation_mail: Optional[ def send_activation_email(self, email: str) -> None: return self.user_controller.send_activation_email_using_post(email=email) - # Queue Controller - def get_queue_by_id(self, queue_id: QueueId) -> Queue: - queue_id = self.get_id(queue_id) - return self.queue_controller.get_queue_by_id_using_get(queue_id=queue_id) - - def delete_queue(self, queue_id: QueueId) -> None: - queue_id = self.get_id(queue_id) - return self.queue_controller.delete_queue_using_delete(queue_id=queue_id) - - def save_queue(self, service_type: str, body: Optional[Queue] = None) -> Queue: - return self.queue_controller.save_queue_using_post(service_type=service_type, body=body) - - def get_tenant_queues_by_service_type(self, service_type: str) -> List[str]: - return self.queue_controller.get_tenant_queues_by_service_type_using_get(service_type=service_type) - # RPC v1 Controller def handle_one_way_device_rpc_request(self, device_id: DeviceId, body: Optional[str] = None): @@ -735,9 +567,6 @@ def get_devices_by_ids(self, device_ids: list) -> List[Device]: device_ids = ','.join(device_ids) return self.device_controller.get_devices_by_ids_using_get(device_ids=device_ids) - def claim_device(self, device_name: str, body: Optional[ClaimRequest] = None): - return self.device_controller.claim_device_using_post(device_name=device_name, body=body) - def save_device_with_credentials(self, body: Optional[SaveDeviceWithCredentialsRequest] = None) -> Device: return self.device_controller.save_device_with_credentials_using_post(body=body) @@ -761,17 +590,20 @@ def get_device_by_id(self, device_id: DeviceId) -> Device: def get_tenant_device_infos(self, page_size: int, page: int, type: Optional[str] = None, device_profile_id: Optional[DeviceProfileId] = None, text_search: Optional[str] = None, - sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataDeviceInfo: + sort_property: Optional[str] = None, sort_order: Optional[str] = None, + active: Optional[bool] = None) -> PageDataDeviceInfo: device_profile_id = self.get_id(device_profile_id) return self.device_controller.get_tenant_device_infos_using_get(page_size=page_size, page=page, type=type, device_profile_id=device_profile_id, text_search=text_search, sort_property=sort_property, - sort_order=sort_order) + sort_order=sort_order, active=active) def get_customer_device_infos(self, customer_id: CustomerId, page_size: int, page: int, type: Optional[str] = None, - device_profile_id: Optional[DeviceProfileId] = None, text_search: Optional[str] = None, - sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataDeviceInfo: + device_profile_id: Optional[DeviceProfileId] = None, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, sort_order: Optional[str] = None, + active: Optional[bool] = None) -> PageDataDeviceInfo: customer_id = self.get_id(customer_id) device_profile_id = self.get_id(device_profile_id) return self.device_controller.get_customer_device_infos_using_get(customer_id=customer_id, page_size=page_size, @@ -779,9 +611,10 @@ def get_customer_device_infos(self, customer_id: CustomerId, page_size: int, pag device_profile_id=device_profile_id, text_search=text_search, sort_property=sort_property, - sort_order=sort_order) + sort_order=sort_order, active=active) - def get_tenant_devices(self, page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, + def get_tenant_devices(self, page_size: int, page: int, type: Optional[str] = None, + text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataDevice: return self.device_controller.get_tenant_devices_using_get(page_size=page_size, page=page, type=type, @@ -796,10 +629,6 @@ def get_customer_devices(self, customer_id: CustomerId, page_size: int, page: in page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_device_info_by_id(self, device_id: DeviceId) -> DeviceInfo: - device_id = self.get_id(device_id) - return self.device_controller.get_device_info_by_id_using_get(device_id=device_id) - def unassign_device_from_edge(self, edge_id: EdgeId, device_id: DeviceId) -> Device: edge_id = self.get_id(edge_id) device_id = self.get_id(device_id) @@ -833,12 +662,15 @@ def assign_device_to_customer(self, customer_id: CustomerId, device_id: DeviceId def get_edge_devices(self, edge_id: EdgeId, page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None, start_time: Optional[int] = None, - end_time: Optional[int] = None) -> PageDataDevice: + end_time: Optional[int] = None, device_profile_id: Optional[DeviceProfileId] = None, active: Optional[bool] = None) -> PageDataDevice: edge_id = self.get_id(edge_id) + + if device_profile_id: + device_profile_id = self.get_id(device_profile_id) return self.device_controller.get_edge_devices_using_get(edge_id=edge_id, page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order, - start_time=start_time, end_time=end_time) + start_time=start_time, end_time=end_time, device_profile_id=device_profile_id, active=active) def get_tenant_device(self, device_name: str) -> Device: return self.device_controller.get_tenant_device_using_get(device_name=device_name) @@ -959,10 +791,6 @@ def get_customer_entity_view_infos(self, customer_id: CustomerId, page_size: int sort_property=sort_property, sort_order=sort_order) - def get_entity_view_info_by_id(self, entity_view_id: EntityViewId) -> EntityViewInfo: - entity_view_id = self.get_id(entity_view_id) - return self.entity_view_controller.get_entity_view_info_by_id_using_get(entity_view_id=entity_view_id) - def get_tenant_entity_view_infos(self, page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataEntityViewInfo: return self.entity_view_controller.get_tenant_entity_view_infos_using_get(page_size=page_size, page=page, @@ -1029,53 +857,6 @@ def get_customer_entity_views(self, customer_id: CustomerId, page_size: int, pag def get_admin_settings(self, key: str) -> AdminSettings: return self.admin_controller.get_admin_settings_using_get(key=key) - def check_updates(self, ) -> UpdateMessage: - return self.admin_controller.check_updates_using_get() - - def send_test_sms(self, body: Optional[TestSmsRequest] = None) -> None: - return self.admin_controller.send_test_sms_using_post(body=body) - - def get_security_settings(self, ) -> SecuritySettings: - return self.admin_controller.get_security_settings_using_get() - - def send_test_mail(self, body: Optional[AdminSettings] = None) -> None: - return self.admin_controller.send_test_mail_using_post(body=body) - - def save_admin_settings(self, body: Optional[AdminSettings] = None) -> AdminSettings: - return self.admin_controller.save_admin_settings_using_post(body=body) - - def save_security_settings(self, body: Optional[SecuritySettings] = None) -> SecuritySettings: - return self.admin_controller.save_security_settings_using_post(body=body) - - # Sign Up Controller - def get_recaptcha_public_key(self, ) -> str: - return self.sign_up_controller.get_recaptcha_public_key_using_get() - - def sign_up(self, body: Optional[SignUpRequest] = None) -> str: - return self.sign_up_controller.sign_up_using_post(body=body) - - def accept_privacy_policy(self, ) -> Union[dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.sign_up_controller.accept_privacy_policy_using_post() - - def resend_email_activation(self, email: str, pkg_name: Optional[str] = None) -> None: - return self.sign_up_controller.resend_email_activation_using_post(email=email, pkg_name=pkg_name) - - def activate_user_by_email_code(self, email_code: str, pkg_name: Optional[str] = None) -> Union[ - dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.sign_up_controller.activate_user_by_email_code_using_post(email_code=email_code, pkg_name=pkg_name) - - def delete_tenant_account(self, ) -> None: - return self.sign_up_controller.delete_tenant_account_using_delete() - - def privacy_policy_accepted(self, ) -> bool: - return self.sign_up_controller.privacy_policy_accepted_using_get() - - def activate_email(self, email_code: str, pkg_name: Optional[str] = None) -> str: - return self.sign_up_controller.activate_email_using_get(email_code=email_code, pkg_name=pkg_name) - - def mobile_login(self, pkg_name: str) -> str: - return self.sign_up_controller.mobile_login_using_get(pkg_name=pkg_name) - # TB Resource Controller def get_resource_info_by_id(self, resource_id: EntityId) -> TbResourceInfo: resource_id = self.get_id(resource_id) @@ -1115,6 +896,17 @@ def get_lwm2m_list_objects_page(self, page_size: int, page: int, text_search: Op sort_property=sort_property, sort_order=sort_order) + def get_features_info(self) -> FeaturesInfo: + return self.admin_controller.get_features_info_using_get() + + def get_system_info(self) -> SystemInfo: + return self.admin_controller.get_system_info_using_get() + + def get_highest_alarm_severity(self, entity_id: EntityId, search_status: Optional[str] = None, status: Optional[str] = None, assignee_id: Optional[str] = None) -> str: + entity_type = self.get_type(entity_id) + entity_id = self.get_id(entity_id) + return self.alarm_controller.get_highest_alarm_severity_using_get(entity_id=entity_id, entity_type=entity_type, search_status=search_status, status=status, assignee_id=assignee_id) + # O Auth 2 Controller def get_login_processing_url(self, ) -> str: return self.o_auth2_controller.get_login_processing_url_using_get() @@ -1315,16 +1107,6 @@ def get_tenant_dashboards(self, page_size: int, page: int, mobile: Optional[bool sort_property=sort_property, sort_order=sort_order) - def get_customer_dashboards(self, customer_id: CustomerId, page_size: int, page: int, mobile: Optional[bool] = None, - text_search: Optional[str] = None, - sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataDashboardInfo: - customer_id = self.get_id(customer_id) - return self.dashboard_controller.get_customer_dashboards_using_get(customer_id=customer_id, page_size=page_size, - page=page, mobile=mobile, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - def assign_dashboard_to_customer(self, customer_id: CustomerId, dashboard_id: DashboardId) -> Dashboard: customer_id = self.get_id(customer_id) dashboard_id = self.get_id(dashboard_id) @@ -1434,15 +1216,6 @@ def get_audit_logs_by_entity_id(self, entity_id: EntityId, page_size: int, page: start_time=start_time, end_time=end_time, action_types=action_types) - def get_audit_logs(self, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, - sort_order: Optional[str] = None, - start_time: Optional[int] = None, end_time: Optional[int] = None, - action_types: Optional[str] = None) -> PageDataAuditLog: - return self.audit_log_controller.get_audit_logs_using_get(page_size=page_size, page=page, - text_search=text_search, sort_property=sort_property, - sort_order=sort_order, start_time=start_time, - end_time=end_time, action_types=action_types) - # Lwm2m Controller def get_lwm2m_bootstrap_security_info(self, is_bootstrap_server: bool): return self.lwm2m_controller.get_lwm2m_bootstrap_security_info_using_get( @@ -1538,3 +1311,44 @@ def download_ota_package(self, ota_package_id: OtaPackageId) -> Resource: def get_ota_package_info_by_id(self, ota_package_id: OtaPackageId) -> OtaPackageInfo: ota_package_id = self.get_id(ota_package_id) return self.ota_package_controller.get_ota_package_info_by_id_using_get(ota_package_id=ota_package_id) + + def assign_alarm(self, alarm_id: AlarmId, assignee_id: str) -> Alarm: + alarm_id = self.get_id(alarm_id) + return self.alarm_controller.assign_alarm_using_post(alarm_id=alarm_id, assignee_id=assignee_id) + + # Asset Profile Controller + def delete_asset_profile(self, asset_profile_id: str): + return self.asset_profile_controller.delete_asset_profile_using_delete(asset_profile_id=asset_profile_id) + + def get_asset_profile_by_id(self, asset_profile_id: str) -> AssetProfile: + return self.asset_profile_controller.get_asset_profile_by_id_using_get(asset_profile_id=asset_profile_id) + + def get_asset_profile_info_by_id(self, asset_profile_id: str) -> AssetProfileInfo: + return self.asset_profile_controller.get_asset_profile_info_by_id_using_get(asset_profile_id=asset_profile_id) + + def get_asset_profile_infos(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataAssetProfileInfo: + return self.asset_profile_controller.get_asset_profile_infos_using_get(page_size=page_size, + page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def get_asset_profiles(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataAssetProfile: + return self.asset_profile_controller.get_asset_profiles_using_get(page_size=page_size, + page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def get_default_asset_profile_info(self) -> AssetProfileInfo: + return self.asset_profile_controller.get_default_asset_profile_info_using_get() + + def save_asset_profile(self, body: AssetProfile) -> AssetProfile: + return self.asset_profile_controller.save_asset_profile_using_post(body=body) + + def set_default_asset_profile(self, asset_profile_id: str) -> AssetProfile: + return self.asset_profile_controller.set_default_asset_profile_using_post(asset_profile_id=asset_profile_id) diff --git a/tb_rest_client/rest_client_pe.py b/tb_rest_client/rest_client_pe.py index adef68cc..7404699b 100644 --- a/tb_rest_client/rest_client_pe.py +++ b/tb_rest_client/rest_client_pe.py @@ -16,6 +16,7 @@ from tb_rest_client.rest_client_base import * from tb_rest_client.api.api_pe import * +from tb_rest_client.api.api_pe import DashboardControllerApi from tb_rest_client.models.models_pe import * logger = getLogger(__name__) @@ -93,43 +94,41 @@ def get_tenant_assets(self, page_size: int, page: int, type: Optional[str] = Non sort_order=sort_order) # Asset Controller - def delete_asset(self, asset_id: AssetId) -> None: - asset_id = self.get_id(asset_id) - return self.asset_controller.delete_asset_using_delete(asset_id=asset_id) - - def asset_find_by_query(self, body: Optional[AssetSearchQuery] = None) -> List[Asset]: - return self.asset_controller.find_by_query_using_post(body=body) - - def get_customer_assets(self, customer_id: CustomerId, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, - sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataAsset: - customer_id = self.get_id(customer_id) - return self.asset_controller.get_customer_assets_using_get(customer_id=customer_id, page_size=page_size, - page=page, type=type, text_search=text_search, - sort_property=sort_property, sort_order=sort_order) - def process_asset_bulk_import(self, body: Optional[BulkImportRequest] = None) -> BulkImportResultAsset: return self.asset_controller.process_asset_bulk_import_using_post(body=body) - def get_tenant_asset(self, asset_name: str) -> Asset: - return self.asset_controller.get_tenant_asset_using_get(asset_name=asset_name) - - def get_asset_by_id(self, asset_id: AssetId) -> Asset: - asset_id = self.get_id(asset_id) - return self.asset_controller.get_asset_by_id_using_get(asset_id=asset_id) - - def get_assets_by_ids(self, asset_ids: list) -> List[Asset]: - asset_ids = ','.join(asset_ids) - return self.asset_controller.get_assets_by_ids_using_get(asset_ids=asset_ids) - - def save_asset(self, body: Optional[Asset] = None, entity_group_id: EntityGroupId = None): + def save_asset(self, body: Optional[Asset] = None, entity_group_id: EntityGroupId = None, entity_group_ids: Optional[str] = None): entity_group_id = self.get_id(entity_group_id) - return self.asset_controller.save_asset_using_post(body=body, entity_group_id=entity_group_id) - - def asset_get_tenant_assets(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None, - sort_order: Optional[str] = None) -> PageDataAsset: - return self.asset_controller.get_tenant_assets_using_get(page_size=page_size, page=page, type=type, - text_search=text_search, sort_property=sort_property, - sort_order=sort_order) + if entity_group_ids: + entity_group_ids = ','.join(entity_group_ids) + return self.asset_controller.save_asset_using_post(body=body, entity_group_id=entity_group_id, entity_group_ids=entity_group_ids) + + def get_all_customer_infos(self, page_size: int, page: int, type: Optional[str] = None, + text_search: Optional[str] = None, sort_property: Optional[str] = None, + sort_order: Optional[str] = None, + include_customers: Optional[bool] = None) -> PageDataCustomerInfo: + return self.customer_controller.get_all_customer_infos_using_get(page_size=page_size, page=page, type=type, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + include_customers=include_customers) + + def get_customer_customer_infos(self, customer_id: CustomerId, page_size: int, page: int, + type: Optional[str] = None, + text_search: Optional[str] = None, sort_property: Optional[str] = None, + sort_order: Optional[str] = None, + include_customers: Optional[bool] = None) -> PageDataCustomerInfo: + customer_id = self.get_id(customer_id) + return self.customer_controller.get_customer_customer_infos_using_get(page_size=page_size, page=page, type=type, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + include_customers=include_customers, + customer_id=customer_id) + + def get_customer_info_by_id(self, customer_id: CustomerId) -> CustomerInfo: + customer_id = self.get_id(customer_id) + return self.customer_controller.get_customer_info_by_id_using_get(customer_id=customer_id) def get_assets_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: int, page: int,text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) -> PageDataAsset: @@ -140,14 +139,13 @@ def get_assets_by_entity_group_id(self, entity_group_id: EntityGroupId, page_siz sort_property=sort_property, sort_order=sort_order) - def asset_get_asset_types(self, ) -> List[EntitySubtype]: - return self.asset_controller.get_asset_types_using_get() - def get_user_assets(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None, - sort_order: Optional[str] = None) -> PageDataAsset: + sort_order: Optional[str] = None, asset_profile_id: Optional[AssetProfileId] = None) -> PageDataAsset: + if asset_profile_id: + asset_profile_id = self.get_id(asset_profile_id) return self.asset_controller.get_user_assets_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, - sort_order=sort_order) + sort_order=sort_order, asset_profile_id=asset_profile_id) def delete_device_group_ota_package(self, id: str) -> None: return self.device_group_ota_package_controller.delete_device_group_ota_package_using_delete(id=id) @@ -163,10 +161,6 @@ def save_device_group_ota_package(self, body: Optional[DeviceGroupOtaPackage] = def find_by_query_v2(self, body: Optional[EdgeSearchQuery] = None) -> List[Edge]: return self.edge_controller.find_by_query_using_post2(body=body) - def sync_edge(self, edge_id: EdgeId) -> None: - edge_id = self.get_id(edge_id) - return self.edge_controller.sync_edge_using_post(edge_id=edge_id) - def check_instance(self, body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None) -> Union[ dict, str, list, bytes, None, RESTResponse, tuple, Any]: return self.edge_controller.check_instance_using_post(body=body) @@ -272,19 +266,23 @@ def ocean_connect_process_request_v2_put2(self, body: str, request_headers: dict def get_allowed_permissions(self, ) -> AllowedPermissionsInfo: return self.user_permissions_controller.get_allowed_permissions_using_get() - def change_owner_to_customer(self, owner_id: UserId, entity_id: EntityId) -> None: + def change_owner_to_customer(self, owner_id: UserId, entity_id: EntityId, body: Optional[List[str]] = None) -> None: owner_id = self.get_id(owner_id) entity_type = self.get_type(entity_id) entity_id = self.get_id(entity_id) + if body: + body = ','.join(body) return self.owner_controller.change_owner_to_customer_using_post(owner_id=owner_id, entity_type=entity_type, - entity_id=entity_id) + entity_id=entity_id, body=body) - def change_owner_to_tenant(self, owner_id: UserId, entity_id: EntityId) -> None: + def change_owner_to_tenant(self, owner_id: UserId, entity_id: EntityId, body: Optional[List[str]] = None) -> None: owner_id = self.get_id(owner_id) entity_type = self.get_type(entity_id) entity_id = self.get_id(entity_id) + if body: + body = ','.join(body) return self.owner_controller.change_owner_to_tenant_using_post(owner_id=owner_id, entity_type=entity_type, - entity_id=entity_id) + entity_id=entity_id, body=body) def get_persisted_rpc(self, rpc_id: RpcId) -> Rpc: rpc_id = self.get_id(rpc_id) @@ -316,10 +314,6 @@ def get_persisted_rpc_by_device(self, device_id: DeviceId, page_size: int, page: sort_property=sort_property, sort_order=sort_order) - def delete_resource(self, rpc_id: RpcId) -> None: - rpc_id = self.get_id(rpc_id) - return self.rpc_v2_controller.delete_resource_using_delete(rpc_id=rpc_id) - def get_customers_by_ids(self, customer_ids: str) -> List[Customer]: return self.customer_controller.get_customers_by_ids_using_get(customer_ids=customer_ids) @@ -357,9 +351,12 @@ def get_short_customer_info_by_id(self, customer_id: CustomerId) -> Union[ customer_id = self.get_id(customer_id) return self.customer_controller.get_short_customer_info_by_id_using_get(customer_id=customer_id) - def save_customer(self, entity_group_id: EntityGroupId = None, body: Optional[Customer] = None) -> Customer: - entity_group_id = self.get_id(entity_group_id) - return self.customer_controller.save_customer_using_post(entity_group_id=entity_group_id, body=body) + def save_customer(self, body: Optional[Customer] = None, entity_group_id: Optional[EntityGroupId] = None, entity_group_ids: Optional[List[str]] = None) -> Customer: + if entity_group_id: + entity_group_id = self.get_id(entity_group_id) + if entity_group_ids: + entity_group_ids = ','.join(entity_group_ids) + return self.customer_controller.save_customer_using_post(body=body, entity_group_id=entity_group_id, entity_group_ids=entity_group_ids) def get_tenant_customer(self, customer_title: str) -> Customer: return self.customer_controller.get_tenant_customer_using_get(customer_title=customer_title) @@ -418,8 +415,14 @@ def is_user_token_access_enabled(self, ) -> bool: def get_users_by_ids(self, user_ids: list) -> List[User]: return self.user_controller.get_users_by_ids_using_get(user_ids=str(user_ids)) - def save_user(self, body: Optional[User] = None, send_activation_mail: Optional[bool] = None) -> User: - return self.user_controller.save_user_using_post(body=body, send_activation_mail=send_activation_mail) + def save_user(self, body: Optional[User] = None, send_activation_mail: Optional[bool] = None, entity_group_id: Optional[EntityGroupId] = None, entity_group_ids: Optional[List[str]] = None) -> User: + if entity_group_id: + entity_group_id = self.get_id(entity_group_id) + + if entity_group_ids: + entity_group_ids = ','.join(entity_group_ids) + + return self.user_controller.save_user_using_post(body=body, send_activation_mail=send_activation_mail, entity_group_id=entity_group_id, entity_group_ids=entity_group_ids) def send_activation_email(self, email: str) -> None: return self.user_controller.send_activation_email_using_post(email=email) @@ -492,9 +495,6 @@ def get_user_devices(self, page_size: int, page: int, type: Optional[str] = None text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def claim_device(self, device_name: str, body: Optional[ClaimRequest] = None): - return self.device_controller.claim_device_using_post(device_name=device_name, body=body) - def save_device_with_credentials(self, body: Optional[SaveDeviceWithCredentialsRequest] = None) -> Device: return self.device_controller.save_device_with_credentials_using_post(body=body) @@ -600,76 +600,30 @@ def find_all_related_edges_missing_attributes(self, integration_id: IntegrationI return self.integration_controller.find_all_related_edges_missing_attributes_using_get( integration_id=integration_id) - def find_all_related_edges_missing_attributes_head(self, integration_id: IntegrationId) -> str: - integration_id = self.get_id(integration_id) - return self.integration_controller.find_all_related_edges_missing_attributes_using_head( - integration_id=integration_id) - - def find_all_related_edges_missing_attributes_options(self, integration_id: IntegrationId) -> str: - integration_id = self.get_id(integration_id) - return self.integration_controller.find_all_related_edges_missing_attributes_using_options( - integration_id=integration_id) - - def find_all_related_edges_missing_attributes_patch(self, integration_id: IntegrationId) -> str: - integration_id = self.get_id(integration_id) - return self.integration_controller.find_all_related_edges_missing_attributes_using_patch( - integration_id=integration_id) - - def find_all_related_edges_missing_attributes_post(self, integration_id: IntegrationId) -> str: - integration_id = self.get_id(integration_id) - return self.integration_controller.find_all_related_edges_missing_attributes_using_post( - integration_id=integration_id) - - def find_all_related_edges_missing_attributes_put(self, integration_id: IntegrationId) -> str: - integration_id = self.get_id(integration_id) - return self.integration_controller.find_all_related_edges_missing_attributes_using_put( - integration_id=integration_id) - - def find_edge_missing_attributes_delete(self, edge_id: EdgeId, integration_ids: str) -> str: + def get_edge_integration_infos(self, edge_id: EdgeId, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None, ) -> PageDataIntegrationInfo: edge_id = self.get_id(edge_id) - return self.integration_controller.find_edge_missing_attributes_using_delete(edge_id=edge_id, - integration_ids=integration_ids) + return self.integration_controller.get_edge_integration_infos_using_get(edge_id=edge_id, page_size=page_size, + page=page, text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) def find_edge_missing_attributes_get(self, edge_id: EdgeId, integration_ids: str) -> str: edge_id = self.get_id(edge_id) return self.integration_controller.find_edge_missing_attributes_using_get(edge_id=edge_id, integration_ids=integration_ids) - def find_edge_missing_attributes_head(self, edge_id: EdgeId, integration_ids: str) -> str: - edge_id = self.get_id(edge_id) - return self.integration_controller.find_edge_missing_attributes_using_head(edge_id=edge_id, - integration_ids=integration_ids) - - def find_edge_missing_attributes_options(self, edge_id: EdgeId, integration_ids: str) -> str: - edge_id = self.get_id(edge_id) - return self.integration_controller.find_edge_missing_attributes_using_options(edge_id=edge_id, - integration_ids=integration_ids) - - def find_edge_missing_attributes_patch(self, edge_id: EdgeId, integration_ids: str) -> str: - edge_id = self.get_id(edge_id) - return self.integration_controller.find_edge_missing_attributes_using_patch(edge_id=edge_id, - integration_ids=integration_ids) - - def find_edge_missing_attributes_post(self, edge_id: EdgeId, integration_ids: str) -> str: - edge_id = self.get_id(edge_id) - return self.integration_controller.find_edge_missing_attributes_using_post(edge_id=edge_id, - integration_ids=integration_ids) - - def find_edge_missing_attributes_put(self, edge_id: EdgeId, integration_ids: str) -> str: - edge_id = self.get_id(edge_id) - return self.integration_controller.find_edge_missing_attributes_using_put(edge_id=edge_id, - integration_ids=integration_ids) - def save_converter(self, body: Optional[Converter] = None) -> Converter: return self.converter_controller.save_converter_using_post(body=body) - def test_down_link_converter(self, body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None) -> Union[ + def test_down_link_converter(self, body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None, script_lang: Optional[str] = None) -> Union[ dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.converter_controller.test_down_link_converter_using_post(body=body) + return self.converter_controller.test_down_link_converter_using_post(body=body, script_lang=script_lang) - def test_up_link_converter(self, body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None) -> Union[ + def test_up_link_converter(self, body: Union[dict, str, list, bytes, None, RESTResponse, tuple, Any] = None, script_lang: Optional[str] = None) -> Union[ dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.converter_controller.test_up_link_converter_using_post(body=body) + return self.converter_controller.test_up_link_converter_using_post(body=body, script_lang=script_lang) def get_entity_view_types(self, ) -> List[EntitySubtype]: return self.entity_view_controller.get_entity_view_types_using_get() @@ -703,8 +657,12 @@ def get_entity_views_by_ids(self, entity_view_ids: list) -> List[EntityView]: entity_view_ids = ','.join(entity_view_ids) return self.entity_view_controller.get_entity_views_by_ids_using_get(entity_view_ids=entity_view_ids) - def save_entity_view(self, body: Optional[EntityView] = None) -> EntityView: - return self.entity_view_controller.save_entity_view_using_post(body=body) + def save_entity_view(self, body: Optional[EntityView] = None, entity_group_id: Optional[EntityGroupId] = None, entity_group_ids: Optional[List[str]] = None) -> EntityView: + if entity_group_id: + entity_group_id = self.get_id(entity_group_id) + if entity_group_ids: + entity_group_ids = ','.join(entity_group_ids) + return self.entity_view_controller.save_entity_view_using_post(body=body, entity_group_id=entity_group_id, entity_group_ids=entity_group_ids) def get_tenant_entity_views(self, page_size: int, page: int, type: Optional[str] = None,text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataEntityView: @@ -732,36 +690,24 @@ def handle_rule_engine_request(self, entity_id: EntityId, timeout: int, body: Op entity_id=entity_id, timeout=timeout, body=body) - def handle_rule_engine_request_v1(self, entity_id: EntityId, body: Optional[str] = None): + def handle_rule_engine_request_v1(self, entity_id: EntityId, body: Optional[str] = None, + queue_name: Optional[str] = None, + timeout: Optional[int] = None) -> DeferredResultResponseEntity: entity_type = self.get_type(entity_id) entity_id = self.get_id(entity_id) return self.rule_engine_controller.handle_rule_engine_request_using_post1(entity_type=entity_type, - entity_id=entity_id, body=body) + entity_id=entity_id, body=body, + queue_nam=queue_name, timeout=timeout) - def handle_rule_engine_request_v2(self, body: Optional[str] = None): - return self.rule_engine_controller.handle_rule_engine_request_using_post2(body=body) + def handle_rule_engine_request_v2(self, entity_id: EntityId, body: Optional[str] = None): + entity_type = self.get_type(entity_id) + entity_id = self.get_id(entity_id) + return self.rule_engine_controller.handle_rule_engine_request_using_post2(entity_type=entity_type, + entity_id=entity_id, body=body) def get_admin_settings(self, key: str, system_by_default=None) -> AdminSettings: return self.admin_controller.get_admin_settings_using_get(key=key, system_by_default=system_by_default) - def check_updates(self, ) -> UpdateMessage: - return self.admin_controller.check_updates_using_get() - - def send_test_sms(self, body: Optional[TestSmsRequest] = None) -> None: - return self.admin_controller.send_test_sms_using_post(body=body) - - def get_security_settings(self, ) -> SecuritySettings: - return self.admin_controller.get_security_settings_using_get() - - def send_test_mail(self, body: Optional[AdminSettings] = None) -> None: - return self.admin_controller.send_test_mail_using_post(body=body) - - def save_admin_settings(self, body: Optional[AdminSettings] = None) -> AdminSettings: - return self.admin_controller.save_admin_settings_using_post(body=body) - - def save_security_settings(self, body: Optional[SecuritySettings] = None) -> SecuritySettings: - return self.admin_controller.save_security_settings_using_post(body=body) - def t_mobile_iot_cdp_process_request_v4_delete4(self, body: str, request_headers: dict, routing_key: str): return self.t_mobile_iot_cdp_integration_controller.process_request_using_delete4(body=body, request_headers=request_headers, @@ -797,25 +743,9 @@ def t_mobile_iot_cdp_process_request_v4_put4(self, body: str, request_headers: d request_headers=request_headers, routing_key=routing_key) - def get_recaptcha_public_key(self, ) -> str: - return self.sign_up_controller.get_recaptcha_public_key_using_get() - def sign_up(self, body: Optional[SignUpRequest] = None) -> str: return self.sign_up_controller.sign_up_using_post(body=body) - def accept_privacy_policy(self, ) -> Union[ - dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.sign_up_controller.accept_privacy_policy_using_post() - - def resend_cloud_email_activation(self, email: str) -> None: - return self.sign_up_controller.resend_cloud_email_activation_using_post(email=email) - - def set_not_display_welcome(self, ) -> None: - return self.sign_up_controller.set_not_display_welcome_using_post() - - def activate_cloud_email(self, email_code: str) -> str: - return self.sign_up_controller.activate_cloud_email_using_get(email_code=email_code) - def resend_email_activation(self, email: str, pkg_name: Optional[str] = None) -> None: return self.sign_up_controller.resend_email_activation_using_post(email=email, pkg_name=pkg_name) @@ -830,20 +760,9 @@ def accept_terms_of_use(self, ) -> Union[ dict, str, list, bytes, None, RESTResponse, tuple, Any]: return self.sign_up_controller.accept_terms_of_use_using_post() - def activate_cloud_user_by_email_code(self, email_code: str) -> Union[ - dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.sign_up_controller.activate_cloud_user_by_email_code_using_post(email_code=email_code) - - def accept_privacy_policy_and_terms_of_use(self, ) -> Union[ - dict, str, list, bytes, None, RESTResponse, tuple, Any]: - return self.sign_up_controller.accept_privacy_policy_and_terms_of_use_using_post() - def activate_email(self, email_code: str, pkg_name: Optional[str] = None) -> str: return self.sign_up_controller.activate_email_using_get(email_code=email_code, pkg_name=pkg_name) - def delete_tenant_account(self, body: Optional[DeleteTenantRequest] = None) -> None: - return self.sign_up_controller.delete_tenant_account_using_post(body=body) - def mobile_login(self, pkg_name: str) -> str: return self.sign_up_controller.mobile_login_using_get(pkg_name=pkg_name) @@ -855,9 +774,6 @@ def get_device_profiles_by_ids(self, device_profile_ids: list) -> List[DevicePro return self.device_profile_controller.get_device_profiles_by_ids_using_get( device_profile_ids=device_profile_ids) - def is_display_welcome(self, ) -> bool: - return self.sign_up_controller.is_display_welcome_using_get() - def delete_device_v1(self, ) -> None: return self.trail_controller.delete_device_using_delete1() @@ -1084,6 +1000,10 @@ def get_tenant_home_dashboard_info(self, ) -> HomeDashboardInfo: def set_customer_home_dashboard_info(self, body: Optional[HomeDashboardInfo] = None) -> None: return self.dashboard_controller.set_customer_home_dashboard_info_using_post(body=body) + def get_edge_docker_install_instructions(self, edge_id: EdgeId) -> EdgeInstallInstructions: + edge_id = self.get_id(edge_id) + return self.edge_controller.get_edge_docker_install_instructions_using_get(edge_id=edge_id) + def get_tenant_dashboards_v1(self, tenant_id: TenantId, page_size: int, page: int,text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataDashboardInfo: tenant_id = self.get_id(tenant_id) @@ -1154,6 +1074,15 @@ def get_integration_by_routing_key_get(self, routing_key: str) -> Integration: def get_integrations_by_ids_get(self, integration_ids: list) -> List[Integration]: return self.integration_controller.get_integrations_by_ids_using_get(integration_ids=str(integration_ids)) + def get_integration_infos(self, page_size: int, page: int, is_edge_template: Optional[bool], + text_search: Optional[str] = None, + sort_property: Optional[str] = None, sort_order: Optional[str] = None): + return self.integration_controller.get_integration_infos_using_get(page_size=page_size, page=page, + is_edge_template=is_edge_template, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + def get_integrations_get(self, page_size: int, page: int, is_edge_template: Optional[bool], text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataIntegration: return self.integration_controller.get_integrations_using_get(page_size=page_size, page=page, @@ -1165,11 +1094,6 @@ def get_integrations_get(self, page_size: int, page: int, is_edge_template: Opti def save_integration_post(self, body: Optional[Integration] = None) -> Integration: return self.integration_controller.save_integration_using_post(body=body) - def find_all_related_edges_missing_attributes_delete(self, integration_id: IntegrationId) -> str: - integration_id = self.get_id(integration_id) - return self.integration_controller.find_all_related_edges_missing_attributes_using_delete( - integration_id=integration_id) - def get_current_custom_menu(self, ) -> CustomMenu: return self.custom_menu_controller.get_current_custom_menu_using_get() @@ -1330,18 +1254,12 @@ def chirp_stack_process_request_put(self, body: str, request_headers: dict, rout request_headers=request_headers, routing_key=routing_key) - def get_app_theme_css(self, body: Optional[PaletteSettings] = None) -> str: - return self.white_labeling_controller.get_app_theme_css_using_post(body=body) - def get_current_login_white_label_params(self, ) -> LoginWhiteLabelingParams: return self.white_labeling_controller.get_current_login_white_label_params_using_get() def get_current_white_label_params(self, ) -> WhiteLabelingParams: return self.white_labeling_controller.get_current_white_label_params_using_get() - def get_login_theme_css(self, body: Optional[PaletteSettings] = None, dark_foreground: Optional[bool] = None) -> str: - return self.white_labeling_controller.get_login_theme_css_using_post(body=body, dark_foreground=dark_foreground) - def get_login_white_label_params(self, logo_image_checksum: str, favicon_checksum: str) -> LoginWhiteLabelingParams: return self.white_labeling_controller.get_login_white_label_params_using_get( logo_image_checksum=logo_image_checksum, favicon_checksum=favicon_checksum) @@ -1350,6 +1268,10 @@ def get_white_label_params(self, logo_image_checksum: str, favicon_checksum: str return self.white_labeling_controller.get_white_label_params_using_get(logo_image_checksum=logo_image_checksum, favicon_checksum=favicon_checksum) + def get_widgets_bundles_by_ids(self, widget_bundle_ids: List[str]) -> List[WidgetsBundle]: + widget_bundle_ids = ','.join(widget_bundle_ids) + return self.widgets_bundle_controller.get_widgets_bundles_by_ids_using_get(widget_bundle_ids=widget_bundle_ids) + def is_customer_white_labeling_allowed(self, ) -> bool: return self.white_labeling_controller.is_customer_white_labeling_allowed_using_get() @@ -1365,9 +1287,6 @@ def save_login_white_label_params(self, body: Optional[LoginWhiteLabelingParams] def save_white_label_params(self, body: Optional[WhiteLabelingParams] = None) -> WhiteLabelingParams: return self.white_labeling_controller.save_white_label_params_using_post(body=body) - def tenant_white_labeling_allowed(self, ) -> None: - return self.white_labeling_controller.tenant_white_labeling_allowed_using_get() - def delete_ota_package(self, ota_package_id: OtaPackageId) -> None: ota_package_id = self.get_id(ota_package_id) return self.ota_package_controller.delete_ota_package_using_delete(ota_package_id=ota_package_id) @@ -1458,19 +1377,32 @@ def get_entity_group_all_by_owner_and_type(self, owner_type: str, owner_id: User owner_id=owner_id, group_type=group_type) + def get_entity_groups_by_owner_and_type_and_page_link(self, owner_type: str, owner_id: UserId, group_type: str, + page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataEntityGroupInfo: + owner_id = self.get_id(owner_id) + return self.entity_group_controller.get_entity_groups_by_owner_and_type_and_page_link_using_get( + owner_type=owner_type, + owner_id=owner_id, + group_type=group_type, page_size=page_size, + page=page, text_search=text_search, + sort_property=sort_property, sort_order=sort_order) + def get_entity_group_by_id(self, entity_group_id: EntityGroupId) -> EntityGroupInfo: entity_group_id = self.get_id(entity_group_id) return self.entity_group_controller.get_entity_group_by_id_using_get(entity_group_id=entity_group_id) - def get_entity_group_by_owner_and_name_and_type(self, owner_type: str, owner_id: UserId, group_type: str, + def get_entity_group_by_owner_and_name_and_type(self, owner_id: UserId, group_type: str, group_name: str) -> EntityGroupInfo: + owner_type = self.get_type(owner_id) owner_id = self.get_id(owner_id) return self.entity_group_controller.get_entity_group_by_owner_and_name_and_type_using_get(owner_type=owner_type, owner_id=owner_id, group_type=group_type, group_name=group_name) - def get_entity_groups_by_ids(self, entity_group_ids: list) -> List[EntityGroup]: + def get_entity_groups_by_ids(self, entity_group_ids: List[str]) -> List[EntityGroupInfo]: entity_group_ids = ','.join(entity_group_ids) return self.entity_group_controller.get_entity_groups_by_ids_using_get(entity_group_ids=entity_group_ids) @@ -1480,8 +1412,8 @@ def get_entity_groups_by_owner_and_type(self, owner_type: str, owner_id: UserId, owner_id=owner_id, group_type=group_type) - def get_entity_groups_by_type(self, group_type: str) -> List[EntityGroupInfo]: - return self.entity_group_controller.get_entity_groups_by_type_using_get(group_type=group_type) + def get_entity_groups_by_type(self, group_type: str, include_shared: Optional[bool] = None) -> List[EntityGroupInfo]: + return self.entity_group_controller.get_entity_groups_by_type_using_get(group_type=group_type, include_shared=include_shared) def get_entity_groups_for_entity(self, entity_id: EntityId) -> List[EntityGroupId]: entity_type = self.get_type(entity_id) @@ -1565,7 +1497,270 @@ def uninstall_solution_template(self, solution_template_id) -> None: return self.solution_controller.uninstall_solution_template_using_delete( solution_template_id=solution_template_id) + # Asset Profile Controller + def delete_asset_profile(self, asset_profile_id: AssetProfileId): + asset_profile_id = self.get_id(asset_profile_id) + return self.asset_profile_controller.delete_asset_profile_using_delete(asset_profile_id=asset_profile_id) + + def get_asset_profile_by_id(self, asset_profile_id: AssetProfileId) -> AssetProfile: + asset_profile_id = self.get_id(asset_profile_id) + return self.asset_profile_controller.get_asset_profile_by_id_using_get(asset_profile_id=asset_profile_id) + + def get_asset_profile_info_by_id(self, asset_profile_id: AssetProfileId) -> AssetProfileInfo: + asset_profile_id = self.get_id(asset_profile_id) + return self.asset_profile_controller.get_asset_profile_info_by_id_using_get(asset_profile_id=asset_profile_id) + + def get_asset_profile_infos(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataAssetProfileInfo: + return self.asset_profile_controller.get_asset_profile_infos_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def get_asset_profiles_by_ids(self, asset_profile_ids: List[str]) -> List[AssetProfileInfo]: + asset_profile_ids = ','.join(asset_profile_ids) + return self.asset_profile_controller.get_asset_profiles_by_ids_using_get(asset_profile_ids=asset_profile_ids) + + def get_asset_profiles(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataAssetProfile: + return self.asset_profile_controller.get_asset_profiles_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def get_default_asset_profile_info(self) -> AssetProfileInfo: + return self.asset_profile_controller.get_default_asset_profile_info_using_get() + + def save_asset_profile(self, body: AssetProfile) -> AssetProfile: + return self.asset_profile_controller.save_asset_profile_using_post(body=body) + + def set_default_asset_profile(self, asset_profile_id: AssetProfileId) -> AssetProfile: + asset_profile_id = self.get_id(asset_profile_id) + return self.asset_profile_controller.set_default_asset_profile_using_post(asset_profile_id=asset_profile_id) + + def get_features_info(self) -> FeaturesInfo: + return self.admin_controller.get_features_info_using_get() + + def get_license_usage_info(self) -> LicenseUsageInfo: + return self.admin_controller.get_license_usage_info_using_get() + + def get_system_info(self) -> SystemInfo: + return self.admin_controller.get_system_info_using_get() + + def assign_alarm(self, alarm_id: AlarmId, assignee_id: str) -> Alarm: + alarm_id = self.get_id(alarm_id) + return self.alarm_controller.assign_alarm_using_post(alarm_id=alarm_id, assignee_id=assignee_id) + + def get_all_asset_infos(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None, include_customers: Optional[bool] = None, + asset_profile_id: Optional[AssetProfileId] = None) -> PageDataAssetInfo: + asset_profile_id = self.get_id(asset_profile_id) + return self.asset_controller.get_all_asset_infos_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + include_customers=include_customers, + asset_profile_id=asset_profile_id) + + def get_all_dashboards(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None, + include_customers: Optional[bool] = None) -> PageDataDashboardInfo: + return self.dashboard_controller.get_all_dashboards_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + include_customers=include_customers) + + def get_all_device_infos(self, page_size: int, page: int, text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[str] = None, + include_customers: Optional[bool] = None, + device_profile_id: Optional[DeviceProfileId] = None) -> PageDataDeviceInfo: + if device_profile_id: + device_profile_id = self.get_id(device_profile_id) + + return self.device_controller.get_all_device_infos_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + include_customers=include_customers, + device_profile_id=device_profile_id) + + def get_customer_device_infos(self, customer_id: CustomerId, page_size: int, page: int, type: Optional[str] = None, + device_profile_id: Optional[DeviceProfileId] = None, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, sort_order: Optional[str] = None, + active: Optional[bool] = None, + include_customers: Optional[bool] = None) -> PageDataDeviceInfo: + customer_id = self.get_id(customer_id) + device_profile_id = self.get_id(device_profile_id) + return self.device_controller.get_customer_device_infos_using_get(customer_id=customer_id, page_size=page_size, + page=page, type=type, + device_profile_id=device_profile_id, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, active=active, + include_customers=include_customers) + + def get_entity_group_entity_info_by_id(self, entity_group_id: EntityGroupId) -> EntityInfo: + entity_group_id = self.get_id(entity_group_id) + return self.entity_group_controller.get_entity_group_entity_info_by_id_using_get(entity_group_id=entity_group_id) + + def get_entity_group_entity_infos_by_ids(self, entity_group_ids: List[str]) -> List[EntityInfo]: + entity_group_ids = ','.join(entity_group_ids) + return self.entity_group_controller.get_entity_group_entity_infos_by_ids_using_get(entity_group_ids=entity_group_ids) + + def get_entity_group_entity_infos_by_owner_and_type_and_page_link(self, owner_id: str, owner_type: str, + group_type: str, page_size: int, page: int, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[ + str] = None) -> PageDataEntityInfo: + return self.entity_group_controller.get_entity_group_entity_infos_by_owner_and_type_and_page_link_using_get( + owner_id=owner_id, owner_type=owner_type, group_type=group_type, page_size=page_size, page=page, + text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_entity_group_entity_infos_by_type_and_page_link(self, group_type: str, page_size: int, page: int, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[ + str] = None) -> PageDataEntityInfo: + return self.entity_group_controller.get_entity_group_entity_infos_by_type_and_page_link_using_get( + group_type=group_type, page_size=page_size, page=page, + text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link(self, owner_id: str, owner_type: str, + group_type: str, page_size: int, + page: int, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[ + str] = None) -> PageDataEntityInfo: + return self.entity_group_controller.get_entity_group_entity_infos_hierarchy_by_owner_and_type_and_page_link_using_get( + owner_id=owner_id, owner_type=owner_type, group_type=group_type, page_size=page_size, page=page, + text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_entity_groups_by_type_and_page_link(self, group_type: str, page_size: int, page: int, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[ + str] = None) -> PageDataEntityGroupInfo: + return self.entity_group_controller.get_entity_groups_by_type_and_page_link_using_get(group_type=group_type, + page_size=page_size, + page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def get_entity_groups_hierarchy_by_owner_and_type_and_page_link(self, owner_id: str, owner_type: str, + group_type: str, page_size: int, + page: int, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[ + str] = None) -> PageDataEntityGroupInfo: + return self.entity_group_controller.get_entity_groups_hierarchy_by_owner_and_type_and_page_link_using_get( + owner_id=owner_id, owner_type=owner_type, group_type=group_type, page_size=page_size, page=page, + text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_owner_info(self, owner_type: str, owner_id: str) -> EntityInfo: + return self.entity_group_controller.get_owner_info_using_get(owner_type=owner_type, owner_id=owner_id) + + def get_owner_infos(self, page_size: int, + page: int, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[ + str] = None) -> PageDataEntityInfo: + return self.entity_group_controller.get_owner_infos_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order) + + def get_shared_entity_group_entity_infos_by_type_and_page_link(self, group_type: str, page_size: int, + page: int, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[ + str] = None) -> PageDataEntityInfo: + return self.entity_group_controller.get_shared_entity_group_entity_infos_by_type_and_page_link_using_get( + group_type=group_type, page_size=page_size, page=page, + text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_shared_entity_groups_by_type_and_page_link(self, group_type: str, page_size: int, + page: int, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[ + str] = None) -> PageDataEntityGroupInfo: + return self.entity_group_controller.get_shared_entity_groups_by_type_and_page_link_using_get( + group_type=group_type, page_size=page_size, page=page, + text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_shared_entity_groups_by_type(self, group_type: str) -> List[EntityGroupInfo]: + return self.entity_group_controller.get_shared_entity_groups_by_type_using_get(group_type=group_type) + + def get_all_entity_view_infos(self, page_size: int, + page: int, + include_customers: Optional[bool] = None, + type: Optional[str] = None, + text_search: Optional[str] = None, + sort_property: Optional[str] = None, + sort_order: Optional[ + str] = None) -> PageDataEntityViewInfo: + return self.entity_view_controller.get_all_entity_view_infos_using_get(page_size=page_size, page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + include_customers=include_customers, + type=type) + + def get_customer_entity_view_infos(self, customer_id: CustomerId, page_size: int, page: int, + type: Optional[str] = None, + text_search: Optional[str] = None, sort_property: Optional[str] = None, + sort_order: Optional[str] = None, include_customers: Optional[bool] = None): + customer_id = self.get_id(customer_id) + return self.entity_view_controller.get_customer_entity_view_infos_using_get(customer_id=customer_id, + page_size=page_size, page=page, + type=type, text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + include_customers=include_customers) + + def get_all_user_infos(self, page_size: int, page: int, + type: Optional[str] = None, + text_search: Optional[str] = None, sort_property: Optional[str] = None, + sort_order: Optional[str] = None, + include_customers: Optional[bool] = None) -> PageDataUserInfo: + return self.user_controller.get_all_user_infos_using_get(page_size=page_size, page=page, + type=type, text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + include_customers=include_customers) + + def get_customer_user_infos(self, customer_id: CustomerId, page_size: int, page: int, + type: Optional[str] = None, + text_search: Optional[str] = None, sort_property: Optional[str] = None, + sort_order: Optional[str] = None, + include_customers: Optional[bool] = None) -> PageDataUserInfo: + customer_id = self.get_id(customer_id) + return self.user_controller.get_customer_user_infos_using_get(customer_id=customer_id, + page_size=page_size, page=page, + type=type, text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + include_customers=include_customers) + + def get_user_info_by_id(self, user_id: UserId) -> UserInfo: + user_id = self.get_id(user_id) + return self.user_controller.get_user_info_by_id_using_get(user_id=user_id) + def __load_controllers(self): + self.dashboard_controller = DashboardControllerApi(self.api_client) self.device_profile_controller = DeviceProfileControllerApi(self.api_client) self.http_integration_controller = HttpIntegrationControllerApi(self.api_client) self.user_permissions_controller = UserPermissionsControllerApi(self.api_client) @@ -1580,7 +1775,6 @@ def __load_controllers(self): self.tenant_controller = TenantControllerApi(self.api_client) self.trail_controller = TrailControllerApi(self.api_client) self.report_controller = ReportControllerApi(self.api_client) - self.dashboard_controller = DashboardControllerApi(self.api_client) self.loriot_integration_controller = LoriotIntegrationControllerApi(self.api_client) self.entity_view_controller = EntityViewControllerApi(self.api_client) self.rpc_v2_controller = RpcV2ControllerApi(self.api_client) @@ -1607,3 +1801,4 @@ def __load_controllers(self): self.asset_controller = AssetControllerApi(self.api_client) self.subscription_controller = SubscriptionControllerApi(self.api_client) self.solution_controller = SolutionControllerApi(self.api_client) + self.asset_profile_controller = AssetProfileControllerApi(self.api_client) diff --git a/test/tests_pe.py b/test/tests_pe.py index 2db3310f..6f67e5bc 100644 --- a/test/tests_pe.py +++ b/test/tests_pe.py @@ -321,13 +321,13 @@ def test_share_entity_group_to_child_owner_user_group(self): @unittest.skip('ThingsBoard json naming bug') def test_get_entities(self): self.assertIsInstance( - self.client.get_entities(EntityGroupId('4fe07130-edfd-11eb-91fd-1f8899a6f9b3', 'ASSET'), 1, 0), + self.client.get_entities(EntityGroupId('4fe07130-edfd-11eb-91fd-1f8899a6f9b3'), 1, 0), PageDataShortEntityView) @unittest.skip('ThingsBoard json naming bug') def test_get_group_entity(self): self.assertIsInstance( - self.client.get_group_entity(EntityGroupId('4fe07130-edfd-11eb-91fd-1f8899a6f9b3', 'ASSET'), + self.client.get_group_entity(EntityGroupId('4fe07130-edfd-11eb-91fd-1f8899a6f9b3'), EntityId('7731eb20-1894-11ed-b864-31da2039250b', 'ASSET')), ShortEntityView)